CI configuration¶
IMAS-Python uses ITER Bamboo for CI. This page provides an overview of the CI Plan and deployment projects.
CI Plan¶
The IMAS-Python CI plan consists of 4 types of jobs:
- Linting and DD ZIP
This job is responsible for three things:
Verify that the
IDSDef2MDSplusPreTree.xslfile matches the one in the Access Layer repository. This file is required for building MDSplus models and the models built by IMAS-Python should match those built by the Access Layer.Linting: run
blackandflake8on the IMAS-Python code base. See Code style and linting.Build the Data Dictionary zip file. This Task builds the Data Dictionary for all tagged releases since DD version
3.22.0. These are combined into theIDSDef.zipfile, which is distributed with IMAS-Python.The ZIP file is built in a separate job, such that the subsequent test jobs can reuse this.
The CI scripts executed in this job are:
ci/linting.shci/build_dd_zip.sh
- Test with AL<version>
This runs all unit tests with pytest. Access Layer version that we test against: IMAS-AL-Core/5.4.3-intel-2023b
The CI script executed in this job is
ci/run_pytest.sh, which expects the modules it needs to load as arguments.Cloning this job to test against a new AL version is easy:
On the “Default plan configuration” page of Bamboo, click “+ Add job” and select the option to “Clone an existing job”.
Select one of the existing Test jobs.
Indicate the new AL version in the job name.
Click Create job
In the “Script” Task, update the module(s) in the Argument field
- Benchmark
This job runs the ASV benchmarks on the CI server. It is configured such that it can only run on a single CI agent (io-ls-bamboowk6.iter.org). There are two reasons for this:
Simplify the data I/O of the script - we can avoid file locks because there will only be a single Benchmark Job running globally. This is the main reason.
Benchmarks should be more reproduceable when always run on the same machine. Although the agents are virtualized, so the performance will always depend to some extent to the load on the CI cluster.
The CI script executed in this job is:
ci/run_benchmark.sh.- Build docs and dists
This job builds the Sphinx documentation and python packages for IMAS-Python (
sdistandwheel).The CI script executed in this job is:
ci/build_docs_and_dist.sh.
Deployment projects¶
There is github workflow for IMAS-Python:
- IMAS-Python-PyPi
Deploy the python packages job to the https://pypi.org/ server and https://test.pypi.org/ server. You can find link here : IMAS-Python
- Deploy IMAS-Python-doc
Deploy the documentation using readthedocs.