Skip to content

Commit 494c397

Browse files
committed
feat: add CONTRIBUTING.md
1 parent c2e063a commit 494c397

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
**Development**
2+
After cloning the project, you'll need to set up the development environment. Here are the guidelines on how to do this.
3+
4+
## Virtual Environment with [pdm](https://pdm-project.org/en/latest/)
5+
6+
Create a virtual environment in a directory using Python's `.venv` module:
7+
8+
```bash
9+
pdm use
10+
```
11+
That will create a `./.venv/` directory with Python binaries, allowing you to install packages in an isolated environment.
12+
13+
# Activate the Environment
14+
15+
```bash
16+
source ./.venv/bin/activate
17+
```
18+
## Installing Dependencies
19+
20+
After activating the virtual environment as described above, run:
21+
22+
```bash
23+
just install
24+
```
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:
28+
```bash
29+
pdm install -G:all
30+
pip install -r docs/requirements.txt
31+
pre-commit install
32+
```
33+
## Running Tests
34+
To run tests with your current **ASGI Monitor** application and Python environment, use:
35+
36+
```bash
37+
just test
38+
```
39+
or:
40+
41+
```bash
42+
pytest tests --cov=asgi_monitor --cov-append --cov-report term-missing -v
43+
```
44+
45+
## Running lint
46+
To run lints with your current **ASGI Monitor** application and Python environment, use:
47+
```bash
48+
just lint
49+
```
50+
or:
51+
52+
```bash
53+
pre-commit run --all-files
54+
```

0 commit comments

Comments
 (0)