From 6bef91e520499b2af2782da0fd78c817ffa9e816 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 18:56:32 -0500 Subject: [PATCH 01/20] use conda in ci and install root --- .github/workflows/ci.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76df85f..267da26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,12 +30,18 @@ jobs: name: JIT compiled tests for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5.0.0 - name: Set up Python ${{ matrix.python-version }} + - uses: conda-incubator/setup-miniconda@v2 + name: Set up Conda environment with: + auto-update-conda: true python-version: ${{ matrix.python-version }} - - name: Install dependencies + create-environment: test-env + conda-channels: conda-forge + - name: Install ROOT + run: | + conda install -c conda-forge root + - name: Install Python dependencies run: | python -m pip install --upgrade pip pip install .[dev] @@ -44,7 +50,6 @@ jobs: coverage run --source=. --omit=".tox/*" --branch -m pytest . coverage report - tests_eager: runs-on: ubuntu-latest timeout-minutes: 150 @@ -56,12 +61,18 @@ jobs: name: Eager mode tests for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5.0.0 - name: Set up Python ${{ matrix.python-version }} + - uses: conda-incubator/setup-miniconda@v2 + name: Set up Conda environment with: + auto-update-conda: true python-version: ${{ matrix.python-version }} - - name: Install dependencies + create-environment: test-env + conda-channels: conda-forge + - name: Install ROOT + run: | + conda install -c conda-forge root + - name: Install Python dependencies run: | python -m pip install --upgrade pip pip install .[dev] From 9af1f43e3ba880744ff6d85c3a149c6c9b2f5db7 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:05:17 -0500 Subject: [PATCH 02/20] comment out root install for now --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 267da26..6c624f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,9 +38,9 @@ jobs: python-version: ${{ matrix.python-version }} create-environment: test-env conda-channels: conda-forge - - name: Install ROOT - run: | - conda install -c conda-forge root + # - name: Install ROOT + # run: | + # conda install -c conda-forge root - name: Install Python dependencies run: | python -m pip install --upgrade pip @@ -69,9 +69,9 @@ jobs: python-version: ${{ matrix.python-version }} create-environment: test-env conda-channels: conda-forge - - name: Install ROOT - run: | - conda install -c conda-forge root + # - name: Install ROOT + # run: | + # conda install -c conda-forge root - name: Install Python dependencies run: | python -m pip install --upgrade pip From 4d038bbcbc32a641aa88445904b55133c3e552b4 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:26:56 -0500 Subject: [PATCH 03/20] attempt micromamba --- .github/workflows/ci.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c624f9..e1babed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,19 +30,16 @@ jobs: name: JIT compiled tests for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v2 - - name: Set up Conda environment + - uses: mamba-org/setup-micromamba@v1 + name: Set up Micromamba environment with: - auto-update-conda: true - python-version: ${{ matrix.python-version }} - create-environment: test-env - conda-channels: conda-forge + environment-name: test-env # - name: Install ROOT # run: | - # conda install -c conda-forge root - - name: Install Python dependencies + # micromamba install -c conda-forge root -y + - name: Install Python and dependencies run: | + micromamba install python=${{ matrix.python-version }} pip -c conda-forge -y python -m pip install --upgrade pip pip install .[dev] - name: Test with pytest @@ -61,19 +58,16 @@ jobs: name: Eager mode tests for Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v2 - - name: Set up Conda environment + - uses: mamba-org/setup-micromamba@v1 + name: Set up Micromamba environment with: - auto-update-conda: true - python-version: ${{ matrix.python-version }} - create-environment: test-env - conda-channels: conda-forge + environment-name: test-env # - name: Install ROOT # run: | - # conda install -c conda-forge root - - name: Install Python dependencies + # micromamba install -c conda-forge root -y + - name: Install Python and dependencies run: | + micromamba install python=${{ matrix.python-version }} pip -c conda-forge -y python -m pip install --upgrade pip pip install .[dev] - name: Test with pytest From 1457f29ceb0212bbd264f18cd967e18cadb7b394 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:32:42 -0500 Subject: [PATCH 04/20] attempt fix --- .github/workflows/ci.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1babed..145efd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,13 +34,16 @@ jobs: name: Set up Micromamba environment with: environment-name: test-env + create-args: >- + python=${{ matrix.python-version }} + pip # - name: Install ROOT # run: | - # micromamba install -c conda-forge root -y - - name: Install Python and dependencies + # micromamba install -n test-env -c conda-forge root -y + - name: Install Python dependencies run: | - micromamba install python=${{ matrix.python-version }} pip -c conda-forge -y - python -m pip install --upgrade pip + micromamba install -n test-env -c conda-forge pip -y + pip install --upgrade pip pip install .[dev] - name: Test with pytest run: | @@ -62,13 +65,16 @@ jobs: name: Set up Micromamba environment with: environment-name: test-env + create-args: >- + python=${{ matrix.python-version }} + pip # - name: Install ROOT # run: | - # micromamba install -c conda-forge root -y - - name: Install Python and dependencies + # micromamba install -n test-env -c conda-forge root -y + - name: Install Python dependencies run: | - micromamba install python=${{ matrix.python-version }} pip -c conda-forge -y - python -m pip install --upgrade pip + micromamba install -n test-env -c conda-forge pip -y + pip install --upgrade pip pip install .[dev] - name: Test with pytest run: | From 730cd3e49c34912794dc05f7fa23fc038fa7d215 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:36:19 -0500 Subject: [PATCH 05/20] let's try root --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 145efd0..3bed830 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,7 @@ jobs: create-args: >- python=${{ matrix.python-version }} pip - # - name: Install ROOT - # run: | - # micromamba install -n test-env -c conda-forge root -y + root - name: Install Python dependencies run: | micromamba install -n test-env -c conda-forge pip -y @@ -68,9 +66,7 @@ jobs: create-args: >- python=${{ matrix.python-version }} pip - # - name: Install ROOT - # run: | - # micromamba install -n test-env -c conda-forge root -y + root - name: Install Python dependencies run: | micromamba install -n test-env -c conda-forge pip -y From 34f2de710c85b272568a5bd4326ea1d4d5214231 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:44:49 -0500 Subject: [PATCH 06/20] probably like this --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bed830..6777d97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: root - name: Install Python dependencies run: | - micromamba install -n test-env -c conda-forge pip -y + micromamba activate test-env pip install --upgrade pip pip install .[dev] - name: Test with pytest @@ -69,7 +69,7 @@ jobs: root - name: Install Python dependencies run: | - micromamba install -n test-env -c conda-forge pip -y + micromamba activate test-env pip install --upgrade pip pip install .[dev] - name: Test with pytest From 923e1febf3858682d179ad0a0ef9abe6a5486ff7 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:46:46 -0500 Subject: [PATCH 07/20] fix? --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6777d97..b9ba6d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,6 @@ jobs: root - name: Install Python dependencies run: | - micromamba activate test-env pip install --upgrade pip pip install .[dev] - name: Test with pytest @@ -69,7 +68,6 @@ jobs: root - name: Install Python dependencies run: | - micromamba activate test-env pip install --upgrade pip pip install .[dev] - name: Test with pytest From 046f907100c9ae97d12c10c1aafb8c5f489ba392 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:49:29 -0500 Subject: [PATCH 08/20] do not upgrade pip --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9ba6d0..7b268ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,6 @@ jobs: root - name: Install Python dependencies run: | - pip install --upgrade pip pip install .[dev] - name: Test with pytest run: | @@ -68,7 +67,6 @@ jobs: root - name: Install Python dependencies run: | - pip install --upgrade pip pip install .[dev] - name: Test with pytest run: | From c9133fbfc751e109a38ce85070341b9eac8e7d37 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 19:51:57 -0500 Subject: [PATCH 09/20] add root import and version print --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b268ec..1d5d15f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,9 @@ jobs: python=${{ matrix.python-version }} pip root + - name: Check ROOT Version + run: | + python -c "import ROOT; print(ROOT.__version__)" - name: Install Python dependencies run: | pip install .[dev] @@ -65,6 +68,9 @@ jobs: python=${{ matrix.python-version }} pip root + - name: Check ROOT Version + run: | + python -c "import ROOT; print(ROOT.__version__)" - name: Install Python dependencies run: | pip install .[dev] From f95fb1f33c4d03014d3960d1b9461d3a19d8c5a8 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 20:00:00 -0500 Subject: [PATCH 10/20] is this needed? --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d5d15f..4f449be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,7 @@ jobs: - name: Check ROOT Version run: | python -c "import ROOT; print(ROOT.__version__)" + shell: micromamba-shell {0} - name: Install Python dependencies run: | pip install .[dev] @@ -71,6 +72,7 @@ jobs: - name: Check ROOT Version run: | python -c "import ROOT; print(ROOT.__version__)" + shell: micromamba-shell {0} - name: Install Python dependencies run: | pip install .[dev] From aeaf8b3f690b3b944991404fd455ccd1ccca0ba5 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 20:02:11 -0500 Subject: [PATCH 11/20] sanity check --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f449be..90d03ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,8 @@ jobs: shell: micromamba-shell {0} - name: Install Python dependencies run: | + which python + python -V pip install .[dev] - name: Test with pytest run: | @@ -75,6 +77,8 @@ jobs: shell: micromamba-shell {0} - name: Install Python dependencies run: | + which python + python -V pip install .[dev] - name: Test with pytest run: | From a28a03b86aca3de4e441079f5055e4a8ad0d5fba Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 20:04:46 -0500 Subject: [PATCH 12/20] use correct shell --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90d03ca..3d4af6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,10 +47,12 @@ jobs: which python python -V pip install .[dev] + shell: micromamba-shell {0} - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . coverage report + shell: micromamba-shell {0} tests_eager: runs-on: ubuntu-latest @@ -80,8 +82,10 @@ jobs: which python python -V pip install .[dev] + shell: micromamba-shell {0} - name: Test with pytest run: | ZFIT_DO_JIT=0 coverage run --source=. --omit=".tox/*,*/test*," --branch -m pytest . coverage report + shell: micromamba-shell {0} From e919eb5ea3b094d2ecfbe5a107c91ffbf805b612 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 20:08:08 -0500 Subject: [PATCH 13/20] remove root version check --- .github/workflows/ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d4af6b..b327c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,10 +38,6 @@ jobs: python=${{ matrix.python-version }} pip root - - name: Check ROOT Version - run: | - python -c "import ROOT; print(ROOT.__version__)" - shell: micromamba-shell {0} - name: Install Python dependencies run: | which python @@ -73,10 +69,6 @@ jobs: python=${{ matrix.python-version }} pip root - - name: Check ROOT Version - run: | - python -c "import ROOT; print(ROOT.__version__)" - shell: micromamba-shell {0} - name: Install Python dependencies run: | which python From 60bfe506458db4b569a8d61459deaa418bc34203 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 20:48:51 -0500 Subject: [PATCH 14/20] add default shell --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b327c12..985e3e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,13 @@ on: types: - published +defaults: + run: + # The login shell is necessary for the setup-micromamba setup + # to work in subsequent jobs. + # https://github.com/mamba-org/setup-micromamba#about-login-shells + shell: bash -e -l {0} + jobs: tests_graph: runs-on: ubuntu-latest @@ -43,12 +50,10 @@ jobs: which python python -V pip install .[dev] - shell: micromamba-shell {0} - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . coverage report - shell: micromamba-shell {0} tests_eager: runs-on: ubuntu-latest @@ -74,10 +79,8 @@ jobs: which python python -V pip install .[dev] - shell: micromamba-shell {0} - name: Test with pytest run: | ZFIT_DO_JIT=0 coverage run --source=. --omit=".tox/*,*/test*," --branch -m pytest . coverage report - shell: micromamba-shell {0} From a13779ad1ead4b1de70a31d14a831eaf9fd6934a Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 21:52:34 -0500 Subject: [PATCH 15/20] try uv --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 985e3e6..81077b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,8 @@ jobs: run: | which python python -V - pip install .[dev] + python -m pip install uv + python -m uv pip install ".[dev]" - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . @@ -78,7 +79,8 @@ jobs: run: | which python python -V - pip install .[dev] + python -m pip install uv + python -m uv pip install ".[dev]" - name: Test with pytest run: | ZFIT_DO_JIT=0 From d8cd3cf9e248759527ab78dbdc8853df925d3cc6 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 22:04:40 -0500 Subject: [PATCH 16/20] maybe this will work --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81077b1..08ca68f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: which python python -V python -m pip install uv - python -m uv pip install ".[dev]" + uv pip install ".[dev]" - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . @@ -80,7 +80,7 @@ jobs: which python python -V python -m pip install uv - python -m uv pip install ".[dev]" + uv pip install ".[dev]" - name: Test with pytest run: | ZFIT_DO_JIT=0 From b8adf6382c0a144d91dae133955a04eb920162ae Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 22:07:44 -0500 Subject: [PATCH 17/20] i don't understand this --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08ca68f..0f4c761 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: run: | which python python -V - python -m pip install uv + pip install uv uv pip install ".[dev]" - name: Test with pytest run: | @@ -79,7 +79,7 @@ jobs: run: | which python python -V - python -m pip install uv + pip install uv uv pip install ".[dev]" - name: Test with pytest run: | From ecbd0169cd65da18002ff3b4805c4971edce34fb Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 22:09:44 -0500 Subject: [PATCH 18/20] I'm done with uv --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f4c761..d3784ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,8 +49,7 @@ jobs: run: | which python python -V - pip install uv - uv pip install ".[dev]" + python -m pip install ".[dev]" - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . @@ -79,8 +78,7 @@ jobs: run: | which python python -V - pip install uv - uv pip install ".[dev]" + python -m pip install ".[dev]" - name: Test with pytest run: | ZFIT_DO_JIT=0 From 92ac0c3e78d871f5a0a9d68d8443b08b4d76b282 Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 22:12:22 -0500 Subject: [PATCH 19/20] Revert "I'm done with uv" This reverts commit ecbd0169cd65da18002ff3b4805c4971edce34fb. --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3784ce..0f4c761 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,8 @@ jobs: run: | which python python -V - python -m pip install ".[dev]" + pip install uv + uv pip install ".[dev]" - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . @@ -78,7 +79,8 @@ jobs: run: | which python python -V - python -m pip install ".[dev]" + pip install uv + uv pip install ".[dev]" - name: Test with pytest run: | ZFIT_DO_JIT=0 From 6a2f2ba30fb165aef66672a5ce4c417a1feb8bec Mon Sep 17 00:00:00 2001 From: iasonkrom Date: Wed, 27 Mar 2024 22:14:13 -0500 Subject: [PATCH 20/20] oh it needs editable mode --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f4c761..f0e8333 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,8 +49,8 @@ jobs: run: | which python python -V - pip install uv - uv pip install ".[dev]" + python -m pip install uv + python -m uv pip install -e ".[dev]" - name: Test with pytest run: | coverage run --source=. --omit=".tox/*" --branch -m pytest . @@ -79,8 +79,8 @@ jobs: run: | which python python -V - pip install uv - uv pip install ".[dev]" + python -m pip install uv + python -m uv pip install -e ".[dev]" - name: Test with pytest run: | ZFIT_DO_JIT=0