Skip to content

Commit fa335a2

Browse files
committed
Add development section to installation docs
1 parent c6d6292 commit fa335a2

1 file changed

Lines changed: 36 additions & 7 deletions

File tree

docs/installation.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,67 @@ import dapi
2121
print(dapi.__version__)
2222
```
2323

24-
## Development version
24+
## Update
25+
26+
```bash
27+
pip install --upgrade dapi
28+
```
29+
30+
## Development
31+
32+
### Install the dev branch
33+
34+
To test unreleased features from the `dev` branch:
2535

2636
```bash
2737
pip install git+https://github.com/DesignSafe-CI/dapi.git@dev
2838
```
2939

30-
Or in a notebook:
40+
Or in a DesignSafe Jupyter notebook:
3141

3242
```python
3343
%pip uninstall dapi --yes
3444
%pip install git+https://github.com/DesignSafe-CI/dapi.git@dev --quiet
3545
```
3646

37-
## Local editable install
47+
Restart the kernel after installing.
48+
49+
### Local editable install
50+
51+
For local development where changes take effect immediately:
3852

3953
```bash
4054
git clone https://github.com/DesignSafe-CI/dapi.git
4155
cd dapi
56+
git checkout dev
4257
pip install -e .
4358
```
4459

45-
### Set up pre-commit hook
60+
### Pre-commit hook
4661

47-
The repo includes a pre-commit hook that auto-formats with `ruff format` and blocks commits that fail `ruff check`:
62+
The repo includes a pre-commit hook that auto-formats code with `ruff format` and blocks commits that fail `ruff check`:
4863

4964
```bash
5065
cp scripts/pre-commit .git/hooks/pre-commit
5166
chmod +x .git/hooks/pre-commit
5267
```
5368

54-
## Update
69+
### Running tests
5570

5671
```bash
57-
pip install --upgrade dapi
72+
pip install pytest
73+
pytest tests/ -v
74+
```
75+
76+
### Linting
77+
78+
```bash
79+
ruff format --check .
80+
ruff check .
81+
```
82+
83+
To auto-fix lint errors:
84+
85+
```bash
86+
ruff check --fix .
5887
```

0 commit comments

Comments
 (0)