Skip to content

Commit d1b59cc

Browse files
committed
addint CONTRIBUTING.md
1 parent 0dc2a1f commit d1b59cc

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

CONTRIBUTING.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
See the [Scientific Python Developer Guide][spc-dev-intro] for a detailed
2+
description of best practices for developing scientific packages.
3+
4+
[spc-dev-intro]: https://learn.scientific-python.org/development/
5+
6+
# Setting up a development environment manually
7+
8+
You can set up a development environment by running:
9+
10+
```zsh
11+
python3 -m venv venv # create a virtualenv called venv
12+
source ./venv/bin/activate # now `python` points to the virtualenv python
13+
pip install -v -e ".[dev]" # -v for verbose, -e for editable, [dev] for dev dependencies
14+
```
15+
16+
# Post setup
17+
18+
You should prepare pre-commit, which will help you by checking that commits pass
19+
required checks:
20+
21+
```bash
22+
pip install pre-commit # or brew install pre-commit on macOS
23+
pre-commit install # this will install a pre-commit hook into the git repo
24+
```
25+
26+
You can also/alternatively run `pre-commit run` (changes only) or
27+
`pre-commit run --all-files` to check even without installing the hook.
28+
29+
# Testing
30+
31+
This repo uses `unittest` for testing. You can run locally the tests by running the following command:
32+
33+
```bash
34+
python -m unittest discover -s tests
35+
```
36+
there is also a autamtated test pipeline that runs the tests on every push to the repository (see [here](.github/workflows/ci.yml)).
37+
38+
39+
# Pre-commit
40+
41+
This project uses pre-commit for all style checking. Install pre-commit and run:
42+
43+
```bash
44+
pre-commit run -a
45+
```
46+
47+
to check all files.

0 commit comments

Comments
 (0)