New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grass.app: Refactor PATH setup in grass init script and grass.script.setup #3694
Draft
wenzeslaus
wants to merge
8
commits into
OSGeo:main
Choose a base branch
from
wenzeslaus:refactor-path-setup-from-init
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+392
−289
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rass.script.setup.init
…is now in sync and contains macOS, so getting path to addons needs to deal just with the different dir name, not whole config path.
wenzeslaus
added a commit
to wenzeslaus/grass
that referenced
this pull request
May 9, 2024
With an error in the code which prevents the simple test of the main executable to run, the Pylint check does not run. While it requires some functionality from the grass executable, it does not require everything to work. This removes the step with the explicit test of the grass executable and relies on other workflows to do that test and provide a reasonable message there. This workflow now hopes to get to Pylint and report an issue with Pylint. The motivation is OSGeo#3694 where I would expect to see a Pylint error, but get a traceback from the grass executable in the simple test. (The executable partially works, but not enough for the simple test.)
"""Wrapper for subprocess.Popen to deal with platform-specific issues""" | ||
if WINDOWS: | ||
kwargs["shell"] = True | ||
return subprocess.Popen(cmd, **kwargs) |
Check notice
Code scanning / Bandit
subprocess call - check for execution of untrusted input. Note
subprocess call - check for execution of untrusted input.
Just to be clear, the idea here is to prepare it for the FHS changes, not to actually do them. As for the state of this PR, this is close to reviewable state, but it is not there yet. |
wenzeslaus
added a commit
that referenced
this pull request
May 9, 2024
With an error in the code which prevents the simple test of the main executable to run, the Pylint check does not run. While it requires some functionality from the grass executable, it does not require everything to work. This removes the step with the explicit test of the grass executable and relies on other workflows to do that test and provide a reasonable message there. This workflow now hopes to get to Pylint and report an issue with Pylint. The motivation was #3694 where I expected to see a Pylint error, but got a traceback from the main executable in the simple test. (The executable partially worked, enough for config, but not enough for the simple test.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This moves setting of the PATH variable and other environment variables to from the grass init script (
lib/init/grass.py
) and the grass.script subpackage to grass.app subpackage.I'm not set on where the code should live, but I'm trying to have only one code without duplication. This should ease the changes required for Filesystem Hierarchy Standard (FHS), see #3661.