Skip to content

Commit 8b9eb24

Browse files
authored
docs: work sphinx documentation into main README (#355)
1 parent 35ae106 commit 8b9eb24

File tree

2 files changed

+347
-83
lines changed

2 files changed

+347
-83
lines changed

DEVELOPMENT.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## Developing
2+
3+
For development, you'll need to setup the environment to run the tests. This repository is using
4+
tox to run the test suite to test against multiple versions of Python. Running the tests is as simple as running this command in the makefile:
5+
6+
```
7+
tox -e py311
8+
```
9+
10+
This command will take care of downloading the client specifications and putting them in the correct place in the repository, and install all the dependencies you need.
11+
12+
However, there are some caveats to this method. There is no easy way to run a single test, and running the entire test suite can be slow.
13+
14+
### Manual setup
15+
16+
First, make sure you have pip or pip3 installed.
17+
18+
Then set up your virtual environment:
19+
20+
Linux & Mac:
21+
22+
```
23+
python3 -m venv venv
24+
source venv/bin/activate
25+
```
26+
27+
Windows + cmd:
28+
29+
```
30+
python -m venv venv
31+
venv\Scripts\activate.bat
32+
```
33+
34+
Powershell:
35+
36+
```
37+
python -m venv venv
38+
venv\Scripts\activate.bat
39+
```
40+
41+
Once you've done your setup, run:
42+
```
43+
pip install -r requirements.txt
44+
```
45+
46+
Run the get-spec script to download the client specifications tests:
47+
```
48+
./scripts/get-spec.sh
49+
```
50+
51+
Now you can run the tests by running `pytest` in the root directory.
52+
53+
In order to run a single test, run the following command:
54+
55+
```
56+
pytest testfile.py::function_name
57+
58+
# example: pytest tests/unit_tests/test_client.py::test_consistent_results
59+
```
60+
61+
### Linting
62+
63+
In order to lint all the files you can run the following command:
64+
65+
```
66+
make fmt
67+
```

0 commit comments

Comments
 (0)