Thank you for your interest in contributing! We welcome contributions via pull requests and appreciate your help in improving this project.
- Search existing issues before submitting a new one.
- When reporting a bug, please include:
- A clear, descriptive title.
- Steps to reproduce the issue.
- Expected and actual behavior.
- Python version and operating system.
- Relevant code snippets or error messages.
- Create a new branch for your feature or bugfix (with the github issue in the name).
- Clone the repository and set it up:
git clone --recurse-submodules https://github.com/daggerml/python-lib.git
- Make your changes in the new branch.
- Write or update tests as needed.
- Ensure all tests pass locally.
- Push to your branch on GitHub.
- Open a pull request against the
masterbranch of this repository.
- Follow PEP 8 for Python code style.
- Use numpy style docstrings for all public modules, classes, functions, and methods.
- Write clear, concise commit messages.
- Keep pull requests focused and minimal.
- Add or update unit tests for any new features or bug fixes.
- Use pytest for running tests.
- The testing requirements are included in the
testfeature for the library.- You can run tests using hatch:
hatch run pytest . - If you're using vscode, you can create a venv with the
testfeature and run tests with the command palette:Python: Run Tests - Or install the
testfeature with pip and run tests:pip install -e </path/to/library>[test] pytest .
- You can run tests using hatch:
- We mark tests with
@pytest.mark.slowfor those that take longer to run. You can run only the fast tests with:pytest -m "not slow" . - We mark tests that require
daggerml-clito be installed with@pytest.mark.needs_dml. You can exclude those tests with:pytest -m "not needs_dml" . - Run all tests locally before submitting a pull request:
- Ensure your code passes all tests and does not decrease code coverage.
- If your changes introduce new dependencies, please update
pyproject.toml, but we prefer to keep the dependencies to a minimum.
Thank you for helping make this project better!