Skip to content

Updating packages

Zachary Prince edited this page Mar 18, 2025 · 8 revisions

The management of versions for distributed packages (apptainer and conda) is done through the Versioner script at scripts/versioner.py. The configuration for the versions is found in scripts/versioner.yaml.

Process

First, make the changes to the necessary files that the packages utilize and commit them. Such changes are:

  • A submodule (example: libmesh, petsc, wasp)
  • An apptainer definition file (example: apptainer/moose-dev.def)
  • A conda package meta configuration (example: conda/tools/meta.yaml.template)

Modify the version (and sometimes build number) for the packages that you have modified within scripts/versioner.yaml. If you modify a package that also has other packages that depend on it (note the comment above each package in versioner.yaml about "dependers"), you will also need to bump the versions for those dependent packages. Commit this change to versioner.yaml with message describing what packages are changed.

The version of each conda package is determined through a templating process. That is, there is no longer a need to modify the meta.yaml and conda_build_config.yaml entries by hand for every change. Once you have committed the changes above (changed files and versions in scripts/versioner.yaml), you need to update the conda configuration files from the automated templating process. To do this, run:

./scripts/versioner.py --build-templates

from the MOOSE repository root. Then, run:

git status

to note the conda configuration changes that have been modified. Add these files and amend the previous commit with them:

git commit --amend --no-edit

At this point you should have a commit structure that looks like this:

> git log --oneline
a32sdf8a14 Bumping something and something (modifications to versioner.yaml and packages' meta.yaml and conda_build_config.yaml)
2d1asf66a5 Changes to package requiring version bump
...

At this point, the package modification and update should be complete. Run (you should change upstream to whatever remote contains idaholab/moose)

./scripts/versioner.py --verify upstream/master

to inspect the changes to packages that have been made. This verification step is split into two pieces: checking the state of the templated files and checking the state of the versions. Common errors you will see are listed below:

  • Within the template summary, if any of the statuses are noted as BEHIND in red, you need to redo and re-commit the --build-templates step.
  • Within the version summary, if any of the status are noted as NEED BUMP in red, you failed to bump the version of that package within scripts/versioner.yaml.

Once the verification step reports no errors (exit code 0, no red text), you need to update the test suite with these new versions. The tests for the Versioner script include testing known hashes to ensure that the script is working properly for old versions.

Run the following:

./scripts/versioner.py --summary

You should see output in the form of YAML. Take this output and paste it to the end of scripts/tests/versioner_hashes.yaml. If possible, append the PR number that your changes are a part of as a comment to the 40 character hash (scroll up in versioner_hashes.yaml for an example). Commit this change separately.

Clone this wiki locally