[GRASS-git] [OSGeo/grass] 0b8ada: grass.app: Add internal CLI with argparse subcomma...

Vaclav Petras noreply at github.com
Tue Apr 29 07:50:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 0b8ada137b85bc31cfd2283d822de06c3918ec6a
      https://github.com/OSGeo/grass/commit/0b8ada137b85bc31cfd2283d822de06c3918ec6a
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-04-29 (Tue, 29 Apr 2025)

  Changed paths:
    M python/grass/app/Makefile
    A python/grass/app/__main__.py
    A python/grass/app/cli.py
    A python/grass/app/tests/grass_app_cli_test.py

  Log Message:
  -----------
  grass.app: Add internal CLI with argparse subcommands (#5590)

This adds a CLI to grass.app subpackage using `__main__.py` and Python argparse with subcommands. At this point, this is meant as internal and experimental. The original motivation for this is testing locking in #5443. The subcommands add a lot of flexibility in what can done with argparse supporting directly several use cases and being quite stable and standardized.

Just as an example (to have this separate from #5443 while functional), this adds two subcommands, help and man, which both end up calling g.manual. These specific subcommands are not a replacement for calling g.manual inside an interactive shell, but there are a replacement for command line call with a temporary project setup.



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list