From fea78346a7d9c214c28d3353d90607bee8879d9e Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 16 Feb 2024 14:34:18 -0600 Subject: [PATCH 01/20] Add uv to dev dependencies --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 7af3b92123..030e667aee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,6 +134,7 @@ develop = [ "pre-commit", "nox", "codemetapy>=2.3.0", + "uv>=0.1.2" ] [tool.hatch.version] From 02a891abc653c09299150976f33181fc177d3d59 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 16 Feb 2024 14:35:19 -0600 Subject: [PATCH 02/20] Ad uv to all pip install commands --- .github/workflows/bump-version.yml | 4 ++-- .github/workflows/ci-windows.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- .github/workflows/dependencies-head.yml | 24 +++++++++---------- .github/workflows/docs.yml | 4 ++-- .../workflows/lower-bound-requirements.yml | 2 +- .github/workflows/notebooks.yml | 4 ++-- .github/workflows/publish-package.yml | 4 ++-- .github/workflows/release_tests.yml | 8 +++---- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 8083fa8a43..625d9a1a72 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -204,8 +204,8 @@ jobs: - name: Install Python dependencies run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install tbump + python -m uv pip install --upgrade pip setuptools wheel + python -m uv pip install tbump python -m pip list - name: Setup Git user to push new tag diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index c9f3e8e68b..0721d8e44f 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -29,8 +29,8 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade '.[all,test]' + python -m uv pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade '.[all,test]' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d1c3f3217..69e4324c9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,8 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade ".[all,test]" + python -m uv pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 96f1863760..1d41748aa7 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel python -m pip --no-cache-dir --quiet install --upgrade --pre ".[all,test]" python -m pip list @@ -61,10 +61,10 @@ jobs: # c.f. https://twitter.com/ralfgommers/status/1419917265781334025 - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel 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 uv pip install --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list - name: Test with pytest @@ -87,11 +87,11 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel 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 + python -m uv pip install --upgrade cython + python -m uv pip install --upgrade git+https://github.com/scikit-hep/iminuit.git python -m pip list - name: Test with pytest run: | @@ -113,10 +113,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel 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 uv pip install --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list - name: Test with pytest run: | @@ -140,12 +140,12 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel 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. - python -m pip install \ + python -m uv pip install \ --upgrade \ --pre \ --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ @@ -175,10 +175,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel 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 uv pip install --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list - name: Test with pytest run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 155100d0ed..3eb24fcea2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,9 +28,9 @@ jobs: - name: Install Python dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel python -m pip --quiet install --upgrade .[docs,test] - python -m pip install yq + python -m uv pip install yq python -m pip list - name: Install apt-get dependencies diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index 96b5c6a3d8..1166fb2647 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies and force lowest bound run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel python -m pip --no-cache-dir install --constraint tests/constraints.txt ".[all,test]" - name: List installed Python packages diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 7ab2b048f8..55489ca09b 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -28,9 +28,9 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools wheel + python -m uv pip install --upgrade pip setuptools wheel # FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104 - python -m pip install --upgrade ".[all,test]" 'jupyter-client<8.0.0' + python -m uv pip install --upgrade ".[all,test]" 'jupyter-client<8.0.0' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index cd5d4a9ba7..37d9d2d9ee 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -43,8 +43,8 @@ jobs: - name: Install python-build and twine run: | - python -m pip install --upgrade pip - python -m pip install build twine + python -m uv pip install --upgrade pip + python -m uv pip install build twine python -m pip list - name: Build a sdist and wheel diff --git a/.github/workflows/release_tests.yml b/.github/workflows/release_tests.yml index 83b42ef02a..3c12f7a598 100644 --- a/.github/workflows/release_tests.yml +++ b/.github/workflows/release_tests.yml @@ -36,9 +36,9 @@ jobs: - name: Install from PyPI run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install --pre 'pyhf[backends,xmlio]' - python -m pip install pytest + python -m uv pip install --upgrade pip setuptools wheel + python -m uv pip install --pre 'pyhf[backends,xmlio]' + python -m uv pip install pytest python -m pip list - name: Canary test public API @@ -48,6 +48,6 @@ jobs: # FIXME: c.f. https://github.com/proycon/codemetapy/issues/24 - name: Verify requirements in codemeta.json run: | - python -m pip install jq "codemetapy>=2.3.0" + python -m uv pip install jq "codemetapy>=2.3.0" codemetapy --inputtype python --no-extras pyhf > codemeta_generated.json diff <(jq -S .softwareRequirements codemeta.json) <(jq -S .softwareRequirements codemeta_generated.json) From 8eee37a9b3a8825635c330b77dd1c9da40e20f5a Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 16 Feb 2024 14:39:35 -0600 Subject: [PATCH 03/20] install quiet too --- .github/workflows/dependencies-head.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 1d41748aa7..42a56c8f94 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -29,8 +29,9 @@ jobs: - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir --quiet install --upgrade --pre ".[all,test]" + python -m uv pip --no-cache-dir --quiet install --upgrade --pre ".[all,test]" python -m pip list - name: List release candidates, alpha, and beta releases @@ -61,8 +62,9 @@ jobs: # c.f. https://twitter.com/ralfgommers/status/1419917265781334025 - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m pip uninstall --yes scipy python -m uv pip install --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list @@ -88,7 +90,7 @@ jobs: - name: Install dependencies run: | python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m pip uninstall --yes iminuit python -m uv pip install --upgrade cython python -m uv pip install --upgrade git+https://github.com/scikit-hep/iminuit.git @@ -114,7 +116,7 @@ jobs: - name: Install dependencies run: | python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m pip uninstall --yes uproot python -m uv pip install --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list @@ -141,7 +143,7 @@ jobs: - name: Install dependencies run: | python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv 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. @@ -176,7 +178,7 @@ jobs: - name: Install dependencies run: | python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m pip uninstall --yes pytest python -m uv pip install --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list From 66811f2ea073db3fdf8a32b0fdccf8401f49d65b Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 16 Feb 2024 14:41:31 -0600 Subject: [PATCH 04/20] Add uv to pip uninstall --- .github/workflows/dependencies-head.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 42a56c8f94..cdcccf89f2 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -65,7 +65,7 @@ jobs: python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" - python -m pip uninstall --yes scipy + python -m uv pip uninstall --yes scipy python -m uv pip install --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list @@ -91,7 +91,7 @@ jobs: run: | python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" - python -m pip uninstall --yes iminuit + python -m uv pip uninstall --yes iminuit python -m uv pip install --upgrade cython python -m uv pip install --upgrade git+https://github.com/scikit-hep/iminuit.git python -m pip list @@ -117,7 +117,7 @@ jobs: run: | python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" - python -m pip uninstall --yes uproot + python -m uv pip uninstall --yes uproot python -m uv pip install --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list - name: Test with pytest @@ -144,7 +144,7 @@ jobs: run: | python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" - python -m pip uninstall --yes matplotlib + python -m uv 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. python -m uv pip install \ @@ -179,7 +179,7 @@ jobs: run: | python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" - python -m pip uninstall --yes pytest + python -m uv pip uninstall --yes pytest python -m uv pip install --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list - name: Test with pytest From 3ed06bdc8b6594e93a7e428b5f2b979d438f2e0d Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 16 Feb 2024 14:46:51 -0600 Subject: [PATCH 05/20] install uv --- .github/workflows/bump-version.yml | 1 + .github/workflows/ci-windows.yml | 1 + .github/workflows/ci.yml | 1 + .github/workflows/dependencies-head.yml | 4 ++++ .github/workflows/docs.yml | 3 ++- .github/workflows/lower-bound-requirements.yml | 3 ++- .github/workflows/notebooks.yml | 1 + .github/workflows/publish-package.yml | 1 + .github/workflows/release_tests.yml | 1 + 9 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 625d9a1a72..9c579c9093 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -204,6 +204,7 @@ jobs: - name: Install Python dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip install tbump python -m pip list diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 0721d8e44f..b3d61603a6 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -29,6 +29,7 @@ jobs: - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip install --upgrade '.[all,test]' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69e4324c9b..d657390cb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,7 @@ jobs: - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip install --upgrade ".[all,test]" diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index cdcccf89f2..f5e0694fa7 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -89,6 +89,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m uv pip uninstall --yes iminuit @@ -115,6 +116,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m uv pip uninstall --yes uproot @@ -142,6 +144,7 @@ jobs: - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m uv pip uninstall --yes matplotlib @@ -177,6 +180,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" python -m uv pip uninstall --yes pytest diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3eb24fcea2..e1a66edb18 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,8 +28,9 @@ jobs: - name: Install Python dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel - python -m pip --quiet install --upgrade .[docs,test] + python -m uv pip --quiet install --upgrade .[docs,test] python -m uv pip install yq python -m pip list diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index 1166fb2647..6b557b4020 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -26,8 +26,9 @@ jobs: - name: Install dependencies and force lowest bound run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel - python -m pip --no-cache-dir install --constraint tests/constraints.txt ".[all,test]" + python -m uv pip --no-cache-dir install --constraint tests/constraints.txt ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 55489ca09b..ccc5d31302 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -28,6 +28,7 @@ jobs: - name: Install dependencies run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel # FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104 python -m uv pip install --upgrade ".[all,test]" 'jupyter-client<8.0.0' diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 37d9d2d9ee..cbc80040d6 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -43,6 +43,7 @@ jobs: - name: Install python-build and twine run: | + python -m pip install uv python -m uv pip install --upgrade pip python -m uv pip install build twine python -m pip list diff --git a/.github/workflows/release_tests.yml b/.github/workflows/release_tests.yml index 3c12f7a598..9684563781 100644 --- a/.github/workflows/release_tests.yml +++ b/.github/workflows/release_tests.yml @@ -36,6 +36,7 @@ jobs: - name: Install from PyPI run: | + python -m pip install uv python -m uv pip install --upgrade pip setuptools wheel python -m uv pip install --pre 'pyhf[backends,xmlio]' python -m uv pip install pytest From 96b6f0d05c7784950011fc153b8758b269f22922 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 28 Feb 2024 17:01:49 -0600 Subject: [PATCH 06/20] Require v0.1.12 for --system --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 030e667aee..638c4869d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,7 @@ develop = [ "pre-commit", "nox", "codemetapy>=2.3.0", - "uv>=0.1.2" + "uv>=0.1.12" ] [tool.hatch.version] From 4ce9ccdb460dca7d73a96550b92c376b1dacea47 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 28 Feb 2024 16:52:51 -0600 Subject: [PATCH 07/20] Specify 'install --system' to use CI provided Python --- .github/workflows/bump-version.yml | 4 +-- .github/workflows/ci-windows.yml | 4 +-- .github/workflows/ci.yml | 4 +-- .github/workflows/dependencies-head.yml | 36 +++++++++---------- .github/workflows/docs.yml | 6 ++-- .../workflows/lower-bound-requirements.yml | 4 +-- .github/workflows/notebooks.yml | 4 +-- .github/workflows/publish-package.yml | 4 +-- .github/workflows/release_tests.yml | 8 ++--- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 9c579c9093..496f29d4a4 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -205,8 +205,8 @@ jobs: - name: Install Python dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip install tbump + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip install --system tbump python -m pip list - name: Setup Git user to push new tag diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index b3d61603a6..565c7b866c 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -30,8 +30,8 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip install --upgrade '.[all,test]' + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip install --system --upgrade '.[all,test]' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d657390cb3..cf5abcbd32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,8 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip install --upgrade ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip install --system --upgrade ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index f5e0694fa7..70c477e05e 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -30,8 +30,8 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --upgrade --pre ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir --quiet install --system --upgrade --pre ".[all,test]" python -m pip list - name: List release candidates, alpha, and beta releases @@ -63,10 +63,10 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes scipy - python -m uv pip install --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy + python -m uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list - name: Test with pytest @@ -90,11 +90,11 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes iminuit - python -m uv pip install --upgrade cython - python -m uv pip install --upgrade git+https://github.com/scikit-hep/iminuit.git + python -m uv pip install --system --upgrade cython + python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git python -m pip list - name: Test with pytest run: | @@ -117,10 +117,10 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes uproot - python -m uv pip install --upgrade git+https://github.com/scikit-hep/uproot5.git + python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list - name: Test with pytest run: | @@ -145,12 +145,12 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" python -m uv 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. - python -m uv pip install \ + python -m uv pip install --system \ --upgrade \ --pre \ --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ @@ -181,10 +181,10 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --upgrade ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes pytest - python -m uv pip install --upgrade git+https://github.com/pytest-dev/pytest.git + python -m uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list - name: Test with pytest run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e1a66edb18..718e74b555 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,9 +29,9 @@ jobs: - name: Install Python dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --quiet install --upgrade .[docs,test] - python -m uv pip install yq + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --quiet install --system --upgrade .[docs,test] + python -m uv pip install --system yq python -m pip list - name: Install apt-get dependencies diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index 6b557b4020..be902710a1 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -27,8 +27,8 @@ jobs: - name: Install dependencies and force lowest bound run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir install --constraint tests/constraints.txt ".[all,test]" + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip --no-cache-dir install --system --constraint tests/constraints.txt ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index ccc5d31302..58e821220d 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -29,9 +29,9 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel + python -m uv pip install --system --upgrade pip setuptools wheel # FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104 - python -m uv pip install --upgrade ".[all,test]" 'jupyter-client<8.0.0' + python -m uv pip install --system --upgrade ".[all,test]" 'jupyter-client<8.0.0' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index cbc80040d6..d0396250bb 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -44,8 +44,8 @@ jobs: - name: Install python-build and twine run: | python -m pip install uv - python -m uv pip install --upgrade pip - python -m uv pip install build twine + python -m uv pip install --system --upgrade pip + python -m uv pip install --system build twine python -m pip list - name: Build a sdist and wheel diff --git a/.github/workflows/release_tests.yml b/.github/workflows/release_tests.yml index 9684563781..b81f6ec75b 100644 --- a/.github/workflows/release_tests.yml +++ b/.github/workflows/release_tests.yml @@ -37,9 +37,9 @@ jobs: - name: Install from PyPI run: | python -m pip install uv - python -m uv pip install --upgrade pip setuptools wheel - python -m uv pip install --pre 'pyhf[backends,xmlio]' - python -m uv pip install pytest + python -m uv pip install --system --upgrade pip setuptools wheel + python -m uv pip install --system --pre 'pyhf[backends,xmlio]' + python -m uv pip install --system pytest python -m pip list - name: Canary test public API @@ -49,6 +49,6 @@ jobs: # FIXME: c.f. https://github.com/proycon/codemetapy/issues/24 - name: Verify requirements in codemeta.json run: | - python -m uv pip install jq "codemetapy>=2.3.0" + python -m uv pip install --system jq "codemetapy>=2.3.0" codemetapy --inputtype python --no-extras pyhf > codemeta_generated.json diff <(jq -S .softwareRequirements codemeta.json) <(jq -S .softwareRequirements codemeta_generated.json) From 7117d0cd3c1b94272201aad75533625fc82b0b58 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 28 Feb 2024 16:56:26 -0600 Subject: [PATCH 08/20] Use '--no-cache' as '--no-cache-dir' is for normal pip only --- .github/workflows/dependencies-head.yml | 12 ++++++------ .github/workflows/lower-bound-requirements.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 70c477e05e..75c35a883c 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -31,7 +31,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --system --upgrade --pre ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade --pre ".[all,test]" python -m pip list - name: List release candidates, alpha, and beta releases @@ -64,7 +64,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes scipy python -m uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list @@ -91,7 +91,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes iminuit python -m uv pip install --system --upgrade cython python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git @@ -118,7 +118,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes uproot python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list @@ -146,7 +146,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv 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. @@ -182,7 +182,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes pytest python -m uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index be902710a1..fa304dc718 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -28,7 +28,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache-dir install --system --constraint tests/constraints.txt ".[all,test]" + python -m uv pip --no-cache install --system --constraint tests/constraints.txt ".[all,test]" - name: List installed Python packages run: python -m pip list From d803c484737046fdbd6a99158cd8c009b1b30eba Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 28 Feb 2024 17:17:04 -0600 Subject: [PATCH 09/20] Use 'pyhf[extras] @ .' pattern over '.[extras]' pattern --- .github/workflows/ci-windows.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/dependencies-head.yml | 12 ++++++------ .github/workflows/docs.yml | 2 +- .github/workflows/lower-bound-requirements.yml | 2 +- .github/workflows/notebooks.yml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 565c7b866c..c1fbcddc78 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -31,7 +31,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --upgrade '.[all,test]' + python -m uv pip install --system --upgrade "pyhf[all,test] @ ." - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf5abcbd32..99a06f738f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --upgrade ".[all,test]" + python -m uv pip install --system --upgrade "pyhf[all,test] @ ." - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 75c35a883c..eda1a0be9e 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -31,7 +31,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade --pre ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade --pre "pyhf[all,test] @ ." python -m pip list - name: List release candidates, alpha, and beta releases @@ -64,7 +64,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." python -m uv pip uninstall --yes scipy python -m uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list @@ -91,7 +91,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." python -m uv pip uninstall --yes iminuit python -m uv pip install --system --upgrade cython python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git @@ -118,7 +118,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." python -m uv pip uninstall --yes uproot python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list @@ -146,7 +146,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." python -m uv 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. @@ -182,7 +182,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." python -m uv pip uninstall --yes pytest python -m uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 718e74b555..2db436c5c1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --quiet install --system --upgrade .[docs,test] + python -m uv pip --quiet install --system --upgrade "pyhf[docs,test] @ ." python -m uv pip install --system yq python -m pip list diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index fa304dc718..fbe0fca0be 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -28,7 +28,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache install --system --constraint tests/constraints.txt ".[all,test]" + python -m uv pip --no-cache install --system --constraint tests/constraints.txt "pyhf[all,test] @ ." - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 58e821220d..261448b728 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -31,7 +31,7 @@ jobs: python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel # FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104 - python -m uv pip install --system --upgrade ".[all,test]" 'jupyter-client<8.0.0' + python -m uv pip install --system --upgrade "pyhf[all,test] @ ." 'jupyter-client<8.0.0' - name: List installed Python packages run: python -m pip list From 3758cd4adb05276c1b2c84fe02215ffb63839142 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 28 Mar 2024 13:39:52 -0500 Subject: [PATCH 10/20] Revert "Use 'pyhf[extras] @ .' pattern over '.[extras]' pattern" This reverts commit 44fdb312067c52d1b713b777f5e58dd0be4b045d. --- .github/workflows/ci-windows.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/dependencies-head.yml | 12 ++++++------ .github/workflows/docs.yml | 2 +- .github/workflows/lower-bound-requirements.yml | 2 +- .github/workflows/notebooks.yml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index c1fbcddc78..565c7b866c 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -31,7 +31,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip install --system --upgrade '.[all,test]' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99a06f738f..cf5abcbd32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip install --system --upgrade ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index eda1a0be9e..75c35a883c 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -31,7 +31,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade --pre "pyhf[all,test] @ ." + python -m uv pip --no-cache --quiet install --system --upgrade --pre ".[all,test]" python -m pip list - name: List release candidates, alpha, and beta releases @@ -64,7 +64,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes scipy python -m uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list @@ -91,7 +91,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes iminuit python -m uv pip install --system --upgrade cython python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git @@ -118,7 +118,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes uproot python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list @@ -146,7 +146,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv 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. @@ -182,7 +182,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade "pyhf[all,test] @ ." + python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" python -m uv pip uninstall --yes pytest python -m uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2db436c5c1..718e74b555 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --quiet install --system --upgrade "pyhf[docs,test] @ ." + python -m uv pip --quiet install --system --upgrade .[docs,test] python -m uv pip install --system yq python -m pip list diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index fbe0fca0be..fa304dc718 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -28,7 +28,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache install --system --constraint tests/constraints.txt "pyhf[all,test] @ ." + python -m uv pip --no-cache install --system --constraint tests/constraints.txt ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 261448b728..58e821220d 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -31,7 +31,7 @@ jobs: python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel # FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104 - python -m uv pip install --system --upgrade "pyhf[all,test] @ ." 'jupyter-client<8.0.0' + python -m uv pip install --system --upgrade ".[all,test]" 'jupyter-client<8.0.0' - name: List installed Python packages run: python -m pip list From 249241eb37475ca65dc1da309b37c659943a8004 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Thu, 28 Mar 2024 13:41:07 -0500 Subject: [PATCH 11/20] Update uv lower bound --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 638c4869d0..b6e33c71e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,7 @@ develop = [ "pre-commit", "nox", "codemetapy>=2.3.0", - "uv>=0.1.12" + "uv>=0.1.25" ] [tool.hatch.version] From 9b7570a75095e1263b4fb804d0e63b3197399a79 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 29 Mar 2024 00:39:13 -0500 Subject: [PATCH 12/20] Use 'installer uv' option for build --- .github/workflows/publish-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index d0396250bb..7b3093ebfb 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -51,12 +51,12 @@ jobs: - name: Build a sdist and wheel if: github.event_name != 'schedule' run: | - python -m build . + python -m build --installer uv . - name: Build a sdist and wheel and check for warnings if: github.event_name == 'schedule' run: | - PYTHONWARNINGS=error,default::DeprecationWarning python -m build . + PYTHONWARNINGS=error,default::DeprecationWarning build --installer uv -m build . - name: Verify untagged commits have dev versions if: "!startsWith(github.ref, 'refs/tags/')" From fd7b11477f27c957fa0cde37b08d3103a972cfac Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 2 Apr 2024 09:25:58 +0200 Subject: [PATCH 13/20] quote local installs with extras --- .github/workflows/docs.yml | 2 +- .readthedocs.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 718e74b555..91a3976601 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,7 +30,7 @@ jobs: run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --quiet install --system --upgrade .[docs,test] + python -m uv pip --quiet install --system --upgrade ".[docs,test]" python -m uv pip install --system yq python -m pip list diff --git a/.readthedocs.yaml b/.readthedocs.yaml index bd5f4ea9cd..6ff1c4c8b8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -21,7 +21,7 @@ sphinx: # If using Sphinx, optionally build your docs in additional formats such as PDF and ePub formats: all -# python -m pip install .[docs] +# python -m pip install '.[docs]' python: install: - method: pip From 3bd1ff104091588ddc9ffbe639f15faa1261d167 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 12:58:34 -0500 Subject: [PATCH 14/20] Update uv --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b6e33c71e5..8aad3f9850 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,7 @@ develop = [ "pre-commit", "nox", "codemetapy>=2.3.0", - "uv>=0.1.25" + "uv>=0.1.39" ] [tool.hatch.version] From 3eef2a750cae416e0d81fb447b4188d00753ec75 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 13:16:06 -0500 Subject: [PATCH 15/20] fix: Fall back to pip for Python 3.8 as uv fails here --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf5abcbd32..3a7319143b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,11 +44,19 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies + if: matrix.python-version != '3.8' run: | python -m pip install uv python -m uv pip install --system --upgrade pip setuptools wheel python -m uv pip install --system --upgrade ".[all,test]" + # c.f. https://github.com/astral-sh/uv/issues/2062 + - name: Install dependencies (Python 3.8) + if: matrix.python-version == '3.8' + 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 From b8f295861a7e66e2a783baceb24295ef26ebdc5e Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 13:28:02 -0500 Subject: [PATCH 16/20] Just give in and use 'uv pip' for everything --- .github/workflows/bump-version.yml | 4 +- .github/workflows/ci-windows.yml | 4 +- .github/workflows/ci.yml | 4 +- .github/workflows/dependencies-head.yml | 46 +++++++++---------- .github/workflows/docs.yml | 6 +-- .../workflows/lower-bound-requirements.yml | 4 +- .github/workflows/notebooks.yml | 4 +- .github/workflows/publish-package.yml | 4 +- .github/workflows/release_tests.yml | 8 ++-- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 496f29d4a4..cfd178cac4 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -205,8 +205,8 @@ jobs: - name: Install Python dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system tbump + uv pip install --system --upgrade pip setuptools wheel + uv pip install --system tbump python -m pip list - name: Setup Git user to push new tag diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 565c7b866c..696fadc5a4 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -30,8 +30,8 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --upgrade '.[all,test]' + uv pip install --system --upgrade pip setuptools wheel + uv pip install --system --upgrade '.[all,test]' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a7319143b..82a92e10fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,8 @@ jobs: if: matrix.python-version != '3.8' run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --upgrade ".[all,test]" + uv pip install --system --upgrade pip setuptools wheel + uv pip install --system --upgrade ".[all,test]" # c.f. https://github.com/astral-sh/uv/issues/2062 - name: Install dependencies (Python 3.8) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 75c35a883c..c9945d7747 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -30,8 +30,8 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade --pre ".[all,test]" + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache --quiet install --system --upgrade --pre ".[all,test]" python -m pip list - name: List release candidates, alpha, and beta releases @@ -63,10 +63,10 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - python -m uv pip uninstall --yes scipy - python -m uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + uv pip uninstall --yes scipy + uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list - name: Test with pytest @@ -90,11 +90,11 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - python -m uv pip uninstall --yes iminuit - python -m uv pip install --system --upgrade cython - python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + uv pip uninstall --yes iminuit + uv pip install --system --upgrade cython + uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git python -m pip list - name: Test with pytest run: | @@ -117,10 +117,10 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - python -m uv pip uninstall --yes uproot - python -m uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + uv pip uninstall --yes uproot + uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list - name: Test with pytest run: | @@ -145,12 +145,12 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - python -m uv pip uninstall --yes matplotlib + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + uv 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. - python -m uv pip install --system \ + uv pip install --system \ --upgrade \ --pre \ --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ @@ -181,10 +181,10 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - python -m uv pip uninstall --yes pytest - python -m uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache --quiet install --system --upgrade ".[all,test]" + uv pip uninstall --yes pytest + uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list - name: Test with pytest run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 91a3976601..0bb1bc4315 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,9 +29,9 @@ jobs: - name: Install Python dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --quiet install --system --upgrade ".[docs,test]" - python -m uv pip install --system yq + uv pip install --system --upgrade pip setuptools wheel + uv pip --quiet install --system --upgrade ".[docs,test]" + uv pip install --system yq python -m pip list - name: Install apt-get dependencies diff --git a/.github/workflows/lower-bound-requirements.yml b/.github/workflows/lower-bound-requirements.yml index fa304dc718..e9ebdbaa86 100644 --- a/.github/workflows/lower-bound-requirements.yml +++ b/.github/workflows/lower-bound-requirements.yml @@ -27,8 +27,8 @@ jobs: - name: Install dependencies and force lowest bound run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip --no-cache install --system --constraint tests/constraints.txt ".[all,test]" + uv pip install --system --upgrade pip setuptools wheel + uv pip --no-cache install --system --constraint tests/constraints.txt ".[all,test]" - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index 58e821220d..8278f2abdc 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -29,9 +29,9 @@ jobs: - name: Install dependencies run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel + uv pip install --system --upgrade pip setuptools wheel # FIXME: c.f. https://github.com/scikit-hep/pyhf/issues/2104 - python -m uv pip install --system --upgrade ".[all,test]" 'jupyter-client<8.0.0' + uv pip install --system --upgrade ".[all,test]" 'jupyter-client<8.0.0' - name: List installed Python packages run: python -m pip list diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 7b3093ebfb..0537d322cb 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -44,8 +44,8 @@ jobs: - name: Install python-build and twine run: | python -m pip install uv - python -m uv pip install --system --upgrade pip - python -m uv pip install --system build twine + uv pip install --system --upgrade pip + uv pip install --system build twine python -m pip list - name: Build a sdist and wheel diff --git a/.github/workflows/release_tests.yml b/.github/workflows/release_tests.yml index b81f6ec75b..2d3f2e8bd5 100644 --- a/.github/workflows/release_tests.yml +++ b/.github/workflows/release_tests.yml @@ -37,9 +37,9 @@ jobs: - name: Install from PyPI run: | python -m pip install uv - python -m uv pip install --system --upgrade pip setuptools wheel - python -m uv pip install --system --pre 'pyhf[backends,xmlio]' - python -m uv pip install --system pytest + uv pip install --system --upgrade pip setuptools wheel + uv pip install --system --pre 'pyhf[backends,xmlio]' + uv pip install --system pytest python -m pip list - name: Canary test public API @@ -49,6 +49,6 @@ jobs: # FIXME: c.f. https://github.com/proycon/codemetapy/issues/24 - name: Verify requirements in codemeta.json run: | - python -m uv pip install --system jq "codemetapy>=2.3.0" + uv pip install --system jq "codemetapy>=2.3.0" codemetapy --inputtype python --no-extras pyhf > codemeta_generated.json diff <(jq -S .softwareRequirements codemeta.json) <(jq -S .softwareRequirements codemeta_generated.json) From d4f6e7c24e92f29c743d6cc1f88e2bbd9da4d876 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 13:46:41 -0500 Subject: [PATCH 17/20] fix: Still need to call build from 'python -m' if not using pipx --- .github/workflows/publish-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 0537d322cb..38b455e8b5 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -56,7 +56,7 @@ jobs: - name: Build a sdist and wheel and check for warnings if: github.event_name == 'schedule' run: | - PYTHONWARNINGS=error,default::DeprecationWarning build --installer uv -m build . + PYTHONWARNINGS=error,default::DeprecationWarning python -m build --installer uv . - name: Verify untagged commits have dev versions if: "!startsWith(github.ref, 'refs/tags/')" From aa7955d0b46579d83807b5862a8ad8d6d7737137 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 14:06:18 -0500 Subject: [PATCH 18/20] fix: uv pip uninstall needs 'system' but not 'yes' --- .github/workflows/dependencies-head.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index c9945d7747..120a62f522 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -65,7 +65,7 @@ jobs: python -m pip install uv uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - uv pip uninstall --yes scipy + uv pip uninstall --system scipy uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list @@ -92,7 +92,7 @@ jobs: python -m pip install uv uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - uv pip uninstall --yes iminuit + uv pip uninstall --system iminuit uv pip install --system --upgrade cython uv pip install --system --upgrade git+https://github.com/scikit-hep/iminuit.git python -m pip list @@ -119,7 +119,7 @@ jobs: python -m pip install uv uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - uv pip uninstall --yes uproot + uv pip uninstall --system uproot uv pip install --system --upgrade git+https://github.com/scikit-hep/uproot5.git python -m pip list - name: Test with pytest @@ -147,7 +147,7 @@ jobs: python -m pip install uv uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - uv pip uninstall --yes matplotlib + uv pip uninstall --system 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. uv pip install --system \ @@ -183,7 +183,7 @@ jobs: python -m pip install uv uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" - uv pip uninstall --yes pytest + uv pip uninstall --system pytest uv pip install --system --upgrade git+https://github.com/pytest-dev/pytest.git python -m pip list - name: Test with pytest From 49b8ed207bce71cf661792f784ae185466e71d40 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 14:27:55 -0500 Subject: [PATCH 19/20] ci: Adapt to uv's --upgrade rules to allow scipy without new numpy * uv pip install --upgrade is going to try to upgrade numpy along with scipy, so to avoid this, don't use --upgrade when installing scipy from the nightly wheel index. --- .github/workflows/dependencies-head.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 120a62f522..15587a2192 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -58,15 +58,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - # Use nightly SciPy wheels from Anaconda's PyPI - # c.f. https://twitter.com/ralfgommers/status/1419917265781334025 - name: Install dependencies run: | python -m pip install uv uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" uv pip uninstall --system scipy - uv pip install --system --upgrade --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy + # uv wants to upgrade dependencies (numpy) to a dev release too, so don't --upgrade + uv pip install --system --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy python -m pip list - name: Test with pytest From 854906db7d65d329d473e1d2a7c3ca8c90abe05e Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sat, 27 Apr 2024 17:24:28 -0500 Subject: [PATCH 20/20] Flip index-url and extra-index-url as uv and pip differ --- .github/workflows/dependencies-head.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies-head.yml b/.github/workflows/dependencies-head.yml index 15587a2192..849cf6fea4 100644 --- a/.github/workflows/dependencies-head.yml +++ b/.github/workflows/dependencies-head.yml @@ -147,13 +147,14 @@ jobs: uv pip install --system --upgrade pip setuptools wheel uv pip --no-cache --quiet install --system --upgrade ".[all,test]" uv pip uninstall --system matplotlib - # Need to use --extra-index-url as dependencies aren't on scientific-python-nightly-wheels package index. + # Need to use --extra-index-url as all dependencies aren't on scientific-python-nightly-wheels package index. # Need to use --pre as dev releases will need priority over stable releases. + # Note that uv and pip differ on --extra-index-url priority + # c.f. https://github.com/scientific-python/upload-nightly-action/issues/76 uv pip install --system \ - --upgrade \ --pre \ - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ - --extra-index-url https://pypi.org/simple/ \ + --index-url https://pypi.org/simple/ \ + --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ matplotlib - name: List installed Python packages