Skip to content

Centralize dependency and runtime version management in the root dependency_versions.yml. - #2454

Merged
GernotMaier merged 13 commits into
mainfrom
version-vs-env
Aug 20, 2026
Merged

Centralize dependency and runtime version management in the root dependency_versions.yml.#2454
GernotMaier merged 13 commits into
mainfrom
version-vs-env

Conversation

@GernotMaier

Copy link
Copy Markdown
Contributor
  • Added catalog-managed defaults for the simulation-model database and simtools-tests.
  • Preserved .env overrides for SIMTOOLS_DB_SIMULATION_MODEL_VERSION and SIMTOOLS_TESTS_VERSION.
  • Added simtools-dependency-versions --format env for CI exports.
  • Updated CI workflows to consume catalog values without repeated parsing.
  • Kept the root catalog as the single source of truth and packaged it for installed applications.
  • Added validation and tests for version handling, packaging, and environment export.

@GernotMaier GernotMaier self-assigned this Aug 20, 2026
@GernotMaier GernotMaier added the Copilot review AI-supported Copilot review label Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Centralizes runtime dependency versions in dependency_versions.yml, packages the catalog, and exposes values to applications and CI.

Changes:

  • Adds catalog defaults and environment export.
  • Updates runtime configuration, CI, tests, schemas, and documentation.
  • Separately prevents PyPI deployment for release candidates.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
dependency_versions.yml Adds model and test-resource versions.
.env_template Removes catalog-managed versions.
src/simtools/dependency_versions.py Adds discovery, validation, and env export.
src/simtools/configuration/configurator.py Applies catalog database defaults.
src/simtools/applications/dependency_versions.py Exposes the env format.
src/simtools/schemas/dependency_versions.schema.yml Extends the catalog schema.
pyproject.toml Installs the root catalog as data.
MANIFEST.in Includes the catalog in source distributions.
docker/Dockerfile-simtools-prod Copies the catalog into builds.
tests/unit_tests/test_dependency_versions.py Tests catalog and environment export behavior.
tests/unit_tests/configuration/test_configurator.py Tests catalog configuration defaults.
tests/conftest.py Uses catalog test-resource defaults.
tests/integration_tests/conftest.py Uses catalog database defaults.
.github/workflows/CI-integrationtests.yml Exports catalog values into CI.
.github/actions/setup-simtools-tests/action.yml Centralizes test environment setup.
.github/workflows/pypi.yml Blocks release-candidate deployment.
docs/source/user-guide/getting_started.md Documents catalog-managed versions.
docs/source/user-guide/applications/simtools-dependency-versions.md Documents environment output.
docs/source/developer-guide/testing_integration.md Documents test-resource selection.
docs/source/developer-guide/dependency_versions.md Updates runtime catalog guidance.
docs/source/components/databases.md Updates database-version instructions.
docs/changes/2454.maintenance.md Records catalog centralization.
docs/changes/2452.maintenance.md Records the PyPI policy change.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/simtools/schemas/dependency_versions.schema.yml Outdated
Comment thread src/simtools/dependency_versions.py Outdated
Comment thread tests/unit_tests/test_dependency_versions.py Outdated
Comment thread tests/unit_tests/configuration/test_configurator.py Outdated
Comment thread docs/source/developer-guide/testing_integration.md Outdated
Comment thread docs/source/developer-guide/dependency_versions.md Outdated
Comment thread .github/workflows/pypi.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated no new comments.

Suppressed comments (5)

src/simtools/dependency_versions.py:254

  • For schema 0.1.0, SIMTOOLS_TESTS_VERSION is not catalog-managed because that catalog has no simtools-tests section. Initializing version_keys with it therefore breaks the preserved legacy contract: an environment template that was valid before this change is now rejected. Only prohibit both version keys for schema 0.2.0, and include SIMTOOLS_TESTS_VERSION in the legacy regression test.
    version_keys = {"SIMTOOLS_TESTS_VERSION"}
    if catalog["schema_version"] == "0.2.0":
        version_keys.add("SIMTOOLS_DB_SIMULATION_MODEL_VERSION")

pyproject.toml:156

  • Installing this as a wheel data-file does not make sys.prefix/simtools a portable lookup location. That happens to work for a virtualenv/prefix install, but pip install --user places data under the user scheme and pip install --target places it under the target tree, so an installed CLI can still fail to find the catalog. Package it as importable package data (and resolve it with importlib.resources), or discover every supported installation scheme and test an actual installed wheel.
data-files.simtools = [ "dependency_versions.yml" ]

docs/source/user-guide/applications/simtools-dependency-versions.md:25

  • The table still states that catalog output uses schema 0.1.0, although the root catalog now declares 0.2.0 and the exporter supports either schema. This gives users the wrong contract for the JSON currently emitted; list both supported versions (or state that the schema is selected by the catalog).
| --- | --- | --- |

.github/actions/setup-simtools-tests/action.yml:38

  • This step now exports all catalog-managed runtime values from dependency_versions.yml, but the action input description and step name still say that simulation-model settings are extracted from .env_template. Update that metadata so callers are not directed to the obsolete source and understand that test-resource settings are exported too.
        if [[ "${{ inputs.install-dependencies }}" != "true" ]]; then
          python -m pip install pyyaml
        fi
        python src/simtools/applications/dependency_versions.py --format env >> "$GITHUB_ENV"

docs/source/components/databases.md:97

  • The upload application explicitly sets use_dependency_defaults=False, so it cannot automatically “use the model version from dependency_versions.yml”; it requires a version from the CLI or .env. Clarify that users must pass the catalog's release tag explicitly (unless intentionally selecting another target), otherwise omitting the option still raises Setting of db_simulation_model_version is required.
2. Use the model version from `dependency_versions.yml`, or provide an explicit version to the upload application. Best practice is to use a released version of the model repository, e.g.,

@ctao-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube

@GernotMaier
GernotMaier marked this pull request as ready for review August 20, 2026 10:22
@GernotMaier
GernotMaier merged commit 98b3c61 into main Aug 20, 2026
@GernotMaier
GernotMaier deleted the version-vs-env branch August 20, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Copilot review AI-supported Copilot review

Development

Successfully merging this pull request may close these issues.

2 participants