Skip to content

Modernize packaging, CI, and documentation#14

Open
soraros wants to merge 2 commits into
jjcremmers:mainfrom
soraros:modernise-build
Open

Modernize packaging, CI, and documentation#14
soraros wants to merge 2 commits into
jjcremmers:mainfrom
soraros:modernise-build

Conversation

@soraros

@soraros soraros commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces setup.py, .github/workflows/pytest.yml, and .github/workflows/documentation.yml with pyproject.toml (PEP 621, hatchling), uv, and .github/workflows/ci.yml. Local development, Read the Docs, and CI all use uv; runtime and dev tools via uv sync, documentation via uv sync --extra docs (CI and RTD add --no-dev).

Changes

  • Python: CI matrix 3.113.13; 3.9 and 3.10 removed (version schedule).
  • CI: Single workflow with four jobs; runs on every branch push and on pull requests to main (previously only main).
  • Tests: pytest and coverage (replaces unittest discover); installs the full runtime set from pyproject.toml, including PySide6 (omitted in the old workflow).
  • Dependencies: uv sync replaces a shorter ad hoc pip install list in the old workflow (now includes VTK and PySide6 explicitly).
  • Release: uv build and a wheel smoke test in a .wheel-check venv.
  • Docs: sphinx-autoapi on Sphinx with Furo (replaces sphinx-rtd-theme); output under doc/_build/html (was repo-root _build/); removed doc/Makefile, doc/requirements.txt, and manual API stubs. Read the Docs remains the primary docs site.
  • Pages: upload-pages-artifact + deploy-pages on main (replaces peaceiris/actions-gh-pagesgh-pages). If Settings → Pages still deploys from gh-pages, switch Source to GitHub Actions (publishing source).

Commands

With uv installed, from the repo root. After uv sync, use uv run … without activating .venv.

# Install the package, runtime deps, and dev tools (pytest, coverage, ruff)
uv sync

# Run entry points from pyproject.toml
uv run pyfem --help
uv run pyfem-gui

# Tests
uv run pytest
uv run coverage run -m pytest -q  # CI
uv run coverage report            # CI

# Documentation
uv sync --extra docs              # `docs` extra (CI / RTD: add `--no-dev`)
uv run sphinx-build -M html doc doc/_build

# Wheel and sdist
uv build

soraros and others added 2 commits May 28, 2026 01:22
Replace setup.py and the pytest/documentation workflows with pyproject.toml
(hatchling) and one uv-based CI workflow.

Packaging
- Add pyproject.toml: runtime deps, docs extra, dev dependency group, console scripts
- Remove setup.py; requires-python >=3.11; __version__ from importlib.metadata

.github/workflows
- Remove pytest.yml and documentation.yml; add ci.yml
- test: uv sync, coverage and pytest on 3.11–3.13, apt libs for VTK/PySide6, pyfem --help
- build: uv build, wheel smoke in .wheel-check venv, upload dist artifact
- docs: uv sync --extra docs --no-dev, sphinx-build; upload-pages-artifact on push to main
- deploy-docs: deploy-pages on push to main (replaces peaceiris/actions-gh-pages → gh-pages)

doc/
- conf.py: Furo, MyST, sphinx-autoapi (api/ at build time, gitignored)
- Remove Makefile, make.bat, requirements.txt, _static/custom.css, introduction/about.md,
  introduction/api.md, pyfem.html
- Add doc/README.md; update installation guide, index, tutorials, README

Other
- .readthedocs.yaml: uv sync --extra docs --no-dev; apt libgl1
- .gitignore: doc/_build, doc/api, .wheel-check/, uv.lock, AGENTS.md, .python-version
Use uv run pyfem and uv run pytest in user-facing docs so they match
the installation guide and PR contributor commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@soraros

soraros commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Gentle ping @jjcremmers

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.

1 participant