From 7d77a7e5e548c459ddd355a8cacce8acd2d3ad47 Mon Sep 17 00:00:00 2001 From: Wilfred Tyler Gee Date: Mon, 20 Oct 2025 12:17:03 -1000 Subject: [PATCH 1/2] * Use `hatch` for testing and building. --- .github/workflows/create-release.yml | 10 +++++----- pyproject.toml | 24 ++++++++++-------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 398fdac..3a405f5 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -17,14 +17,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.x' - - name: Install dependencies + - name: Install build tool (Hatch) run: | python -m pip install --upgrade pip - pip install ".[testing]" - - name: tox clean and build + pip install hatch + - name: Build package with Hatch run: | - tox -e clean - tox -e build + hatch clean + hatch build - name: Publish package uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 with: diff --git a/pyproject.toml b/pyproject.toml index 77ff31f..c7d9662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,16 +36,6 @@ dependencies = [ ] dynamic = ["version"] -[project.optional-dependencies] -testing = [ - "coverage>=7.0,<8.0", - "pycodestyle>=2.10,<3.0", - "pytest>=7.0,<8.0", - "pytest-cov>=4.0,<5.0", - "pytest-doctestplus>=1.0,<2.0", - "tox>=4.0,<5.0", -] - [project.urls] Documentation = "https://projectpanoptes.org/" Source = "https://github.com/panoptes/panoptes-data/" @@ -78,7 +68,13 @@ line-length = 100 target-version = "py312" src = ["src"] -[tool.pytest.ini_options] -addopts = ["--cov=panoptes.data", "--cov-report", "term-missing", "--verbose"] -norecursedirs = ["dist", "build", ".tox"] -testpaths = ["tests"] +[tool.hatch.envs.tests] +dependencies = [ + "coverage>=7.0,<8.0", + "pytest>=7.0,<8.0", + "pytest-cov>=4.0,<5.0", + "pytest-doctestplus>=1.0,<2.0", +] +[tool.hatch.envs.tests.scripts] +test = "pytest" +test-cov = "pytest --cov=panoptes.data --cov-report term-missing --verbose" From 1fe729259d0a8affc611ea4091b80ce81f03952e Mon Sep 17 00:00:00 2001 From: Wilfred Tyler Gee Date: Mon, 20 Oct 2025 12:17:20 -1000 Subject: [PATCH 2/2] * Update changelog. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0d106e..f6e8ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.2.2 (2025-10-20) +## 0.2.3 (2025-10-20) - Modernize the repo to use `pyproject.toml`. - Update docs.