Skip to content

Migrate to PEP 517/621 with src-layout#3

Open
alisterburt wants to merge 3 commits intomgflast:masterfrom
alisterburt:pyproject-toml
Open

Migrate to PEP 517/621 with src-layout#3
alisterburt wants to merge 3 commits intomgflast:masterfrom
alisterburt:pyproject-toml

Conversation

@alisterburt
Copy link

Hey! Not sure if this is welcome but this PR modernizes the packaging setup to follow current Python best practices

What's Changed

  • Replaced setup.py with pyproject.toml (PEP 517/621 compliant)
  • Restructured to src-layout (src/easymode/)
  • Added hatchling build backend with git tag-based versioning
  • Added CI/CD via GitHub Actions
  • Added pre-commit hooks (ruff, mypy) and pytest infrastructure (not enabled unless you run pre-commit install)
  • Updated docs with installation instructions

This was mainly done to enable end users to install/run easymode with uv which likes modern python packages. The end user experience then involves no python environment management, they just install uv then

uvx easymode bla

The workflow for publishing is the biggest change, to use this deployment workflow you would need to set up a trusted publisher then pushing a tagged commit (git tag -a v0.0.5 -m "v0.0.5" then git push --follow-tags) will trigger the upload to pypi job in the action at .github/workflows/ci.yml

It's quite nice as you see the test/build/deploy in the actions tab for your repo, e.g. https://github.com/teamtomo/starfile/actions/runs/15401045856

- Restructure package to use src/easymode/ layout
- Replace setup.py with modern pyproject.toml
- Add hatchling build backend with hatch-vcs versioning
- Add comprehensive CI/CD via GitHub Actions
- Add pre-commit hooks (ruff, mypy, validate-pyproject)
- Add pytest testing infrastructure
- Preserve GPL v3 license and all functionality
- Version: v0.0.2 (managed via git tags)

BREAKING CHANGES:
- Minimum Python version now 3.10 (previously implicit 3.7+)
- Package structure changed to src-layout (import paths unchanged)
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

Comments