Repository navigation
temporal: allow STDS object construction without initialized database - #7672
Merged
Merged
Conversation
echoix
approved these changes
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.