Skip to content

Commit

Permalink
update root version and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
HDembinski committed Aug 16, 2022
1 parent 3c0fa2b commit 7ddadb3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
29 changes: 12 additions & 17 deletions .ci/release_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import urllib.request
import json
import warnings
import sys

project_dir = PurePath(__file__).parent.parent
version_fn = project_dir / "src/iminuit/version.py"
Expand All @@ -17,27 +18,21 @@
iminuit_version = parse_version(version["version"])
if record:
raise ValueError(record[0].message)
root_version = version["root_version"]
documented_root = version["root_version"]

print("iminuit version:", iminuit_version)
print("root version:", root_version)
print("root version:", documented_root)

# check that root version is up-to-date
git_submodule = subp.check_output(
["git", "submodule", "status"], cwd=project_dir
).decode()
for item in git_submodule.strip().split("\n"):
parts = item.split()
if PurePath(parts[1]) != PurePath("extern") / "root":
continue

assert len(parts) == 3, "module is not checked out"

this_root_version = parts[2][1:-1] # strip braces

assert (
root_version == this_root_version
), f"ROOT version does not match: {root_version} != {this_root_version}"
actual_root = (
subp.check_output([sys.executable, project_dir / ".ci" / "root_version.py"])
.decode()
.strip()
)

assert (
documented_root == actual_root
), f"ROOT version mismatch: {documented_root} != {actual_root}"

# make sure that changelog was updated
with open(changelog_fn) as f:
Expand Down
19 changes: 19 additions & 0 deletions .ci/root_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import subprocess as subp
from pathlib import PurePath

project_dir = PurePath(__file__).parent.parent

# check that root version is up-to-date
git_submodule = subp.check_output(
["git", "submodule", "status"], cwd=project_dir
).decode()
for item in git_submodule.strip().split("\n"):
parts = item.split()
if PurePath(parts[1]) != PurePath("extern") / "root":
continue

assert len(parts) == 3, "module is not checked out"

this_root_version = parts[2][1:-1] # strip braces

print(this_root_version)
1 change: 1 addition & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changelog

2.16.0 (August 16, 2022)
------------------------
- Root update (`#786 <https://github.com/scikit-hep/iminuit/pull/786>`_)
- Fix corner case treatment of linear constraint (`#785 <https://github.com/scikit-hep/iminuit/pull/785>`_)
- Comparison with broadcasting (`#784 <https://github.com/scikit-hep/iminuit/pull/784>`_)
- Fix typing issues and enable mypy in pre-commit (`#783 <https://github.com/scikit-hep/iminuit/pull/783>`_)
Expand Down
2 changes: 1 addition & 1 deletion src/iminuit/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
version = "2.16.0"

# We list the corresponding ROOT version of the C++ Minuit2 library here
root_version = "v6-25-02-1013-ga4bb8f3342"
root_version = "v6-25-02-2017-gd0b406db5e"

0 comments on commit 7ddadb3

Please sign in to comment.