Skip to content

feat(variant): store full information about parents commands versions - #3322

Draft
sylvlecl wants to merge 29 commits into
devfrom
fix/store-snapshot-lineage
Draft

feat(variant): store full information about parents commands versions#3322
sylvlecl wants to merge 29 commits into
devfrom
fix/store-snapshot-lineage

Conversation

@sylvlecl

Copy link
Copy Markdown
Member

This is necessary to have a complete picture of what a snapshot represents, and
this to decide if it's up to date or not.

sylvlecl added 14 commits July 28, 2026 13:56
We now invalidate the previous snapshot at the start of generation.

This will avoid to keep the previous snapshot as "valid" if the
generation starts modifying it and is interrupted, for example by a
process crash.

Also set expire_on_commit=False in unit tests, in consistence with the
actual application configuration.

Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Comment thread antarest/study/storage/variantstudy/snapshot/snapshot_generator.py Fixed
sylvlecl added 5 commits July 30, 2026 08:18
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Comment thread antarest/study/storage/variantstudy/snapshot/snapshot_generator.py Fixed
sylvlecl added 4 commits July 30, 2026 10:19
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
def search_ref_study(
self, root_study: Study, descendants: Sequence[VariantStudy], *, from_scratch: bool
) -> RefStudySearchResult:
def search_ref_study(self, lineage: VariantLineage, *, from_scratch: bool) -> RefStudySearchResult:
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Signed-off-by: Sylvain Leclerc <sylvain.leclerc@rte-france.com>
Assumes the variants are sorted from the oldest to most recent.

If no variant is up to date, it returns None.
def get_snapshot_versions(study: Study) -> LineageVersions | Literal["unknown"] | None:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant