Contributing
This document provides instructions for contributing actual code to this project.
For a crash course in dimensioned linear algebra, see Theory.
Development environment setup
- Create a fork of the repository.
- Set up dependencies using Poetry.
- Follow Poetry's installation instructions.
- Make sure Poetry's executable is added to your
$PATH.
(Poetry should describe how to do this in the terminal output following successful installation. Runningpoetry --versionshould verify it's been installed and added to your$PATHcorrectly.) - Install multi-DimPy's dependencies and development dependencies using
poetry install.
- Install pre-commit hooks using
poetry run pre-commit install.
(You may need to restart your editor for pre-commit hooks to get the correct$PATHwith Poetry's executable.)
Now your environment should be ready to go!
To run tools like ruff ... or pytest ..., you'll instead use poetry run ruff ... and poetry run pytest ..., etc.
Making contributions
To start making commits, create a branch from your fork's main branch.
To get your changes onto the main branch of multi-DimPy:
- Pull the latest development on
multi-dimpy/mainto yourmainbranch. - Merge any changes in
maininto your branch. - Make sure all tests pass (using
poetry run pytest). - Push your branch to your fork.
- Make a pull request from your branch into
multi-dimpy/main, and make sure all checks pass so that the changes can be approved and merged intomain.
Other notes
Spell checking
The directory .cspell is for managing custom dictionaries used by the VS Code extension Code Spell Checker.
It's not required for development, but it (probably) won't hurt.
To use the extension with these dictionaries, assuming you've opened the root directory of your fork's clone as a VS Code Workspace, you can add the following to .vscode/settings.json:
{
// ...
"cSpell.customDictionaries": {
"DimPy": {
"path": "${workspaceFolder}/.cspell/dimpy-dictionary.txt",
"addWords": true,
"scope": "workspace"
},
// Repeat for other dictionaries.
// The top-level key (e.g., "DimPy") doesn't matter, just the file path.
},
// ...
}