Skip to content

Rename location to project #3121

@wenzeslaus

Description

@wenzeslaus

We are renaming location to project. The goal is to replace the term location by the term project in user-facing strings, texts, and APIs. The rename was decided by community consensus which is a result of more than 5 years of discussion.

Phase 1

Minimal changes needed to allow all people to contribute changes and start making changes in their own materials.

Phase 2

Things which need to happen to rename location to project. This needs to happen before 8.4.0. This issue will be closed as completed when this phase is finished.

  • Rename all in GUI user-visible strings.
  • This will require the new strings to be translated. We can consider releasing instructions on how these translations should happen. While location and mapset should not be translated, project can be. If we decide to include things like "new project (location)" we may need to give instructions about that, esp. because we will eventually remove the "(location)" part.
  • Rename tool parameters (aka module options aka CLI API)
  • Python API
    • It is little hard to tell what is the extent of changes needed. grep -IrnE location jupyter/ pygrass/ script/ temporal/ gives a lot of results, but places where it actually matters seem to be much more scarce.
    • Changes definitively needed in grass.script.setup.init, create_location, create_environment.
    • Compatibility in general: In Python, a new parameter can be safely introduced without breaking the API. The location parameter may move to the end of the parameter list and the new project can take its place in front where the location parameter was originally.
    • Compatibility for grass.script.setup.init: Typical call looks like init(".../path/...") or init(".../path", "name", "name"), so the rename might not be even noticeable and no change to user code would be needed in this case.
  • Update documentation. While most of the documentation would be best updated together with the relevant tools or functions, there is also a lot of documentations not directly linked to a specific piece of code. This will need to be be reviewed and updated. See doc: continue renaming location to project in documentation #3570.

Phase 3

Things to consider, but are not necessary for 8.4.0, for completing this issue, or in general. This is included only for context.

  • Rename to project in C API. New names can be added in a backwards compatible way. The rename will be mostly happening from G_database_* to G_project_* (and only partially from location), so it does not seem to be time-sensitive. See also wxGUI: Minimal changes to rename location to project #2993 (comment) and wxGUI: Minimal changes to rename location to project #2993 (comment).
  • De-emphasize GISDBASE as its own thing from user perspective. Gisdbase (GISDBASE, gisdbase) was never really readable. Presenting it as simply the directory when one or more projects (locations) are might be sufficient. The directory can still be treated in a special way as it is now, e.g., in command line, it is easier to switch to mapset in another project (location) in the same gisdbase than it is in another gisdbase. For example, grass.script.setup.init calls the parameter path and not gisdbase.
  • Allow users to use "path to mapset" in more places in addition to specifying it as three items. There is no reason for path to mapset to be always split into three parameters. For example, grass.script.setup.init has only one mandatory parameter called path. If you write init(path), the path it is used as path to mapset, but you write init(database, location, mapset), the path becomes the database directory and the other two are location (project) and mapset. More places could support this logic, e.g., GUI can have a new ability to open mapsets (there is not File > Open mapset now), r.proj and g.mapset can have the same "path or path+name+name" behavior as grass.script.setup.init.
  • Allow users to specify just the path to a project (location) and default to PERMANENT mapset. The PERMANENT mapset is currently created by default. This would also use it by default, e.g., when user in GUI navigates to a project directory with (currently non-existent) File > Open mapset.
  • Don't ask about overwriting GUI workspace file when it is the file which is open. (This is the common behavior and would fit with per-mapset GUI workspace files.)
  • wxGUI: Make GUI workspace part of mapset #3113
  • Allow more than one workspace to be stored in a mapset.
  • Auto-save workspace often and be able to basically "restore the last [GUI] session".
  • Remove location from code where it is used in variable names, comments and other things which are limited just to that piece of code.

Phase 4

Things which can be done only for or after the 9.0 release. This is included only for context.

  • Remove legacy location parameters and functions with that name which were kept for backward compatibility in Phase 3.
  • Remove mentions of location from user-visible strings and documentation except for one or two places where the old naming is explained. For example, when the text says "create a new project (location)" we would remove "(location)" and leave only "create a new project". This will require to update translations.
  • Remove location from backend. This is especially LOCATION_NAME variable in the session file (rcfile) managed by g.gisenv and directly. The session file is somewhat backend-ish, but it was used as a frontend for a long time, so this can be done only with a major release. Ideally, we would add features to replace all direct use cases of the session file before 9.0 so that this change would not effect anyone. Alternatively, we do the renames of these variable in a backwards compatible way, e.g., we use PROJECT_NAME but continue to support LOCATION_NAME.

Here are some pointers to the discussions which lead to this decision:

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions