grass.py: used space as delimiter to get GRASS_VERSION_STRING#405
grass.py: used space as delimiter to get GRASS_VERSION_STRING#405ninsbl merged 13 commits intoOSGeo:masterfrom
Conversation
|
BTW: applying #325 does not provide revision info in: |
|
This has been independent from #325 until now. The |
I see, because git is not expanding the sv keyword Revision.
I don't think these are the intended values for version and date, instead grass.py probably wants to report the latest git hash of the whole source tree, not only the headers. Instead of using GRASS_HEADRS_VERSION from version.h, we could insert GRASS_VERSION_GIT from Platform.make when creating grass.py, i.e. modify lib/init/Makefile at the lines following L68: |
|
You are right, of course. Now I tried to address that in the two new commits. |
|
Sorry, @wenzeslaus, I saw #323 just now, which obviously adresses the same issue, though solves it slightly different... |
|
@ninsbl @wenzeslaus The question is what exactly For |
|
@ninsbl Feel free to use pieces of #323 if they seem useful. Maybe there are two issues to solve: 1) robust parsing (to e.g. gracefully fail, try harder to parse, etc., kind of what I tried in #323) and 2) Actually parse the right/current value (e.g. after #325). I second @metzm in saying that we need to clarify what this should actually report. Perhaps it is a topic for different PR/issue. See, for example: |
|
I tested this PR (since PR #325 has been merged), and this is the result ... no more error. And here with the available parameters: Maybe |
|
OK, will update the PR to cover changes in #325, hopefully tonight. Would be nice to get this into 7.8.3... |
|
@ninsbl shall this be included in 7.8.3 yet? |
|
The format of a |
Improved in 317631e |
|
I tested this PR again with the available parameters: Looks now all good to me. |
wenzeslaus
left a comment
There was a problem hiding this comment.
What is here is fine, but it seems that all these --config values need documentation.
should svn_revision be renamed to be something more git related as svn isn't used anymore? |
yes, eg. |
Co-Authored-By: Markus Neteler <[email protected]>
* use space delimiter for GIS_H_VERSION * choose GRASS_VERSION_STRING list element * report header version and date * write GRASS_VERSION_GIT to grass.py * use GRASS_VERSION_GIT * write GRASS_VERSION_GIT to grass.py * fix tab indent * add date * add date * get date correctly after #325 * get date correctly after #325 * date: no indent, no quotes * Update lib/init/grass.py Co-Authored-By: Markus Neteler <[email protected]> Co-authored-by: Stefan Blumentrath <[email protected]> Co-authored-by: Martin Landa <[email protected]> Co-authored-by: Markus Neteler <[email protected]>
|
Backported in ea2dd9e |
|
No mess, thanks for PR! |
* grass7 manual: document --config parameters Adding missing `grass --config <option>` documentation Adresses #405 (review) * fix double white space * fix version for consistency
* grass7 manual: document --config parameters Adding missing `grass --config <option>` documentation Adresses #405 (review) * fix double white space * fix version for consistency
grass --config currently throws an error:
This is very inconvenient if you want to determine where GRASS is installed e.g. for usage in R or the like.
The reason for the error is that colon is used as delimiter to parse GIS_H_VERSION and GRASS_VERSION_STRING.
Unfortunately, GRASS_VERSION_STRING is not replaced with the proper value and I have no idea ho to do that...