Skip to content

[CLEANUP] Repo hygiene: pyproject-only dependencies, no environment.yml, coverage floor - #185

Merged
eleanorfrajka merged 2 commits into
mainfrom
cleanup/repo-hygiene
Sep 8, 2026
Merged

eleanorfrajka merged 2 commits into
mainfrom
cleanup/repo-hygiene

Conversation

@eleanorfrajka

Copy link
Copy Markdown
Collaborator

Summary

Repo hygiene: dependencies are declared once, in pyproject.toml; the root environment.yml and both requirements*.txt files are gone; CI enforces a coverage floor. No change to standardised output, variable names, attributes, or any public call — this is a packaging and tooling branch only.

What's changed

  • Dependencies moved into pyproject.toml: [project] dependencies holds the runtime pins, and [project.optional-dependencies] adds test, docs, and dev (where dev = test + docs + ruff/jupyterlab/pygmt); dynamic is now ["version"] only.
  • Deleted requirements.txt, requirements-dev.txt, and the root environment.yml; install for development with pip install -e ".[dev]".
  • Docs workflows (docs.yml, docs_deploy.yml) no longer use conda/micromamba: they run on actions/setup-python, install pandoc with apt-get, and install the package with pip install -e ".[docs]".
  • tests.yml matrix now runs Ubuntu on Python 3.10–3.13 and macOS and Windows on 3.12; installs pip install -e ".[test]"; and gates coverage at --cov-fail-under=55 on the Ubuntu 3.12 cell only (every other cell runs --no-cov).
  • The Python 3.13 cell is marked experimental (continue-on-error) and fail-fast is off, so a missing 3.13 wheel fails softly without cancelling the supported cells; drop the experimental flag once the dependency stack has 3.13 wheels.
  • The docs extra includes ipython, which provides the ipython3 Pygments lexer nbsphinx needs to render the notebook cells.
  • Prose updated to the extras model across README, docs/source/about.rst, faq.md, the developer guides, and both CONTRIBUTING files.
  • Added a .mailmap collapsing the Isabelle1299 and Isabelle commit identities to Isabelle Schmitz.
  • CHANGELOG [Unreleased] written up for the changes merged since 0.4.0 ([DOC] add Zenodo DOI badge and CITATION doi #178–[FEAT] Add the SCOTIA overturning reader (neutral-density space) #184), including a Breaking changes section for [FEAT] amocvocab controlled vocabulary + OceanSITES format reset #181 (standardised output moved to the amocvocab + OceanSITES convention) and [CLEANUP] Repo and docs cleanup: regenerate reports, dedupe autodoc, ruff-only linting, drop dead AC1 writer #182 (writers.save_AC1_dataset() removed), plus the packaging change on this branch.

Breaking changes

None for a user of the package: no output, attribute, variable name, or public call changes on this branch. (The CHANGELOG's Breaking changes section documents #181 and #182, which are already on main and ship in the next release.)

Tests

pip install -e ".[test]" in a clean virtualenv, then pytest -m "not slow" — 434 passed, 1 skipped, coverage 58.18% (≥ 55 floor); pip check clean; docs build with .[docs] succeeds with 2 (pre-existing) warnings.

Notes

pyudunits2[xml] and jsonschema are test-only (lazy imports in the vocabulary validator) and live in the test extra, not runtime; pygmt stays dev-only. Please delete the merged branches docs/add-zenodo-doi, fix/time-epoch-and-attr-strip, and rel-v0.4.0 when merging this.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The dev extra in pyproject.toml is self-referential (amocatlas[test,docs]) and can break or mis-resolve pip install -e ".[dev]" in editable installs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Consolidates dependency and tooling configuration around pyproject.toml (including extras), removes redundant environment/requirements files, and updates CI/docs guidance to use pip-based installs while adding a CI coverage floor.

Changes:

  • Move runtime/test/docs/dev dependencies into pyproject.toml with test/docs/dev extras; remove requirements*.txt and environment.yml.
  • Update GitHub Actions workflows to install via extras and gate coverage on a single matrix cell; remove conda/micromamba from docs workflows.
  • Refresh README/docs/CONTRIBUTING/CHANGELOG guidance to match the extras-based development workflow; add .mailmap.
File summaries
File Description
tests/test_sf2021.py Formatting-only change to a monkeypatch lambda for readability.
requirements.txt Deleted in favor of [project] dependencies in pyproject.toml.
requirements-dev.txt Deleted in favor of dev/test/docs extras in pyproject.toml.
README.md Update install and docs-build instructions to use `pip install -e ".[dev
pyproject.toml Define runtime deps and test/docs/dev extras; add Python 3.13 classifier.
environment.yml Deleted; docs/test workflows no longer use conda/micromamba.
docs/source/faq.md Update install/test instructions to remove requirements file installs.
docs/source/developers/housekeeping.md Update dependency-management guidance to point to pyproject.toml extras.
docs/source/developers/git_beginners_guide.md Update CI/test dependency explanation to reference .[test].
docs/source/developers/developer_guide.md Update dev environment setup instructions to use .[dev].
docs/source/developers/actions.md Update workflow descriptions and local commands to use extras-based installs.
docs/source/archive/developer_guide_original.md Minor formatting update in a code block.
docs/source/about.rst Update contribution install instructions to use .[dev].
CONTRIBUTING.md Update docs build instructions to use pandoc + .[docs].
CHANGELOG.md Document unreleased changes including the packaging/CI hygiene updates.
amocatlas/data_sources/wh41n.py Formatting-only change to multi-line lambdas for readability.
.mailmap Add canonical author mappings for consistent git history attribution.
.github/workflows/tests.yml Switch to pip install -e ".[test]", expand matrix, and enforce a coverage floor on one cell.
.github/workflows/docs.yml Switch docs build from micromamba to actions/setup-python + pip install -e ".[docs]" + apt pandoc.
.github/workflows/docs_deploy.yml Same as docs.yml, for deployment workflow.
.github/CONTRIBUTING.md Update quick-start contribution instructions to use .[dev].
Review details
  • Files reviewed: 20/21 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyproject.toml
Comment thread .github/workflows/tests.yml Outdated
@eleanorfrajka
eleanorfrajka merged commit a2668a8 into main Sep 8, 2026
7 checks passed
@eleanorfrajka
eleanorfrajka deleted the cleanup/repo-hygiene branch September 8, 2026 12:41
eleanorfrajka added a commit that referenced this pull request Sep 8, 2026
…ml, coverage floor (#186)

* fix: anchor report plots dir to project root; add docs badge; changelog #185

* fix: name NAC file bb6635909m_2_1.nc, decoupled from the _2_1.nc URL segment

* chore: revert fail-fast to true; strip leaked absolute source_path from rapid/move metadata

* chore: align ruff to the ctdcast rule-set; autofix and triage violations

* docs: drop retired AC1 archive pages; fix faq/reports toctrees (0 build warnings)

* ci: test coverage gate

* ci: fix tests.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants