Skip to content

Commit 9f4549c

Browse files
authored
Merge pull request #66 from scikit-hep/je_add_multidim_hypotest
Upgrade to multiple dimensions and binned PDFs
2 parents c70c31f + d50fb77 commit 9f4549c

33 files changed

+1664
-611
lines changed

.github/workflows/auto-cancellation.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 87 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,40 @@ on:
66
branches: [ "master"]
77
release:
88
types:
9-
- "published"
9+
- "published"
1010

1111
jobs:
12+
cancel:
13+
name: 'Cancel Previous Runs'
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 3
16+
steps:
17+
- uses: styfle/[email protected]
18+
with:
19+
all_but_latest: true
20+
access_token: ${{ github.token }}
21+
1222
pre-commit:
1323
name: Format
1424
runs-on: ubuntu-latest
1525
steps:
16-
- uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
19-
- uses: actions/setup-python@v4
26+
- uses: actions/checkout@v3
27+
with:
28+
fetch-depth: 0
29+
- uses: actions/setup-python@v4
2030

2131
checks:
2232
runs-on: ${{ matrix.os }}
2333
strategy:
2434
fail-fast: false
2535
matrix:
2636
os:
27-
- ubuntu-latest
37+
- ubuntu-latest
2838
python-version:
29-
- "3.7"
30-
- "3.8"
31-
- "3.9"
32-
- "3.10"
39+
- "3.7"
40+
- "3.8"
41+
- "3.9"
42+
- "3.10"
3343
include:
3444
- os: windows-latest
3545
python-version: "3.7"
@@ -41,87 +51,87 @@ jobs:
4151
python-version: "3.10"
4252
name: Check Python ${{ matrix.python-version }} ${{ matrix.os }}
4353
steps:
44-
- uses: actions/checkout@v3
45-
with:
46-
fetch-depth: 0
47-
48-
- name: Setup Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v4
50-
with:
51-
python-version: ${{ matrix.python-version }}
52-
53-
- name: Install package
54-
run: python -m pip install -e .[test]
55-
56-
- name: Test package
57-
run: python -m pytest --doctest-modules --cov=hepstats --cov-report=xml
58-
59-
- name: Upload coverage to Codecov
60-
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
61-
uses: codecov/codecov-action@v3
62-
with:
63-
file: ./coverage.xml
64-
flags: unittests
65-
name: codecov-umbrella
66-
fail_ci_if_error: true
54+
- uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Setup Python ${{ matrix.python-version }}
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: ${{ matrix.python-version }}
62+
63+
- name: Install package
64+
run: python -m pip install -e .[test]
65+
66+
- name: Test package
67+
run: python -m pytest --doctest-modules --cov=hepstats --cov-report=xml
68+
69+
- name: Upload coverage to Codecov
70+
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
71+
uses: codecov/codecov-action@v3
72+
with:
73+
file: ./coverage.xml
74+
flags: unittests
75+
name: codecov-umbrella
76+
fail_ci_if_error: true
6777

6878
dist:
6979
runs-on: ubuntu-latest
7080
steps:
71-
- uses: actions/checkout@v3
72-
with:
73-
fetch-depth: 0
81+
- uses: actions/checkout@v3
82+
with:
83+
fetch-depth: 0
7484

75-
- name: Build
76-
run: pipx run build
85+
- name: Build
86+
run: pipx run build
7787

78-
- uses: actions/upload-artifact@v3
79-
with:
80-
path: dist/*
88+
- uses: actions/upload-artifact@v3
89+
with:
90+
path: dist/*
8191

82-
- name: Check metadata
83-
run: pipx run twine check dist/*
92+
- name: Check metadata
93+
run: pipx run twine check dist/*
8494

8595
docs:
8696
runs-on: ubuntu-latest
8797
steps:
88-
- uses: actions/checkout@v3
89-
with:
90-
fetch-depth: 0
91-
- uses: actions/setup-python@v4
92-
with:
93-
python-version: "3.10"
94-
- name: Install dependencies
95-
run: |
96-
pip install -U -q -e .[docs]
97-
pip list
98-
- name: build docs
99-
run: |
100-
sphinx-build -b html docs docs/_build/html
101-
touch docs/_build/html/.nojekyll
102-
103-
- name: Deploy docs to GitHub Pages
104-
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
105-
uses: peaceiris/actions-gh-pages@v3
106-
with:
107-
github_token: ${{ secrets.GITHUB_TOKEN }}
108-
publish_dir: docs/_build/html
109-
force_orphan: true
110-
user_name: 'github-actions[bot]'
111-
user_email: 'github-actions[bot]@users.noreply.github.com'
112-
commit_message: Deploy to GitHub pages
98+
- uses: actions/checkout@v3
99+
with:
100+
fetch-depth: 0
101+
- uses: actions/setup-python@v4
102+
with:
103+
python-version: "3.10"
104+
- name: Install dependencies
105+
run: |
106+
pip install -U -q -e .[docs]
107+
pip list
108+
- name: build docs
109+
run: |
110+
sphinx-build -b html docs docs/_build/html
111+
touch docs/_build/html/.nojekyll
112+
113+
- name: Deploy docs to GitHub Pages
114+
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
115+
uses: peaceiris/actions-gh-pages@v3
116+
with:
117+
github_token: ${{ secrets.GITHUB_TOKEN }}
118+
publish_dir: docs/_build/html
119+
force_orphan: true
120+
user_name: 'github-actions[bot]'
121+
user_email: 'github-actions[bot]@users.noreply.github.com'
122+
commit_message: Deploy to GitHub pages
113123

114124
publish:
115-
needs: [dist]
125+
needs: [ dist ]
116126
runs-on: ubuntu-latest
117127
if: github.event_name == 'release' && github.event.action == 'published'
118128

119129
steps:
120-
- uses: actions/download-artifact@v3
121-
with:
122-
name: artifact
123-
path: dist
124-
125-
- uses: pypa/[email protected]
126-
with:
127-
password: ${{ secrets.pypi_password }}
130+
- uses: actions/download-artifact@v3
131+
with:
132+
name: artifact
133+
path: dist
134+
135+
- uses: pypa/[email protected]
136+
with:
137+
password: ${{ secrets.pypi_password }}

.pre-commit-config.yaml

Lines changed: 87 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,99 @@
11
repos:
2-
- repo: https://github.com/psf/black
3-
rev: 22.8.0
4-
hooks:
5-
- id: black
6-
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.3.0
8-
hooks:
9-
- id: check-added-large-files
10-
args: [ '--maxkb=1000' ]
11-
- id: mixed-line-ending
12-
exclude: ^notebooks/
13-
- id: trailing-whitespace
14-
exclude: ^notebooks/
15-
- id: check-merge-conflict
16-
- id: check-case-conflict
17-
- id: check-symlinks
18-
- id: check-yaml
19-
exclude: ^notebooks/
20-
- id: requirements-txt-fixer
21-
- id: debug-statements
22-
- id: end-of-file-fixer
23-
- repo: https://github.com/mgedmin/check-manifest
24-
rev: "0.48"
25-
hooks:
26-
- id: check-manifest
27-
args: [ --update, --no-build-isolation ]
28-
additional_dependencies: [ setuptools-scm ]
29-
- repo: https://github.com/pre-commit/mirrors-mypy
30-
rev: v0.971
31-
hooks:
32-
- id: mypy
33-
files: src
2+
- repo: https://github.com/psf/black
3+
rev: 22.6.0
4+
hooks:
5+
- id: black
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.3.0
8+
hooks:
9+
- id: check-added-large-files
10+
args: ['--maxkb=1000']
11+
- id: mixed-line-ending
12+
exclude: ^notebooks/
13+
- id: trailing-whitespace
14+
exclude: ^notebooks/
15+
- id: check-merge-conflict
16+
- id: check-case-conflict
17+
- id: check-symlinks
18+
- id: check-yaml
19+
exclude: ^notebooks/
20+
- id: requirements-txt-fixer
21+
- id: debug-statements
22+
- id: end-of-file-fixer
23+
- repo: https://github.com/mgedmin/check-manifest
24+
rev: "0.48"
25+
hooks:
26+
- id: check-manifest
27+
args: [ --update, --no-build-isolation ]
28+
additional_dependencies: [ setuptools-scm ]
29+
- repo: https://github.com/pre-commit/mirrors-mypy
30+
rev: v0.971
31+
hooks:
32+
- id: mypy
33+
files: src
3434

35-
- repo: https://github.com/pre-commit/pygrep-hooks
36-
rev: v1.9.0
37-
hooks:
38-
- id: python-use-type-annotations
39-
- id: python-check-mock-methods
40-
- id: python-no-eval
41-
- id: rst-backticks
42-
- id: rst-directive-colons
35+
- repo: https://github.com/roy-ht/pre-commit-jupyter
36+
rev: v1.2.1
37+
hooks:
38+
- id: jupyter-notebook-cleanup
4339

44-
- repo: https://github.com/asottile/pyupgrade
45-
rev: v2.37.3
46-
hooks:
47-
- id: pyupgrade
48-
args: [ --py37-plus ]
40+
- repo: https://github.com/pre-commit/pygrep-hooks
41+
rev: v1.9.0
42+
hooks:
43+
- id: python-use-type-annotations
44+
- id: python-check-mock-methods
45+
- id: python-no-eval
46+
- id: rst-backticks
47+
- id: rst-directive-colons
4948

50-
- repo: https://github.com/asottile/setup-cfg-fmt
51-
rev: v2.0.0
52-
hooks:
53-
- id: setup-cfg-fmt
49+
- repo: https://github.com/asottile/pyupgrade
50+
rev: v2.37.3
51+
hooks:
52+
- id: pyupgrade
53+
args: [ --py37-plus ]
5454

55-
# Notebook formatting
56-
- repo: https://github.com/nbQA-dev/nbQA
57-
rev: 1.4.0
58-
hooks:
59-
- id: nbqa-isort
60-
additional_dependencies: [ isort==5.6.4 ]
55+
- repo: https://github.com/asottile/setup-cfg-fmt
56+
rev: v2.0.0
57+
hooks:
58+
- id: setup-cfg-fmt
6159

62-
- id: nbqa-pyupgrade
63-
additional_dependencies: [ pyupgrade==2.7.4 ]
64-
args: [ --py37-plus ]
60+
# Notebook formatting
61+
- repo: https://github.com/nbQA-dev/nbQA
62+
rev: 1.4.0
63+
hooks:
64+
- id: nbqa-isort
65+
additional_dependencies: [ isort==5.6.4 ]
6566

67+
- id: nbqa-pyupgrade
68+
additional_dependencies: [ pyupgrade==2.7.4 ]
69+
args: [ --py37-plus ]
6670

67-
- repo: https://github.com/roy-ht/pre-commit-jupyter
68-
rev: v1.2.1
69-
hooks:
70-
- id: jupyter-notebook-cleanup
7171

72-
- repo: https://github.com/sondrelg/pep585-upgrade
73-
rev: 'v1.0'
74-
hooks:
75-
- id: upgrade-type-hints
76-
args: [ '--futures=true' ]
72+
- repo: https://github.com/roy-ht/pre-commit-jupyter
73+
rev: v1.2.1
74+
hooks:
75+
- id: jupyter-notebook-cleanup
7776

78-
- repo: https://github.com/shssoichiro/oxipng
79-
rev: acdd66b4c5a5fda8b08281ad9b3216327b6847b4
80-
hooks:
81-
- id: oxipng
77+
- repo: https://github.com/sondrelg/pep585-upgrade
78+
rev: 'v1.0'
79+
hooks:
80+
- id: upgrade-type-hints
81+
args: [ '--futures=true' ]
8282

83-
- repo: https://github.com/dannysepler/rm_unneeded_f_str
84-
rev: v0.1.0
85-
hooks:
86-
- id: rm-unneeded-f-str
83+
- repo: https://github.com/shssoichiro/oxipng
84+
rev: acdd66b4c5a5fda8b08281ad9b3216327b6847b4
85+
hooks:
86+
- id: oxipng
8787

88-
- repo: https://github.com/python-jsonschema/check-jsonschema
89-
rev: 0.18.2
90-
hooks:
91-
- id: check-github-workflows
92-
- id: check-github-actions
93-
- id: check-dependabot
94-
- id: check-readthedocs
88+
- repo: https://github.com/dannysepler/rm_unneeded_f_str
89+
rev: v0.1.0
90+
hooks:
91+
- id: rm-unneeded-f-str
92+
93+
- repo: https://github.com/python-jsonschema/check-jsonschema
94+
rev: 0.18.2
95+
hooks:
96+
- id: check-github-workflows
97+
- id: check-github-actions
98+
- id: check-dependabot
99+
- id: check-readthedocs

0 commit comments

Comments
 (0)