[GRASS-git] [OSGeo/grass] 0538cf: grass.grassdb: New Python subpackage for working w...

Vaclav Petras noreply at github.com
Tue Jul 28 20:31:26 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 0538cf8d9862d0a0d661a244e07abeeb55000fc7
      https://github.com/OSGeo/grass/commit/0538cf8d9862d0a0d661a244e07abeeb55000fc7
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M gui/wxpython/datacatalog/tree.py
    M gui/wxpython/gis_set.py
    M gui/wxpython/location_wizard/wizard.py
    M gui/wxpython/startup/guiutils.py
    M gui/wxpython/startup/utils.py
    M lib/init/grass.py
    M lib/python/Makefile
    A lib/python/grassdb/Makefile
    A lib/python/grassdb/__init__.py
    A lib/python/grassdb/checks.py
    A lib/python/grassdb/create.py
    A lib/python/grassdb/data.py
    A lib/python/grassdb/manage.py

  Log Message:
  -----------
  grass.grassdb: New Python subpackage for working with locations and mapsets (#837)

New package under grass should be a place for all functionality related to manipulating locations and mapsets. The need for this comes specifically from sharing the code between init/grass.py and wxGUI data catalog (and startup window).

This should be the place where things like "locked mapset" should be defined for Python code (whatever the implementation is, the function to check that will be here). It also aspires to be a lightweight Python API equivalent of wxGUI data catalog. With that functions related to raster maps, vector maps, and other actual data manipulations can be included (i.e., manipulations, not computations).

Besides existing functions from from init/grass.py, startup/utils.py, and datacatalog/tree.py, this includes new functions for mapset checking from (currently) unmerged #767 which needs to know ahead of time if mapset is usable for running in it.

Currently, only standalone functions are used (i.e., no classes like trees, etc.). This can change if needed.

grassdb stands for GRASS GIS Spatial Database.

A check for PERMANENT added to rename mapset.

Note the lack of treatment of SKIP_MAPSET_OWN_CHK build flag in the pure Python implementation of ownership check.

The library currently complies with Black and most of Pylint.




More information about the grass-commit mailing list