mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-10 19:56:45 +03:00
Update README Contributing section to encourage use of virtualenv (#765)
This commit is contained in:
parent
12ee52a13a
commit
b72dfa87a4
12
README.md
12
README.md
|
@ -73,9 +73,11 @@ If you want to learn even more, you can also check the following [examples](exam
|
|||
|
||||
## Contributing
|
||||
|
||||
After cloning this repo, ensure dependencies are installed by running:
|
||||
After cloning this repo, create a [virtualenv](https://virtualenv.pypa.io/en/stable/) and ensure dependencies are installed by running:
|
||||
|
||||
```sh
|
||||
virtualenv venv
|
||||
source venv/bin/activate
|
||||
pip install -e ".[test]"
|
||||
```
|
||||
|
||||
|
@ -87,7 +89,7 @@ py.test PATH/TO/MY/DIR/ # All tests in directory
|
|||
```
|
||||
|
||||
Add the `-s` flag if you have introduced breakpoints into the code for debugging.
|
||||
Add the `-v` ("verbose") flag to get more detailed test output. For even more detailed output, use `-vv`.
|
||||
Add the `-v` ("verbose") flag to get more detailed test output. For even more detailed output, use `-vv`.
|
||||
Check out the [pytest documentation](https://docs.pytest.org/en/latest/) for more options and test running controls.
|
||||
|
||||
You can also run the benchmarks with:
|
||||
|
@ -96,15 +98,15 @@ You can also run the benchmarks with:
|
|||
py.test graphene --benchmark-only
|
||||
```
|
||||
|
||||
Graphene supports several versions of Python. To make sure that changes do not break compatibility with any of those versions, we use `tox` to create virtualenvs for each python version and run tests with that version. To run against all python versions defined in the `tox.ini` config file, just run:
|
||||
Graphene supports several versions of Python. To make sure that changes do not break compatibility with any of those versions, we use `tox` to create virtualenvs for each python version and run tests with that version. To run against all python versions defined in the `tox.ini` config file, just run:
|
||||
```sh
|
||||
tox
|
||||
```
|
||||
If you wish to run against a specific version defined in the `tox.ini` file:
|
||||
If you wish to run against a specific version defined in the `tox.ini` file:
|
||||
```sh
|
||||
tox -e py36
|
||||
```
|
||||
Tox can only use whatever versions of python are installed on your system. When you create a pull request, Travis will also be running the same tests and report the results, so there is no need for potential contributors to try to install every single version of python on their own system ahead of time. We appreciate opening issues and pull requests to make graphene even more stable & useful!
|
||||
Tox can only use whatever versions of python are installed on your system. When you create a pull request, Travis will also be running the same tests and report the results, so there is no need for potential contributors to try to install every single version of python on their own system ahead of time. We appreciate opening issues and pull requests to make graphene even more stable & useful!
|
||||
|
||||
### Documentation
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user