Skip to content

Commit b18cee3

Browse files
authored
Fix ROOT version in docs (#1043)
We opt for a manual update strategy for the ROOT version, because it changes slowly and an efficient way to do it automatically in CI is elusive. Instructions were added to the release.md instructions and conf.py in the doc folder. #### What is the problem with doing it in CI? Since the ROOT repo is huge, we want to make shallow clones for git submodules, but then we cannot determine the relation of the commit to the closest tag, because that history which connects tag and commit is not there. Checking out all tags with `git pull --tags` takes a lot of bandwidth, and is not enough. We also need to check out the history between the latest tag and the commit. We don't know which tag the commit is closest to, so the best way would be to iteratively load the most recent history until the commit is connected to a tag.
1 parent 47e4fe1 commit b18cee3

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

doc/conf.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import os
2-
from iminuit import __version__ as version
3-
import sys
42

5-
sys.path.append(".")
3+
# release and version are special variables used by sphinx
4+
from iminuit import __version__ as version
65

7-
from root_version import root_version # noqa
6+
# We set the root_version manually, because it setting it
7+
# automatically and efficiently in CI is difficult.
8+
# To update the number:
9+
# - Make sure you have a full clone, not a shallow clone of ROOT.
10+
# - Run `doc/root_version.py` and copy the string here.
11+
root_version = "v6-25-02-9213-g754d22635f"
812

9-
# release and version are special variables used by sphinx
1013

1114
with open("../README.rst") as f:
1215
readme_content = f.read()
@@ -49,6 +52,7 @@
4952
nbsphinx_execute = "auto"
5053
# use FAST=1 to speed up doc build
5154
if bool(os.environ.get("FAST", False)):
55+
print("Fast generation activated")
5256
nbsphinx_execute = "never"
5357

5458
autoclass_content = "both"

doc/release.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
How to make a release
2-
=====================
1+
# How to make a release
32

43
- Sync local `main` and `develop` with Github
4+
55
- `for x in main develop; git checkout $x; git pull`
6+
67
- On `develop` branch
8+
79
- Update version in `pyproject.toml`
810
- For a beta release, add `.betaN`, where N is a number >= 0
911
- For a release candidate, add `.rcN`
1012
- Run `python3 doc/update_changelog.py` or update `doc/changelog.rst` manually
1113
- Check the output if you used the script
14+
- If necessary, update ROOT version in `doc/conf.py`, see instructions there
15+
1216
- Merge `develop` into `main`
17+
1318
- Every push to `main` triggers building wheels, uploading to PyPI, and tagging/publishing on GitHub
1419
- If there are problems with the wheels, commit fixes to `develop`, then merge again into `main`
1520
- Note: Upload to PyPI uses API tokens configured in PyPI and Github "Secrets"

doc/root_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
.decode()
2626
.strip()
2727
)
28-
print("ROOT", root_version)
28+
print(root_version)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
55
[project]
66
name = "iminuit"
77
description = "Jupyter-friendly Python frontend for MINUIT2 in C++"
8-
version = "2.29.1"
8+
version = "2.30.0"
99
maintainers = [{ name = "Hans Dembinski", email = "hans.dembinski@gmail.com" }]
1010
readme = "README.rst"
1111
requires-python = ">=3.9"

0 commit comments

Comments
 (0)