From 051e8b3b13b0edea42a80250089840dad27c7eef Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 11 Oct 2024 10:26:00 +0100 Subject: [PATCH 1/2] Revert "Try `pytest-xdist`" (#422) Reverts astro-informatics/sleplet#415 --- .github/workflows/examples.yaml | 5 ++--- pyproject.toml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index df96a9e3..8fb312b1 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -35,11 +35,10 @@ jobs: key: readme-${{ hashFiles('pyproject.toml') }} - name: Install dependencies - run: python -m pip install -e ".[readme]" + run: python -m pip install -e '.[readme]' - name: Run examples in the README - run: >- - python -m pytest --codeblocks .github README.md documentation -n auto + run: python -m pytest --codeblocks .github README.md documentation examples: runs-on: ubuntu-latest diff --git a/pyproject.toml b/pyproject.toml index e53565cb..85a477ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,6 @@ optional-dependencies = {dev = [ "pdoc3", ], readme = [ "pytest-codeblocks", - "pytest-xdist", ]} readme = "README.md" requires-python = ">=3.11" From df53d6b5968de1f42626ad5cc6d593bf7d71a982 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 11 Oct 2024 10:28:05 +0100 Subject: [PATCH 2/2] Use native TOML syntax for `tox` (#421) Fixes #419 --- pyproject.toml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 85a477ad..39525333 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -204,20 +204,24 @@ write_to = "src/sleplet/_version.py" overrides."project.classifiers".inline_arrays = false overrides."tool.coverage.paths.source".inline_arrays = false overrides."tool.ruff.lint.isort.section-order".inline_arrays = false +overrides."tool.tox.env_run_base.commands".inline_arrays = false [tool.tox] -legacy_tox_ini = """ - [gh] - python = - 3.11: py311 - 3.12: py312 - - [testenv] - commands = - pytest --cov --cov-report=lcov - deps = - pytest-cov - - [tox] - env_list = py{311,312} -""" +env_list = [ + "py311", + "py312", +] +env_run_base = {commands = [ + [ + "pytest", + "--cov", + "--cov-report=lcov", + ], +], deps = [ + "pytest-cov", +]} +gh.python = {"3.11" = [ + "py311", +], "3.12" = [ + "py312", +]}