Skip to content
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.script: Get GISBASE automatically in get_commands #3683

Merged
merged 3 commits into from
May 6, 2024

Conversation

wenzeslaus
Copy link
Member

The grass.script.get_commands function requires GISBASE (more specifically, path to binary executables and scripts). The need for GISBASE prevents its use before a session (more specifically the runtime part of it) is created. This changes the function to get the GISBASE automatically when not set. It also adds the standard env parameter other functions have (which is useful mainly for tests).

The _grass.script.get_commands_ function requires GISBASE (more specifically, path to binary executables and scripts). The need for GISBASE prevents its use before a session (more specifically the runtime part of it) is created. This changes the function to get the GISBASE automatically when not set. It also adds the standard env parameter other functions have (which is useful mainly for tests).
@github-actions github-actions bot added Python Related code is in Python libraries labels May 3, 2024
@echoix echoix merged commit 4ecb43e into OSGeo:main May 6, 2024
26 checks passed
@wenzeslaus wenzeslaus deleted the reduce-need-to-have-gisbase-var branch May 20, 2024 14:33
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request May 21, 2024
* grass.script: Get GISBASE automatically in get_commands

The _grass.script.get_commands_ function requires GISBASE (more specifically, path to binary executables and scripts). The need for GISBASE prevents its use before a session (more specifically the runtime part of it) is created. This changes the function to get the GISBASE automatically when not set. It also adds the standard env parameter other functions have (which is useful mainly for tests).

* Add mock for tests
@neteler neteler added this to the 8.4.0 milestone May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libraries Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants