Tutorials For Developers¶
Some tutorials for developers.
How To Do A Release¶
Write down the release_notes:
in rST format:
realeas_notes_XYZ.rstStart with a summary Main Changes (TL;DR version of the whole file)
add all issues and PR related references
add list of contributors
add list of perspectives and tag contributors
Release an alpha version:
Create an annotaded tag (do not use GitHub’s release system)
git tag -a X.Y.Z-alpha0 -m "annotation"Update the version of the repo:
python -c "import _updateversion as up; out = up.updateversion(); print(out)"push on GitHub server
Verify that ONE build passes on travis: the deployment on conda should pass for all travis-build, but for pypi only the first build will pass
Install it locally on all available platforms and environments (by hand), with all different packaging tools. And try some tests.
Easybuild: try to create a tarball for Jira machines
For IRFM servers, build the conda_recipe by hand:
$ if [[ "$TRAVIS_PYTHON_VERSION" == "3.7-dev" ]]; then export VADD="py37"; else export VADD="py36"; fi $ export CONDA_BLD_PATH=$(pwd)/conda-bld/ # you should be in the tofu dir $ export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") $ export VERSION=$(echo $REV | tr - .) $ echo $REV
Update the
releases.rstfile in the web documentation:create a symbolic link from
$TOFU_DIR/release_notes/release_notes_XYZ.rstto$TOFU_DIR/doc/source/release_notes/release_notes_XYZ.rstUpdate the
.rstfileMake and publish doc (see tutorial below)
Release the real version:
Follow the same steps as for alpha version, just change the tag and annotation.
Send an email to users.
How To Construct The Doc¶
Adding text, updating the API:
The easiest way is to have two different repo:
$TOFU_DIR, for building the doc and$TOFU_DIR/../test_doc/tofu/for seeing the resulting html (always in thegh-pagesbranch)If updating the API, make sure that you have installed the right version of tofu
Change to the
new-docbranchGo to
$ cd $TOFU_DIR/doc/Modify the corresponding file (somewhere in
src/a-file.rst)If you added a file
sphinx-apidoc -Mf -P -d 5 -o source/ ../tofu/ {../*test*,../*mag*,../*imas2tofu*,../*geom/inputs}$ make clean(to make sure only the needed files will be stored)$ make htmlGo to the
gh-pagesbranch and open theindex.htmlfile (from the top)Commit and push the changes to the
new-docbranch: to keep the changes in the sourcesCommit and push the changes to the
gh-pages, this will update the website.
Adding a tutorial:
Add your tutorial in
$TOFU_DIR/examples/tutorialswith the proper naming conventionsThe sphinx gallery is automatically updated when building the doc (as above)
Change the
index.rstfile to include a thumbnail of your tutorial