The basic project structure looks like this:
.
├── src
│ └── endureio
│ ├── __init__.py
│ ├── fit.py
│ └── py.typed
├── tests
│ ├── data
│ │ └── {test files needed for tests}
│ └── {test_*.py files}
└── uv.lock
The main thing to note is that all the code is in the src directory, and all the tests are in the tests directory.
Dependencies are managed in the pyproject.toml file and managed with uv(uv).
To add dependencies, run uv add <dependency>.
To add a development dependency, run uv add --dev <dependency>.
To run tests, run either uv run python -m pytest or the shortcut make test.
You can select specific tests to run by passing the -k flag pytest command directly, or by setting the pytestargs and running make test:
pytestargs="-k some_test" make test
- Never push to
maindirectly - Create feature branches named
feature/{initials}_{feature_slug}(e.g.git checkout -b feature/ag_my_awesome_feature) - Create a Pull Request to
mainwhen ready - Try not to merge your own PRs (we might enforce stricter rules later but for now let's keep it simple and fast)
- Squash commits (be reasonable)
- Update
CHANGELOG.md - All tests pass
To install the pre-commit hooks run the command uv run pre-commit install. Now pre-commit will run automatically on git commit.
To publish a new version, run make publish.