If you choose to clone the repository, you can install the package by running the following command from the root directory of the repository:
pip install .
Otherwise, you can use pip:
pip install contraqctor
To install notebooks, run
install_notebooks [path]
To develop the code, run
pip install -e .[dev]
Contributions to this repository are welcome! However, please ensure that your code adheres to the recommended DevOps practices below:
We use ruff as our primary linting tool.
Attempt to add tests when new features are added.
To run the currently available tests, run uv run pytest
from the root of the repository.
We use uv to manage our lock files and therefore encourage everyone to use uv as a package manager as well. P
For internal members, please create a branch. For external members, please fork the repository and open a pull request from the fork. We'll primarily use conventional commits style for commit messages. Roughly, they should follow the pattern:
<type>(<scope>): <short summary>
where scope (optional) describes the packages affected by the code changes and type (mandatory) is one of:
- build: Changes that affect build tools or external dependencies (example scopes: pyproject.toml, setup.py)
- ci: Changes to our CI configuration files and scripts (examples: .github/workflows/ci.yml)
- docs: Documentation only changes
- feat: A new feature
- fix: A bugfix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
The table below, from semantic release, shows which commit message gets you which release type when semantic-release
runs (using the default configuration):
Commit message | Release type |
---|---|
fix(pencil): stop graphite breaking when too much pressure applied |
|
feat(pencil): add 'graphiteWidth' option |
|
perf(pencil): remove graphiteWidth option BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reasons. |
(Note that the BREAKING CHANGE: token must be in the footer of the commit) |