Skip to content

Introduce a consistent version management for all simtools dependencies#2376

Merged
GernotMaier merged 53 commits into
mainfrom
version-management
Jul 24, 2026
Merged

Introduce a consistent version management for all simtools dependencies#2376
GernotMaier merged 53 commits into
mainfrom
version-management

Conversation

@GernotMaier

@GernotMaier GernotMaier commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Introduce a consistent version management for all simtools dependencies, meaning all dependency versions are read from the pyrpoject.toml file (relevant part below).

This makes changes easier - as right now we have defined these dependencies in Dockerfiles, github Workflows, Code, environment files, pyproject.toml, etc... - essentially uniformly distributed across the code.

Extract from the pyproject.toml:

[tool.gammasimtools]
dependency-versions.schema_version = "0.1.0"
dependency-versions.python = "3.14"
dependency-versions.apptainer = "1.5.0"
dependency-versions.cpu-variants = [ "generic", "avx2", "avx512f", "sse4" ]
dependency-versions.archives.autoconf.version = "2.71"
dependency-versions.archives.autoconf.sha256 = "431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c"
dependency-versions.archives.gsl.version = "2.8"
dependency-versions.archives.gsl.sha256 = "6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190"
dependency-versions.base-image.name = "docker.io/library/almalinux"
dependency-versions.base-image.runtime-version = "9.8-minimal"
dependency-versions.base-image.build-version = "9.8"
dependency-versions.corsika-interaction-tables.version = "v0.1.0"
dependency-versions.model-database.name = "CTAO-Simulation-Model"
dependency-versions.model-database.default-version = "0.16.0"
dependency-versions.production-combinations = [
  { corsika = "78010", sim-telarray = "v2025-11-30-rc" },
  { corsika = "78050", sim-telarray = "v2025-11-30-rc" },
]

[[tool.gammasimtools.dependency-versions.corsika]]
version = "78010"
source-ref = "v7.8010"
source-url = "https://gitlab.iap.kit.edu/AirShowerPhysics/corsika-legacy/corsika7.git"
config-version = "v0.1.0"
config-source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika7-config.git"
opt-patch-version = "v1.1.0"
opt-patch-source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika-opt-patches.git"

[[tool.gammasimtools.dependency-versions.corsika]]
version = "78050"
source-ref = "v7.8050"
source-url = "https://gitlab.iap.kit.edu/AirShowerPhysics/corsika-legacy/corsika7.git"
config-version = "v1.0.0"
config-source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika7-config.git"
opt-patch-version = "v1.2.0"
opt-patch-source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika-opt-patches.git"

[[tool.gammasimtools.dependency-versions.sim-telarray]]
version = "v2025-11-30-rc"
source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/sim_telarray.git"
hessio-version = "v2025-12-01-rc"
hessio-source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/hessio.git"
stdtools-version = "v2025-06-16-rc"
stdtools-source-url = "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/stdtools.git"

There is a new application to retrieve the dependency - used e.g., but the Github runners, but can also be used to dump all the dependencies to the screen:

simtools-dependency-versions --format catalog
INFO: simtools application dependency_versions started with activity ID 019f9408-1e4a-74ee-bdd1-ccd847be5ebe
INFO: simtools: 0.34.1.dev138+g1d36bd4c3 DB: {} {} CORSIKA: 78010 sim_telarray: v2025-11-30-rc
{
  "apptainer": "1.5.0",
  "archives": {
    "autoconf": {
      "sha256": "431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c",
      "version": "2.71"
    },
    "gsl": {
      "sha256": "6a99eeed15632c6354895b1dd542ed5a855c0f15d9ad1326c6fe2b2c9e423190",
      "version": "2.8"
    }
  },
  "base-image": {
    "build-version": "9.8",
    "name": "docker.io/library/almalinux",
    "runtime-version": "9.8-minimal"
  },
  "corsika": [
    {
      "config-source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika7-config.git",
      "config-version": "v0.1.0",
      "opt-patch-source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika-opt-patches.git",
      "opt-patch-version": "v1.1.0",
      "source-ref": "v7.8010",
      "source-url": "https://gitlab.iap.kit.edu/AirShowerPhysics/corsika-legacy/corsika7.git",
      "version": "78010"
    },
    {
      "config-source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika7-config.git",
      "config-version": "v1.0.0",
      "opt-patch-source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/corsika-opt-patches.git",
      "opt-patch-version": "v1.2.0",
      "source-ref": "v7.8050",
      "source-url": "https://gitlab.iap.kit.edu/AirShowerPhysics/corsika-legacy/corsika7.git",
      "version": "78050"
    }
  ],
  "corsika-interaction-tables": {
    "version": "v0.1.0"
  },
  "cpu-variants": [
    "generic",
    "avx2",
    "avx512f",
    "sse4"
  ],
  "model-database": {
    "default-version": "0.16.0",
    "name": "CTAO-Simulation-Model"
  },
  "production-combinations": [
    {
      "corsika": "78010",
      "sim-telarray": "v2025-11-30-rc"
    },
    {
      "corsika": "78050",
      "sim-telarray": "v2025-11-30-rc"
    }
  ],
  "python": "3.14",
  "schema_version": "0.1.0",
  "sim-telarray": [
    {
      "hessio-source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/hessio.git",
      "hessio-version": "v2025-12-01-rc",
      "source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/sim_telarray.git",
      "stdtools-source-url": "https://gitlab.cta-observatory.org/cta-computing/dpps/simpipe/simulation_software/stdtools.git",
      "stdtools-version": "v2025-06-16-rc",
      "version": "v2025-11-30-rc"
    }
  ]
}

