Skip to content

Commit 9691baf

Browse files
authoredMar 14, 2020
Add anaconda cloud badge to flask-graphql (#73)
* Add anaconda cloud badge to flask-graphql * docs: update readme and contributing link
1 parent 88089b6 commit 9691baf

File tree

2 files changed

+70
-13
lines changed

2 files changed

+70
-13
lines changed
 

Diff for: ‎CONTRIBUTING.md

+55-10
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,83 @@ We welcome all kinds of contributions:
1212

1313
## Getting started
1414

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.
1616

1717

1818
## Project setup
1919

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:
2140

2241
```sh
23-
make dev-setup
42+
conda create -n flask-graphql-dev python=3.8
2443
```
2544

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+
2655
## Running tests
2756

2857
After developing, the full test suite can be evaluated by running:
2958

3059
```sh
31-
make tests
60+
pytest tests --cov=flask_graphql -vv
3261
```
3362

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.
3565

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.
3767

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
4074
```
4175

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!)
77+
and that's it!
78+
79+
### Running tox on Conda
80+
81+
In order to run `tox` command on conda, install
82+
[tox-conda](https://github.com/tox-dev/tox-conda):
4383

4484
```sh
4585
conda install -c conda-forge tox-conda
4686
```
4787

48-
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
93+
and all passing tests. :rocket:
4994

Diff for: ‎README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
# Flask-GraphQL
22

3-
[![Build Status](https://travis-ci.org/graphql-python/flask-graphql.svg?branch=master)](https://travis-ci.org/graphql-python/flask-graphql) [![Coverage Status](https://coveralls.io/repos/graphql-python/flask-graphql/badge.svg?branch=master&service=github)](https://coveralls.io/github/graphql-python/flask-graphql?branch=master) [![PyPI version](https://badge.fury.io/py/flask-graphql.svg)](https://badge.fury.io/py/flask-graphql)
4-
53
Adds GraphQL support to your Flask application.
64

5+
[![travis][travis-image]][travis-url]
6+
[![pypi][pypi-image]][pypi-url]
7+
[![Anaconda-Server Badge][conda-image]][conda-url]
8+
[![coveralls][coveralls-image]][coveralls-url]
9+
10+
[travis-image]: https://travis-ci.org/graphql-python/flask-graphql.svg?branch=master
11+
[travis-url]: https://travis-ci.org/graphql-python/flask-graphql
12+
[pypi-image]: https://img.shields.io/pypi/v/flask-graphql.svg?style=flat
13+
[pypi-url]: https://pypi.org/project/flask-graphql/
14+
[coveralls-image]: https://coveralls.io/repos/graphql-python/flask-graphql/badge.svg?branch=master&service=github
15+
[coveralls-url]: https://coveralls.io/github/graphql-python/flask-graphql?branch=master
16+
[conda-image]: https://img.shields.io/conda/vn/conda-forge/flask-graphql.svg
17+
[conda-url]: https://anaconda.org/conda-forge/flask-graphql
18+
719
## Usage
820

921
Just use the `GraphQLView` view from `flask_graphql`
@@ -41,4 +53,4 @@ class UserRootValue(GraphQLView):
4153
```
4254

4355
## Contributing
44-
See [CONTRIBUTING.md](contributing.md)
56+
See [CONTRIBUTING.md](CONTRIBUTING.md)

0 commit comments

Comments
 (0)
Please sign in to comment.