Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/parser: Use project for G_OPT_M_LOCATION #3130

Merged

Conversation

wenzeslaus
Copy link
Member

@wenzeslaus wenzeslaus commented Aug 16, 2023

Standard option G_OPT_M_LOCATION which creates option named location now creates option named project. Each module using G_OPT_M_LOCATION without further modifications has its own entry in in the renamed options file for backwards compatibility.

New usage of g.mapset:

> g.mapset project=nc_basic_spm_grass7 mapset=user1

Still works:

> g.mapset location=nc_spm_08_grass7 mapset=user1

The latter produces a warning:

WARNING: Please update the usage of <g.mapset>: option <location> has been
         renamed to <project>

g.mapset --h:

Changes/reports current mapset.

Usage:
 g.mapset [-clp] mapset=name [project=name] [dbase=path] [--overwrite]
   [--help] [--verbose] [--quiet] [--ui]

Flags:
  -c   Create mapset if it doesn't exist
  -l   List available mapsets and exit
  -p   Print current mapset and exit

Parameters:
   mapset   Name of mapset (default: current search path)
  project   Project (location) name
    dbase   GRASS GIS database directory

This applies to:

  • g.mapset
  • r.proj
  • i.ortho.elev
  • g.download.location
  • v.proj

Standard option G_OPT_M_LOCATION which creates option named location now creates option named location. Each module using G_OPT_M_LOCATION without further modifications has its own entry in in the renamed options file for backwards compatibility.
@wenzeslaus wenzeslaus added enhancement New feature or request C Related code is in C labels Aug 16, 2023
@wenzeslaus wenzeslaus added this to the 8.4.0 milestone Aug 16, 2023
@wenzeslaus wenzeslaus mentioned this pull request Aug 18, 2023
6 tasks
@HuidaeCho
Copy link
Member

@wenzeslaus Do you consider adding new G_OPT_M_PROJECT and switching to it eventually in GRASS 9?

@wenzeslaus
Copy link
Member Author

Yes. That fits with the general plan of adding "project" to the API and then gradually removing usage of "location" internally.

@github-actions github-actions bot added GUI wxGUI related raster Related to raster data processing Python Related code is in Python HTML Related code is in HTML libraries module docs general labels Feb 14, 2024
Copy link
Contributor

@cmbarton cmbarton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the inconsistencies in how the terms Mapset and Location are written in this and other places: mapset, MAPSET, and Mapset. Since we are changing terminology, this is a good opportunity to standardize how these important terms are written.

As suggested in #2993 and other places, I suggest that we capitalize the first letter and use lower case for the rest of the letters in all descriptions, labels, and documentation--i.e., Mapset and Project--wherever possible. This reduces confusion when people read about these important terms.

For command-line arguments, I suggest keeping everything in lower case letters of course.

raster/r.proj/r.proj.html Show resolved Hide resolved
lib/gis/renamed_options Show resolved Hide resolved
@github-actions github-actions bot added vector Related to vector data processing notebook labels Mar 16, 2024
@petrasovaa petrasovaa merged commit 22e0626 into OSGeo:main Mar 22, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C docs enhancement New feature or request general GUI wxGUI related HTML Related code is in HTML libraries module notebook Python Related code is in Python raster Related to raster data processing vector Related to vector data processing
Development

Successfully merging this pull request may close these issues.

None yet

4 participants