Development Guidelines
Install
Clone this repository with git:
git clone git@github.com:crusaderky/ndcsv.git
cd ndcsv
Install anaconda or miniconda (OS-dependent)
conda env create -n ndcsv-3.10 --file ci/requirements-latest.yml python=3.10 conda activate ndcsv-3.10
To keep a fork in sync with the upstream source:
cd ndcsv
git remote add upstream git@github.com:crusaderky/ndcsv.git
git remote -v
git fetch -a upstream
git checkout main
git pull upstream main
git push origin main
Test
Test using py.test
:
py.test ndcsv
Code Formatting
ndcsv uses several code linters (ruff, black, mypy), which are enforced by CI. Developers should run them locally before they submit a PR, through the single command
pre-commit run --all-files
This makes sure that linter versions and options are aligned for all developers.
Optionally, you may wish to setup the pre-commit hooks to run automatically when you make a git commit. This can be done by running:
pre-commit install
from the root of the ndcsv repository. Now the code linters will be run each time
you commit changes. You can skip these checks with git commit --no-verify
or with
the short version git commit -n
.