Skip to content

Commit 41515e6

Browse files
committed
chore: add hist session to noxfile
1 parent 32ad9e6 commit 41515e6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

noxfile.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,28 @@ def tests(session: nox.Session) -> None:
1818
session.run("pytest", *session.posargs)
1919

2020

21+
@nox.session
22+
def hist(session: nox.Session) -> None:
23+
"""
24+
Run Hist's test suite
25+
"""
26+
shutil.rmtree("build", ignore_errors=True)
27+
session.install(".")
28+
tmpdir = session.create_tmp()
29+
session.chdir(tmpdir)
30+
session.run("git", "clone", "https://github.com/scikit-hep/hist", external=True)
31+
session.chdir("hist")
32+
with open("setup.cfg", encoding="utf-8") as f:
33+
lines = f.readlines()
34+
with open("setup.cfg", "w", encoding="utf-8") as f:
35+
for line in lines:
36+
if "boost-histogram" not in line:
37+
f.write(line)
38+
39+
session.install(".[test,plot]")
40+
session.run("pytest", *session.posargs)
41+
42+
2143
@nox.session
2244
def docs(session: nox.Session) -> None:
2345
"""

0 commit comments

Comments
 (0)