Skip to content

Baseband analysis container maintenance work flow

Continuous integration tests

Upon opening and merging a PR to main, the automated tests start running. Here is the CI workflow file, and here are the dependencies being installed.

First, pre-commit is automatically run. (The checks are autoflake, black, and isort.)

Then, two containers are spawned simultaneously: one hosted by GitHub Actions, and the other hosted on-site at DRAO. The pytest tests run on GHA should be pretty quick. All tests with the --runslow flag are hosted on-site.

The tests with --runslow should take ~35 minutes to run.

Coverage is poor, so folks developing on baseband-analysis should write unit tests to ensure their changes don't break anything downstream.

Docker containers

Once a PR is merged into main, an automated PR opens starting with release-please.

  • Note: the automated PR is only triggered with commits that follow commitizen format. If you want your changes to be reflected in the release notes for the next baseband-analysis version, your commit messages should follow commitizen format, eg fix(scope): brief details or feat(scope): brief details. Here's an example of what the release notes/change logs then nicely look like: changelog-screenshot

To merge the release-please-- PR into main, the PR should require review from someone. Once the release-please-- branch is merged into main, the images chimefrb/baseband-analysis:latest and chimefrb/baseband-headless:latest is automatically built and pushed to both dockerhub and CANFAR. (The former is for running the pipeline on-site and doing analysis in Jupyterlab on CANFAR, and the latter is for spawning headless jobs with the baseband localization pipeline at CANFAR.) The "version" of baseband-analysis is also automatically bumped up.

Once in a blue moon, the continuous deployment job for updating the images at CANFAR fails while merging the release-please-- PR (e.g., timeout issues). Since the containers should have no problem being updated on site with this deployment job, the baseband analysis containers at CANFAR can also be updated manually:

Text Only
# build the baseband-analysis docker image
docker image pull chimefrb/baseband-analysis:latest
docker tag chimefrb/baseband-analysis:latest images.canfar.net/chimefrb/baseband-headless:latest
# log into canfar with your username and CLI secret
docker login images.canfar.net
# push image to canfar
docker push images.canfar.net/chimefrb/baseband-headless:latest

Your CLI secret can be found by logging in at https://images.canfar.net/ and going to your profile.

The on-site containers can of course can be updated manually as well (rebuild the docker image from the dockerfile, tag and push, etc...), but we strongly recommend against this to avoid breaking changes, unless you specifically tag it as a testing/custom/dev version.

This overall process hopefully ensures some robustness against changes into main not accidentally breaking the (hopefully) stably running pipelines/containers on site/CANFAR.