Skip to content

Commit 73395c1

Browse files
committed
docs: reformat CONTRIBUTING.md
1 parent 84a6577 commit 73395c1

File tree

1 file changed

+37
-22
lines changed

1 file changed

+37
-22
lines changed

CONTRIBUTING.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,69 @@
1-
**Development**
1+
# Development
2+
23
After cloning the project, you'll need to set up the development environment. Here are the guidelines on how to do this.
34

4-
## Virtual Environment with [pdm](https://pdm-project.org/en/latest/)
5+
The development workflow should look like this:
6+
- Add feature/fix bug
7+
- Run tests
8+
- Add tests
9+
- Run tests
10+
- Lint
11+
- Add docs
12+
- Open PR
513

6-
Create a virtual environment in a directory using Python's `.venv` module:
14+
## Create venv with [PDM](https://pdm-project.org/en/latest/)
715

816
```bash
9-
pdm use
17+
pdm venv create 3.10
1018
```
11-
That will create a `./.venv/` directory with Python binaries, allowing you to install packages in an isolated environment.
1219

13-
# Activate the Environment
20+
## Activate venv
1421

1522
```bash
16-
source ./.venv/bin/activate
23+
source .venv/bin/activate
1724
```
18-
## Installing Dependencies
1925

20-
After activating the virtual environment as described above, run:
26+
## Install dependencies with [just](https://github.com/casey/just)
2127

2228
```bash
2329
just install
2430
```
25-
The link to install [just](https://github.com/casey/just).
26-
27-
If you do not want to install just, then follow these steps:
31+
or
2832
```bash
29-
pdm install -G:all
30-
pip install -r docs/requirements.txt
31-
pre-commit install
33+
pdm install -G:all
34+
pip install -r docs/requirements.txt
35+
pre-commit install
3236
```
33-
## Running Tests
34-
To run tests with your current **ASGI Monitor** application and Python environment, use:
37+
38+
## Running tests
3539

3640
```bash
3741
just test
3842
```
39-
or:
40-
43+
or
4144
```bash
4245
pytest tests --cov=asgi_monitor --cov-append --cov-report term-missing -v
4346
```
4447

4548
## Running lint
46-
To run lints with your current **ASGI Monitor** application and Python environment, use:
49+
4750
```bash
4851
just lint
4952
```
50-
or:
51-
53+
or
5254
```bash
5355
pre-commit run --all-files
5456
```
57+
58+
## Build documentation
59+
60+
```bash
61+
just doc
62+
```
63+
or
64+
```bash
65+
sphinx-build -M html docs docs-build
66+
echo "Open file://`pwd`/docs-build/html/index.html"
67+
```
68+
69+
## We look forward to your contribution!

0 commit comments

Comments
 (0)