-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Updating packages
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
.
First, make the changes to the necessary files that the packages utilize and stage them for a commit. 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
)
Within the same commit, 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 all of these changes together in a single commit, if possible.
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 commit them separately.
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/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.