Skip to content

Commit

Permalink
build: Remove installation of backends from 'test' extra (#2373)
Browse files Browse the repository at this point in the history
* Remove the 'all' extra from the 'test' extra installs and add 'all' to 
  the 'develop' extra.
* Add the 'all' extra to all install commands that also install the 'test' extra.
  • Loading branch information
matthewfeickert authored Nov 2, 2023
1 parent 6a347f4 commit 78d9cc2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- 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 Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- 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 Down
12 changes: 6 additions & 6 deletions .github/workflows/dependencies-head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- 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 Down Expand Up @@ -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 @@ -88,7 +88,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 iminuit
python -m pip install --upgrade cython
python -m pip install --upgrade git+https://github.com/scikit-hep/iminuit.git
Expand All @@ -114,7 +114,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 uproot
python -m pip install --upgrade git+https://github.com/scikit-hep/uproot5.git
python -m pip list
Expand All @@ -141,7 +141,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 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 Down Expand Up @@ -176,7 +176,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 pytest
python -m pip install --upgrade git+https://github.com/pytest-dev/pytest.git
python -m pip list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lower-bound-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- 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
2 changes: 1 addition & 1 deletion .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
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
6 changes: 3 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def tests(session):
$ nox --session tests --python 3.11 -- tests/test_tensor.py # run specific tests
$ nox --session tests --python 3.11 -- coverage # run with coverage but slower
"""
session.install("--upgrade", "--editable", ".[test]")
session.install("--upgrade", "--editable", ".[all,test]")
session.install("--upgrade", "pytest")

# Allow tests to be run with coverage
Expand Down Expand Up @@ -107,7 +107,7 @@ def regenerate(session):
"""
Regenerate Matplotlib images.
"""
session.install("--upgrade", "--editable", ".[test]")
session.install("--upgrade", "--editable", ".[all,test]")
session.install("--upgrade", "pytest", "matplotlib")
if not sys.platform.startswith("linux"):
session.error(
Expand Down Expand Up @@ -182,7 +182,7 @@ def notebooks(session: nox.Session):
"""
Run the notebook tests.
"""
session.install("--upgrade", "--editable", ".[test]")
session.install("--upgrade", "--editable", ".[all,test]")
session.run(
"pytest",
"--override-ini",
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ all = ["pyhf[backends,xmlio,contrib,shellcomplete]"]

# Developer extras
test = [
"pyhf[all]",
"scikit-hep-testdata>=0.4.11",
"pytest>=6.0",
"coverage[toml]>=6.0.0",
Expand Down Expand Up @@ -121,7 +120,7 @@ docs = [
"ipython!=8.7.0", # c.f. https://github.com/scikit-hep/pyhf/pull/2068
]
develop = [
"pyhf[test,docs]",
"pyhf[all,test,docs]",
"tbump>=6.7.0",
"pre-commit",
"nox",
Expand Down

0 comments on commit 78d9cc2

Please sign in to comment.