[GRASS-git] [OSGeo/grass] c8106c: grass.pygrass: Use unique tmp mapset names in Grid...

Vaclav Petras noreply at github.com
Wed Mar 2 07:10:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: c8106cde3a9bf623854cf0026be50dd7a4ff8ced
      https://github.com/OSGeo/grass/commit/c8106cde3a9bf623854cf0026be50dd7a4ff8ced
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2022-03-02 (Wed, 02 Mar 2022)

  Changed paths:
    M .github/workflows/pylint.yml
    M .github/workflows/pytest.yml
    M python/grass/pygrass/modules/grid/grid.py
    A python/grass/pygrass/modules/tests/grass_pygrass_grid_test.py

  Log Message:
  -----------
  grass.pygrass: Use unique tmp mapset names in GridModule (#1967)

- Base the temporary mapset name on process ID and node name instead of just module name.
- Use more robust legalize_vector_name function instead of just removing dots.
- Allow for underscores in user-provided mapset name prefix (and in processed module name) by using stored prefix to delete temporary mapsets.
- This by allows multiple GridModules to run on one machine (including HPC) from different processes without the need to specify unique mapset prefix.
- The previous code required no underscore in the mapset name, but the documentation did not state that. This removes the requirement and avoid possible removal of mapsets with similar name.
- Documentation now comments on how unique the temporary name is and states when a custom prefix needs to be supplied (multiple GridModules from one process).
- Adds basic tests for GridModule (developed with the original version).
- Adds LD_LIBRARY_PATH setting for pytest (and removes broken LD_LIBRARY_PATH setting there).
- Fixes Pylint check done by pytest so that no actual tests are executed.




More information about the grass-commit mailing list