Skip to content

Commit

Permalink
Add anaconda cloud badge to flask-graphql (#73)
Browse files Browse the repository at this point in the history
* Add anaconda cloud badge to flask-graphql

* docs: update readme and contributing link
  • Loading branch information
KingDarBoja committed Mar 14, 2020
1 parent 88089b6 commit 9691baf
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 13 deletions.
65 changes: 55 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,83 @@ We welcome all kinds of contributions:

## Getting started

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


## Project setup

After cloning this repo, ensure dependencies are installed by running:
### Development with virtualenv (recommended)

After cloning this repo, create a virtualenv:

```console
virtualenv flask-graphql-dev
```

Activate the virtualenv and install dependencies by running:

```console
python pip install -e ".[test]"
```

If you are using Linux or MacOS, you can make use of Makefile command
`make dev-setup`, which is a shortcut for the above python command.

### Development on Conda

You must create a new env (e.g. `flask-graphql-dev`) with the following command:

```sh
make dev-setup
conda create -n flask-graphql-dev python=3.8
```

Then activate the environment with `conda activate flask-graphql-dev`.

Proceed to install all dependencies by running:

```console
python pip install -e ".[test]"
```

And you ready to start development!

## Running tests

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

```sh
make tests
pytest tests --cov=flask_graphql -vv
```

## Development on Conda
If you are using Linux or MacOS, you can make use of Makefile command
`make tests`, which is a shortcut for the above python command.

In order to run `tox` command on conda, you must create a new env (e.g. `flask-grapqhl-dev`) with the following command:
You can also test on several python environments by using tox.

```sh
conda create -n flask-grapqhl-dev python=3.8
### Running tox on virtualenv

Install tox:

```console
pip install tox
```

Then activate the environment with `conda activate flask-grapqhl-dev` and install [tox-conda](https://github.com/tox-dev/tox-conda):
Run `tox` on your virtualenv (do not forget to activate it!)
and that's it!

### Running tox on Conda

In order to run `tox` command on conda, install
[tox-conda](https://github.com/tox-dev/tox-conda):

```sh
conda install -c conda-forge tox-conda
```

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:
This install tox underneath so no need to install it before.

Then uncomment the `requires = tox-conda` line on `tox.ini` file.

Run `tox` and you will see all the environments being created
and all passing tests. :rocket:

18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# Flask-GraphQL

[![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)

Adds GraphQL support to your Flask application.

[![travis][travis-image]][travis-url]
[![pypi][pypi-image]][pypi-url]
[![Anaconda-Server Badge][conda-image]][conda-url]
[![coveralls][coveralls-image]][coveralls-url]

[travis-image]: https://travis-ci.org/graphql-python/flask-graphql.svg?branch=master
[travis-url]: https://travis-ci.org/graphql-python/flask-graphql
[pypi-image]: https://img.shields.io/pypi/v/flask-graphql.svg?style=flat
[pypi-url]: https://pypi.org/project/flask-graphql/
[coveralls-image]: https://coveralls.io/repos/graphql-python/flask-graphql/badge.svg?branch=master&service=github
[coveralls-url]: https://coveralls.io/github/graphql-python/flask-graphql?branch=master
[conda-image]: https://img.shields.io/conda/vn/conda-forge/flask-graphql.svg
[conda-url]: https://anaconda.org/conda-forge/flask-graphql

## Usage

Just use the `GraphQLView` view from `flask_graphql`
Expand Down Expand Up @@ -41,4 +53,4 @@ class UserRootValue(GraphQLView):
```

## Contributing
See [CONTRIBUTING.md](contributing.md)
See [CONTRIBUTING.md](CONTRIBUTING.md)

0 comments on commit 9691baf

Please sign in to comment.