Python tooling, CI, and docs modernization - #26
Open
JudoWill wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request modernizes the
outerspacedevelopment workflow: standardpyproject.tomltool configuration, Ruff for lint and format, tox for reproducible test and doc builds, GitHub Actions for CI and PyPI publishing, MkDocs + Read the Docs for documentation, a GPL-3.0 license file, and optionalpipelineextras so default installs and CI stay lighter. Default test runs and PR CI exercise unit tests only; long integration/functional tests are opt-in.Motivation
pip install -e ".[dev]", tox, pre-commit, RTD).makefileusage for core dev tasks.What changed
Packaging and dependencies
requires-python:>=3.9(consistent with NumPy 2).dev(pytest, coverage, tox, ruff, pre-commit, build, twine),docs(mkdocs, material, pymdown-extensions),pipeline(snakemake,pulpmoved out of core dependencies).[project.urls]for Home, Repo, Docs, Issues.outerspace/cli/commands/pipeline.pyso importing the CLI does not require the pipeline extra; runningouterspace pipelinewithout the extra raises a clear install hint.Lint and tests
pyproject.toml([tool.ruff],[tool.ruff.lint], isort forouterspace).integration,functional. Defaultaddoptsrunnot integration and not functional.test_functional_*.pymodules usepytestmark = pytest.mark.functional.[tool.coverage.*]for theouterspacepackage.Tox (see
tox.ini)tox -e ruff: Ruff check +ruff format --check.tox -e py: Default unit suite (same marker filter aspyproject).tox -e functional:integrationorfunctionaltests; uses[dev,pipeline]and--override-iniso marker selection works with the default addopts.tox -e docs:mkdocs build --strict.Continuous integration and release
.github/workflows/ci.yml: Ruff job + Python 3.9–3.12 matrix fortox -e py(unit tests only)..github/workflows/publish.yml: Build sdist/wheel and publish to PyPI on release orv*tags (requires trusted publishing / GitHub “pypi” environment to be configured on the repo and PyPI).Documentation site
mkdocs.yml, Material theme, nav over existingdocs/*.mdplusdocs/index.mdlanding page..readthedocs.yaml: install package with thedocsextra and run MkDocs.Repository hygiene
LICENSE: full GPL-3.0 text (matcheslicensemetadata)..pre-commit-config.yaml: Ruff (with fix) and Ruff format..gitignore: consider adding.tox/,dist/,htmlcov/,.ruff_cache/,.mypy_cache/, and.pytest_cache/if not already present (keepsvenvignored for local conda envs).makefile:VENVpoints at repovenv/;make test/make ruffcall tox via$(VENV)/bin/python;make venvcreates conda env andpip install -e ".[dev,pipeline]"+ pre-commit.README.md: Development section (condavenv, tox, pre-commit, RTD link).How to test this PR
Read the Docs: import the project and point it at this branch; build should use
.readthedocs.yamland thedocsextra.PyPI publish: merge only after OIDC / trusted publishing is configured; dry-run on TestPyPI first is recommended.
Checklist (for maintainers)
CHANGELOG(not required for this PR unless you add one later).