Skip to content

Commit

Permalink
Merge branch 'main' into autodiff-uncerts
Browse files Browse the repository at this point in the history
  • Loading branch information
phinate authored Apr 23, 2024
2 parents d3142fc + 64ab264 commit 5d3d3d6
Show file tree
Hide file tree
Showing 86 changed files with 866 additions and 430 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ updates:
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
labels:
- "github-actions"
- "dependencies"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ jobs:
echo "steps.script.outputs.old_tag=v${current_tag}"
echo "old_tag=v${current_tag}" >> $GITHUB_OUTPUT
- name: Set up Python 3.11
- name: Set up Python 3.12
if: success()
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install Python dependencies
run: |
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI on Windows

on:
# Run daily at 1:23 UTC
schedule:
- cron: '23 1 * * *'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade '.[all,test]'
- name: List installed Python packages
run: python -m pip list

- name: Test with pytest and coverage
# FIXME: ignore tests/test_scripts.py as runner breaks on Windows currently
run: |
coverage run --module pytest --ignore tests/test_scripts.py --ignore tests/contrib --ignore tests/benchmarks --ignore tests/test_notebooks.py
- name: Coverage report for core project
run: |
coverage report
coverage xml
34 changes: 22 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,26 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
- os: macos-latest
python-version: '3.11'
python-version: '3.12'
# Apple silicon runner
- os: macos-14
python-version: '3.12'

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade .[test]
python -m pip install --upgrade ".[all,test]"
- name: List installed Python packages
run: python -m pip list
Expand All @@ -66,10 +69,12 @@ jobs:
if: >-
github.event_name != 'schedule' &&
matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}

- name: Test Contrib module with pytest
run: |
Expand All @@ -81,30 +86,35 @@ jobs:
coverage xml
- name: Report contrib coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.xml
flags: contrib
token: ${{ secrets.CODECOV_TOKEN }}

- name: Test docstring examples with doctest
if: matrix.python-version == '3.11'
# TODO: Don't currently try to match amd64 and arm64 floating point for docs, but will in the future.
if: matrix.python-version == '3.12' && matrix.os != 'macos-14'
run: coverage run --data-file=.coverage-doctest --module pytest src/ README.rst

- name: Coverage report for doctest only
if: matrix.python-version == '3.11'
if: matrix.python-version == '3.12' && matrix.os != 'macos-14'
run: |
coverage report --data-file=.coverage-doctest
coverage xml --data-file=.coverage-doctest -o doctest-coverage.xml
- name: Report doctest coverage with Codecov
if: github.event_name != 'schedule' && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
if: github.event_name != 'schedule' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: doctest-coverage.xml
flags: doctest
token: ${{ secrets.CODECOV_TOKEN }}

- name: Run benchmarks
if: github.event_name == 'schedule' && matrix.python-version == '3.11'
if: github.event_name == 'schedule' && matrix.python-version == '3.12'
run: |
pytest --benchmark-sort=mean tests/benchmarks/test_benchmark.py
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: python
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -35,4 +35,4 @@ jobs:
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
36 changes: 18 additions & 18 deletions .github/workflows/dependencies-head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade --pre .[test]
python -m pip --no-cache-dir --quiet install --upgrade --pre ".[all,test]"
python -m pip list
- name: List release candidates, alpha, and beta releases
Expand All @@ -47,13 +47,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -62,7 +62,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade .[test]
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]"
python -m pip uninstall --yes scipy
python -m pip install --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy
python -m pip list
Expand All @@ -77,18 +77,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade .[test]
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]"
python -m pip uninstall --yes iminuit
python -m pip install --upgrade cython
python -m pip install --upgrade git+https://github.com/scikit-hep/iminuit.git
Expand All @@ -103,18 +103,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade .[test]
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]"
python -m pip uninstall --yes uproot
python -m pip install --upgrade git+https://github.com/scikit-hep/uproot5.git
python -m pip list
Expand All @@ -128,20 +128,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade .[test]
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]"
python -m pip uninstall --yes matplotlib
# Need to use --extra-index-url as dependencies aren't on scientific-python-nightly-wheels package index.
# Need to use --pre as dev releases will need priority over stable releases.
Expand All @@ -165,18 +165,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade .[test]
python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]"
python -m pip uninstall --yes pytest
python -m pip install --upgrade git+https://github.com/pytest-dev/pytest.git
python -m pip list
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install Python dependencies
run: |
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
done
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/_build/html'

Expand All @@ -113,8 +113,8 @@ jobs:

steps:
- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v5

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/lower-bound-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies and force lowest bound
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir install --constraint tests/constraints.txt .[test]
python -m pip --no-cache-dir install --constraint tests/constraints.txt ".[all,test]"
- name: List installed Python packages
run: python -m pip list
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
# FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104
python -m pip install --upgrade .[test] 'jupyter-client<8.0.0'
python -m pip install --upgrade ".[all,test]" 'jupyter-client<8.0.0'
- name: List installed Python packages
run: python -m pip list
Expand Down
Loading

0 comments on commit 5d3d3d6

Please sign in to comment.