Skip to content

temporal: allow STDS object construction without initialized database - #7672

Merged
ninsbl merged 12 commits into
OSGeo:mainfrom
ninsbl:dbless_dataset_construction
Jul 13, 2026
Merged

ninsbl merged 12 commits into
OSGeo:mainfrom
ninsbl:dbless_dataset_construction

Conversation

@ninsbl

@ninsbl ninsbl commented Jul 12, 2026

Copy link
Copy Markdown
Member

Empty STDS objects are constructed in several temporal modules, also where it would not be necessary to have a temporal database in the current mapset or to have TGIS fully initialized. However, constructing STDS objects currently fails if TGIS is initialized with tgis.init(skip_db_init=True).

The reason is that STDS construction currently attempts to read the tgis_db_version from the database metadata, which of course fails if the database is not inizialized or does not exist.

This PR changes STDS object initialization to fetch the tgis_db_version from the tgis globals, if the DB is not inizialized. With that change STDS objects can be constructed even when tgis is initialized with tgis.init(skip_db_init=True). Methods that require access to the temporal database (like e.g., is_in_db()) will still fail as expected.

pytests for STDS construction are added as part of this PR.

@github-actions github-actions Bot added Python Related code is in Python libraries tests Related to Test Suite labels Jul 12, 2026
@ninsbl
ninsbl merged commit d729f90 into OSGeo:main Jul 13, 2026
26 checks passed
@github-actions github-actions Bot added this to the 8.6.0 milestone Jul 13, 2026
echoix pushed a commit to wenzeslaus/grass that referenced this pull request Jul 14, 2026
…OSGeo#7672)

* set sqlite as default backend on init

* read tgis_db_version from globals if no DB is initialized

* add tests for STDS construction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants