From 5a8b8f442eb8e637f1102503ee0c134c3538be41 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Thu, 16 Nov 2023 16:16:24 +0530 Subject: [PATCH] Use `python -m nox` instead of `pipx run nox` --- .github/workflows/run_periodic_tests.yml | 16 ++++++++-------- .github/workflows/test_on_push.yml | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/run_periodic_tests.yml b/.github/workflows/run_periodic_tests.yml index 8e3a8b2644..cdf1a73e1a 100644 --- a/.github/workflows/run_periodic_tests.yml +++ b/.github/workflows/run_periodic_tests.yml @@ -82,38 +82,38 @@ jobs: - name: Install SuiteSparse and SUNDIALS on GNU/Linux if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s pybamm-requires + run: python -m nox -s pybamm-requires - name: Run unit tests for GNU/Linux with Python 3.8, 3.9, and 3.10, and for macOS and Windows with all Python versions if: (matrix.os == 'ubuntu-latest' && matrix.python-version != 3.11) || (matrix.os != 'ubuntu-latest') - run: pipx run nox -s unit + run: python -m nox -s unit - name: Run unit tests for GNU/Linux with Python 3.11 and generate coverage report if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11 - run: pipx run nox -s coverage + run: python -m nox -s coverage - name: Upload coverage report if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.11 uses: codecov/codecov-action@v3.1.4 - name: Run integration tests - run: pipx run nox -s integration + run: python -m nox -s integration - name: Install docs dependencies and run doctests if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s doctests + run: python -m nox -s doctests - name: Check if the documentation can be built if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s docs + run: python -m nox -s docs - name: Install dev dependencies and run example tests if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s examples + run: python -m nox -s examples - name: Run example scripts tests if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s scripts + run: python -m nox -s scripts #M-series Mac Mini build-apple-mseries: diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index 38735a15f5..8ab91eaa54 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -107,10 +107,10 @@ jobs: - name: Install SuiteSparse and SUNDIALS on GNU/Linux if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s pybamm-requires + run: python -m nox -s pybamm-requires - name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }} - run: pipx run nox -s unit + run: python -m nox -s unit # Runs only on Ubuntu with Python 3.11 check_coverage: @@ -162,10 +162,10 @@ jobs: key: nox-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py') }} - name: Install SuiteSparse and SUNDIALS on GNU/Linux - run: pipx run nox -s pybamm-requires + run: python -m nox -s pybamm-requires - name: Run unit tests for Ubuntu with Python 3.11 and generate coverage report - run: pipx run nox -s coverage + run: python -m nox -s coverage - name: Upload coverage report uses: codecov/codecov-action@v3.1.4 @@ -243,10 +243,10 @@ jobs: - name: Install SuiteSparse and SUNDIALS on GNU/Linux if: matrix.os == 'ubuntu-latest' - run: pipx run nox -s pybamm-requires + run: python -m nox -s pybamm-requires - name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }} - run: pipx run nox -s integration + run: python -m nox -s integration # Runs only on Ubuntu with Python 3.11. Skips IDAKLU module compilation # for speedups, which is already tested in other jobs. @@ -286,10 +286,10 @@ jobs: pip install --upgrade pip wheel setuptools - name: Install docs dependencies and run doctests for GNU/Linux with Python 3.11 - run: pipx run nox -s doctests + run: python -m nox -s doctests - name: Check if the documentation can be built for GNU/Linux with Python 3.11 - run: pipx run nox -s docs + run: python -m nox -s docs # Runs only on Ubuntu with Python 3.11 run_example_tests: @@ -341,10 +341,10 @@ jobs: key: nox-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py') }} - name: Install SuiteSparse and SUNDIALS on GNU/Linux - run: pipx run nox -s pybamm-requires + run: python -m nox -s pybamm-requires - name: Install dev dependencies and run example tests for GNU/Linux with Python 3.11 - run: pipx run nox -s examples + run: python -m nox -s examples # Runs only on Ubuntu with Python 3.11 run_scripts_tests: @@ -396,7 +396,7 @@ jobs: key: nox-pybamm-requires-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/install_KLU_Sundials.py') }} - name: Install SuiteSparse and SUNDIALS on GNU/Linux - run: pipx run nox -s pybamm-requires + run: python -m nox -s pybamm-requires - name: Install dev dependencies and run example scripts tests for GNU/Linux with Python 3.11 - run: pipx run nox -s scripts + run: python -m nox -s scripts