`# Contributing
This is a quick guide on how to follow best practice and contribute smoothly to ElementEmbeddings.
We follow the [GitHub flow] (https://guides.github.com/introduction/flow/index.html), using branches for new work and pull requests for verifying the work.
The steps for a new piece of work can be summarised as follows:
- Push up or create an issue.
- Create a branch from main, with a sensible name that relates to the issue.
- Do the work and commit changes to the branch. Push the branch regularly to GitHub to make sure no work is accidentally lost.
- Write or update unit tests for the code you work on.
- When you are finished with the work, ensure that all of the unit tests pass on your own machine.
- Open a pull request on the pull request page.
- If nobody acknowledges your pull request promptly, feel free to poke one of the main developers into action.
For a general overview of using pull requests on GitHub look in the GitHub docs.
When creating a pull request you should:
- Ensure that the title succinctly describes the changes so it is easy to read on the overview page
- Reference the issue which the pull request is closing
Recommended reading: How to Write the Perfect Pull Request
When developing locally with uv, sync the project together with its development,
documentation, and lint tooling:
uv sync --extra dev --extra docsThis will allow you to run the tests locally with pytest as described in the main README,
as well as run prek hooks for linting and formatting with ruff.
To install the git hooks (only needs to be done once):
uv run prek install
uv run prek run --all-files
uv run ty check src/elementembeddingsprek will check files when you commit changes and automatically apply fixes where supported. If a hook rewrites files, stage those changes again before retrying the commit.
`