[GRASS-dev] [GRASS GIS] #3772: Make the grass library importable outside of a GRASS session

GRASS GIS trac at osgeo.org
Tue Mar 5 09:20:02 PST 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):

 The proposed change is not directly comparable to {{{grass-session}}}.
 They have different scopes.

 To make this more clear:

 {{{grass-session}}} is a 3rd party library that can be used to
 programmatically create a GRASS session.

 If {{{grass-session}}} was implemented in the {{{grass}}} library itself,
 then, since you can't import the {{{grass}}} library unless you already
 are inside a GRASS session, we would have a chicken-egg problem. I.e. in
 order to create a GRASS session we would need to already be inside a GRASS
 session.
 That's why {{{grass-session}}} needs to be a 3rd party library.

 So, if the {{{grass}}} library becomes importable, then, {{{grass-
 session}}} would have a cleaner implementation and eventually, {{{grass-
 session}}} could be implemented in the {{{grass}}} library itself, with
 obvious benefits (e.g. keeping the code up to date, easier deployments
 etc).

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3772#comment:2>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list