Skip to content

Comments

grass.script: Get GISBASE automatically in get_commands#3683

Merged
echoix merged 3 commits intoOSGeo:mainfrom
wenzeslaus:reduce-need-to-have-gisbase-var
May 6, 2024
Merged

grass.script: Get GISBASE automatically in get_commands#3683
echoix merged 3 commits intoOSGeo:mainfrom
wenzeslaus:reduce-need-to-have-gisbase-var

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
@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.

3 participants