- Remember to always update the
Changelog.md
- Adjust the
Changelog.mdto the new version - Commit this change and make that commit the new version (using
git tag)
We need to ensure backward compatibility and thus we need to make some changes.
- Create a file
vX.pywith X the data version (analogous tov1.pyandv2.py) insrc/eko/io. - Make the corresponding changes to
metadata.pyandstruct.py(also insrc/eko/io). - Modify
src/eko/version.pyto the new data version. - During the development of this new data version (i.e. until the moment the data version breaks again and we move to version X+1), fill up
vX.pywith all breaking changes. - Also implement these changes in the old
vX.pyscripts (at the moment these arev1.pyandv2.py).
Note: We call the unreleased eko version
v0.0. EKO's created with unpublished versions (0.0.0versions) are not part of this backward compatibility system. They have version0.0.0-post.{distance}+{commit hash}and they cannot necessarily be read by newer eko versions.
Using unit tests we check if eko handles legacy EKO's in the correct way. When we move to a new eko version, it is important to keep these test assets up to date.
In the directory tests/data, you will find the script assets.sh that downloads the currently existing test assets from the NNPDF server.
The script is to be executed in the root directory of the repository. Currently, these assets are only older and current eko objects, which we test for readability. The number of versions here determines how backward compatible we are. The eko objects must all correspond to the LO FFNS Les Houches benchmark.
To generate a new file, proceed as follows:
-
Invoke the benchmark This can be easily achieved with Poe. Execute (in the repo root dir):
poe lha -m "ffns and lo" -
Move the generated object locally The above command will create a file in
benchmarks/data/. Move the file totests/data, call itvX.tar, and include it into the unit tests (consider both Rust and Python). -
Upload the new file to the server This can be done, e.g., with
scp:scp vX.tar nnpdf@data.nnpdf.science:WEB/eko/test-data
Note that this may overwrite an existing file, so be sure about what you're doing! If necessary, add the file to the list in this script.
-
Update the data version in the workflows Update both Rust and Python workflows by incrementing the data version, so the new files are also triggered in the CI.
Finally, you can test the compatibility of your eko version and the test assets in the usual way with pytest, specifically with the test_legacy.py script.