From 419118297ef3e2d5ad96a012a6774f2a9af2a09e Mon Sep 17 00:00:00 2001 From: David Hall Date: Thu, 12 Sep 2024 19:57:43 -0700 Subject: [PATCH 1/2] Add [test] and update CONTRIBUTING --- CONTRIBUTING.md | 2 +- pyproject.toml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2385c93e..efcdbc63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ Now make your changes. Make sure to include additional tests if necessary. Next verify the tests all pass: ```bash -pip install pytest +pip install -e .[test] pytest ``` diff --git a/pyproject.toml b/pyproject.toml index 88c80af0..992390c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,3 +55,10 @@ reportIncompatibleMethodOverride = true reportIncompatibleVariableOverride = false # Incompatible with eqx.AbstractVar reportFunctionMemberAccess = false include = ["equinox", "tests"] + +[project.optional-dependencies] +test = [ + "pytest", + "beartype", + "optax" +] From 8b03a1f228e348c7ced48b919cefa3b8eae76bac Mon Sep 17 00:00:00 2001 From: David Hall Date: Fri, 13 Sep 2024 12:08:40 -0700 Subject: [PATCH 2/2] pr comments --- .github/workflows/release.yml | 2 +- .github/workflows/run_tests.yml | 2 +- CONTRIBUTING.md | 2 +- pyproject.toml | 2 +- tests/requirements.txt | 4 ---- 5 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 tests/requirements.txt diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46977e56..d81b6816 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: test-script: | cp -r ${{ github.workspace }}/tests ./tests cp ${{ github.workspace }}/pyproject.toml ./pyproject.toml - python -m pip install -r ./tests/requirements.txt + python -m pip install -e ".[tests]" pytest pypi-token: ${{ secrets.pypi_token }} github-user: patrick-kidger diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 5ae7f0c1..bca2d10b 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -23,7 +23,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -r ./tests/requirements.txt + python -m pip install -e ".[tests]" - name: Checks with pre-commit uses: pre-commit/action@v2.0.3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index efcdbc63..2c4739ec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ Now make your changes. Make sure to include additional tests if necessary. Next verify the tests all pass: ```bash -pip install -e .[test] +pip install -e ".[tests]" pytest ``` diff --git a/pyproject.toml b/pyproject.toml index 992390c7..7c6defe6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ reportFunctionMemberAccess = false include = ["equinox", "tests"] [project.optional-dependencies] -test = [ +tests = [ "pytest", "beartype", "optax" diff --git a/tests/requirements.txt b/tests/requirements.txt deleted file mode 100644 index 946ff033..00000000 --- a/tests/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -jaxlib -optax -pytest -beartype