You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+55-10
Original file line number
Diff line number
Diff line change
@@ -12,38 +12,83 @@ We welcome all kinds of contributions:
12
12
13
13
## Getting started
14
14
15
-
If you have a specific contribution in mind, be sure to check the [issues](https://github.com/graphql-python/flask-graphql/issues) and [projects](https://github.com/graphql-python/flask-graphql/projects) in progress - someone could already be working on something similar and you can help out.
15
+
If you have a specific contribution in mind, be sure to check the [issues](https://github.com/graphql-python/flask-graphql/issues) and [pull requests](https://github.com/graphql-python/flask-graphql/pulls) in progress - someone could already be working on something similar and you can help out.
16
16
17
17
18
18
## Project setup
19
19
20
-
After cloning this repo, ensure dependencies are installed by running:
20
+
### Development with virtualenv (recommended)
21
+
22
+
After cloning this repo, create a virtualenv:
23
+
24
+
```console
25
+
virtualenv flask-graphql-dev
26
+
```
27
+
28
+
Activate the virtualenv and install dependencies by running:
29
+
30
+
```console
31
+
python pip install -e ".[test]"
32
+
```
33
+
34
+
If you are using Linux or MacOS, you can make use of Makefile command
35
+
`make dev-setup`, which is a shortcut for the above python command.
36
+
37
+
### Development on Conda
38
+
39
+
You must create a new env (e.g. `flask-graphql-dev`) with the following command:
21
40
22
41
```sh
23
-
make dev-setup
42
+
conda create -n flask-graphql-dev python=3.8
24
43
```
25
44
45
+
Then activate the environment with `conda activate flask-graphql-dev`.
46
+
47
+
Proceed to install all dependencies by running:
48
+
49
+
```console
50
+
python pip install -e ".[test]"
51
+
```
52
+
53
+
And you ready to start development!
54
+
26
55
## Running tests
27
56
28
57
After developing, the full test suite can be evaluated by running:
29
58
30
59
```sh
31
-
make tests
60
+
pytest tests --cov=flask_graphql -vv
32
61
```
33
62
34
-
## Development on Conda
63
+
If you are using Linux or MacOS, you can make use of Makefile command
64
+
`make tests`, which is a shortcut for the above python command.
35
65
36
-
In order to run `tox` command on conda, you must create a new env (e.g. `flask-grapqhl-dev`) with the following command:
66
+
You can also test on several python environments by using tox.
37
67
38
-
```sh
39
-
conda create -n flask-grapqhl-dev python=3.8
68
+
### Running tox on virtualenv
69
+
70
+
Install tox:
71
+
72
+
```console
73
+
pip install tox
40
74
```
41
75
42
-
Then activate the environment with `conda activate flask-grapqhl-dev` and install [tox-conda](https://github.com/tox-dev/tox-conda):
76
+
Run `tox` on your virtualenv (do not forget to activate it!)
Uncomment the `requires = tox-conda` line on `tox.ini` file and that's it! Run `tox` and you will see all the environments being created and all passing tests. :rocket:
88
+
This install tox underneath so no need to install it before.
89
+
90
+
Then uncomment the `requires = tox-conda` line on `tox.ini` file.
91
+
92
+
Run `tox` and you will see all the environments being created
0 commit comments