[GRASS-dev] [GRASS GIS] #3772: Make the grass library importable outside of a GRASS session
GRASS GIS
trac at osgeo.org
Mon Mar 25 08:11:40 PDT 2019
#3772: Make the grass library importable outside of a GRASS session
--------------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Python | Version: svn-trunk
Resolution: | Keywords:
CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Comment (by pmav99):
Replying to [comment:4 mmetz]:
> This is a question about the general design of GRASS GIS.
Mmm... yes and no.
You are right of course that in order to use GRASS you need to first setup
the GRASS session. But I think that this issue has a bit different scope,
since it is about making it easier to use the {{{grass}}} library.
More specifically, being able to import the {{{grass}}} library from a
normal bash session means that we will be able to do stuff like:
- being able to programmatically create a GRASS session without relying on
3rd party libraries. This might seem limited, but not having to {{{pip
install}}} packages does simplify large scale GRASS deployments.
- write tests that can be run **outside** of a GRASS session (note:
creating the session ideally should be probably part of a test's fixture,
different tests might need different sessions etc). For me this is the
most important aspect.
Nevertheless, once the ability is there, more use cases might become
evident.
Anyway, this is currently blocked by #3790 because what practically makes
{{{grass}}} "unimportable" is the gettext code + [https://github.com
/GRASS-GIS/grass-
ci/blob/ff8a8cab9c1ad3629a5cb09795c853a050a6b47c/lib/python/pygrass/modules/shortcuts.py#L10
this line]. Once that is fixed, I will upload a concrete patch for review
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3772#comment:6>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list