@GernotMaier GernotMaier added this to the v1.0.0 milestone Jul 23, 2026
@GernotMaier GernotMaier self-assigned this Jul 23, 2026
@GernotMaier GernotMaier added the Copilot review AI-supported Copilot review label Jul 23, 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

This PR introduces a centralized “dependency version catalog” in pyproject.toml and adds tooling to (1) export those declared versions for CI/Docker builds and (2) capture a runtime “dependency manifest” for provenance. It then rewires Dockerfiles and GitHub Actions workflows to consume these exported values, and extends sim_telarray metadata to embed provenance pointers.

Changes:

  • Added simtools.dependency_versions + simtools-dependency-versions to validate/export build matrices and version scalars from pyproject.toml.
  • Added dependency provenance manifest generation (simtools-dependency-manifest, manifest schema, digest sidecar) and wired it into container builds + metadata export.
  • Updated Dockerfiles, workflows, and documentation to use the catalog as the single source of truth.

Reviewed changes

Copilot reviewed 41 out of 41 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/unit_tests/test_dependency_versions.py Adds unit tests for catalog loading/validation, matrix generation, and exports.
tests/unit_tests/test_dependencies.py Adds unit tests for dependency manifest reading/building/digesting and build-info export changes.
tests/unit_tests/configuration/test_argument_helpers.py Updates build-info CLI action test to assert logging-based output.
tests/unit_tests/applications/test_dependency_versions_application.py Tests the new dependency-versions CLI application behavior.
tests/unit_tests/applications/test_dependency_manifest.py Tests the new dependency-manifest CLI application behavior.
tests/unit_tests/application/test_control.py Adjusts version-info test behavior when build options are missing.
src/simtools/simtel/simtel_config_writer.py Adds dependency provenance metadata and filters which build options become sim_telarray metadata.
src/simtools/schemas/sim_telarray_meta_parameters.schema.yml Registers new provenance-related metadata keys.
src/simtools/schemas/dependency_versions.schema.yml Introduces a schema for the dependency version catalog.
src/simtools/schemas/dependency_manifest.schema.yml Introduces a schema for the dependency provenance manifest.
src/simtools/dependency_versions.py Implements catalog discovery/validation/export, matrices, and requirements export.
src/simtools/dependencies.py Implements manifest building/reading/digesting + richer build-info export.
src/simtools/configuration/argument_helpers.py Switches build-info action output from print to logger + dependency summary.
src/simtools/applications/dependency_versions.py Adds simtools-dependency-versions application wrapper with standalone mode.
src/simtools/applications/dependency_manifest.py Adds simtools-dependency-manifest application to write provenance manifests.
src/simtools/application/control.py Continues version-info logging even if build options file is missing.
pyproject.toml Adds scripts, adds packaging, and adds [tool.gammasimtools.dependency-versions] catalog content.
MANIFEST.in Includes *.yml under src so schemas ship in sdists.
docs/source/user-guide/applications/simtools-dependency-versions.md Documents the new dependency-versions application.
docs/source/user-guide/applications/simtools-dependency-manifest.md Documents the new dependency-manifest application.
docs/source/user-guide/applications.md Adds both new applications to the user-guide toctree.
docs/source/developer-guide/simtools_build_images.md Updates image-build guidance to use the catalog exporter.
docs/source/developer-guide/release.md Adds release-candidate guidance around validating the catalog/immutability.
docs/source/developer-guide/index.md Adds developer-guide entry for dependency versions/provenance docs.
docs/source/developer-guide/dependency_versions.md New developer documentation on catalog vs manifest and workflows.
docs/source/data-model/sim_telarray_metadata.md Documents the new software-provenance metadata fields and intent.
docs/source/api-reference/dependencies.md Adds API reference entry for simtools.dependency_versions.
docker/README.md Updates documentation links for container build + dependency version/provenance docs.
docker/Dockerfile-simtools-prod Removes embedded version defaults; installs from checkout + writes manifest during build.
docker/Dockerfile-simtools-dev Uses catalog-exported requirements; generates dev manifest in-image.
docker/Dockerfile-simtel_array Parameterizes versions/URLs/revisions/checksums; records build provenance in build_opts.
docker/Dockerfile-corsika7 Parameterizes versions/URLs/revisions/checksums; records provenance in build_opts.
.github/workflows/CI-software-update.yml Renames automated update branch/title/commit metadata.
.github/workflows/CI-linter.yml Validates dependency catalog summary output; adds pip check.
.github/workflows/CI-integrationtests.yml Reads interaction-tables version from the catalog export.
.github/workflows/build-simtools-prod.yml Introduces dependency-config job and drives build args/matrices from catalog export; adds provenance artifact.
.github/workflows/build-simtools-dev.yml Introduces dependency-config job and drives dev image build args from catalog export.
.github/workflows/build-sim_telarray.yml Introduces dependency-config job and drives sim_telarray builds from catalog export.
.github/workflows/build-corsika7.yml Introduces dependency-config job; downloads/validates auxiliary artifacts; separates CORSIKA source acquisition.
.env_template Aligns default model version formatting with catalog conventions (no leading v).
.dockerignore Adds repository-level dockerignore for leaner build contexts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/source/user-guide/applications/simtools-dependency-manifest.md Outdated
Comment thread src/simtools/dependency_versions.py
Comment thread src/simtools/dependency_versions.py
Comment thread docker/Dockerfile-simtel_array
GernotMaier and others added 3 commits July 24, 2026 11:58
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ctao-sonarqube

Copy link
Copy Markdown

@GernotMaier
GernotMaier marked this pull request as ready for review July 24, 2026 12:11
@GernotMaier
GernotMaier merged commit 0c17d1e into main Jul 24, 2026
@GernotMaier
GernotMaier deleted the version-management branch July 24, 2026 12:15
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants