GithubHelp home page GithubHelp logo

mundialis / grass-gis-helpers Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 3.0 127 KB

Python library with helper functions for GRASS GIS addon development

Home Page: https://pypi.org/project/grass-gis-helpers/

License: GNU Affero General Public License v3.0

Python 100.00%
grass-gis grass-gis-addons opensource

grass-gis-helpers's People

Contributors

anikaweinmann avatar griembauer avatar jhalbauer avatar juleshaas avatar linakrisztian avatar mmacata avatar neteler avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

grass-gis-helpers's Issues

Possible functions

Possible content:

  • check-addon-installation
  • general-cleanup โœ”๏ธ
  • parallelization-worker-functions
  • ...

General Cleanup: `rm_groups` should not delete rasters

I think the logic of using rm_groups (remove groups AND rasters in groups) and rm_groups_wo_rasters (remove groups only, keep rasters) of cleanup.general_cleanup() should be swapped to rm_groups (remove groups only, keep rasters) and rm_groups_with_rasters (remove groups AND rasters).

By default one would assume that rm_groups calls g.remove type=group ...

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/linting.yml
  • mundialis/github-workflows 1.2.0
.github/workflows/python-publish.yml
pep621
pyproject.toml
  • setuptools >=61.0

  • Check this box to trigger a request for Renovate to run again on this repository

do not use a default parameter which is an empty list

Relevant here: https://github.com/mundialis/grass-gis-helpers/blob/main/src/grass_gis_helpers/cleanup.py#L27

From stackoverflow:

Sometimes it seems natural to have a default parameter which is an empty list. However, Python produces unexpected behavior in these situations.

Use

def general_cleanup(
    rm_rasters=None,
    rm_vectors=None,
    rm_files=None,
    rm_dirs=None,
    rm_groups=None,
    rm_groups_wo_rasters=None,
    rm_regions=None,
    rm_strds=None,
    orig_region=None,
    rm_mask=False,
):

instead and add tests if the arguments are not None and a list.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.