Skip to content

Commit d96ec55

Browse files
authored
Merge branch 'master' into fix/ariadne-link
2 parents 7897396 + f1e8f48 commit d96ec55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+966
-344
lines changed

.github/workflows/coveralls.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Set up Python 3.8
14+
- name: Set up Python 3.9
1515
uses: actions/setup-python@v2
1616
with:
17-
python-version: 3.8
17+
python-version: 3.9
1818
- name: Build wheel and source tarball
1919
run: |
2020
pip install wheel

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v2
11-
- name: Set up Python 3.8
11+
- name: Set up Python 3.9
1212
uses: actions/setup-python@v2
1313
with:
14-
python-version: 3.8
14+
python-version: 3.9
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip

.github/workflows/tests.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
include:
28-
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
29-
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
30-
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
28+
- {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310}
29+
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
30+
- { name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38 }
31+
- { name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37 }
32+
- { name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36 }
3133
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions/setup-python@v2
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-python@v3
3436
with:
3537
python-version: ${{ matrix.python }}
3638

@@ -45,10 +47,20 @@ jobs:
4547
run: echo "::set-output name=dir::$(pip cache dir)"
4648

4749
- name: cache pip dependencies
48-
uses: actions/cache@v2
50+
uses: actions/cache@v3
4951
with:
5052
path: ${{ steps.pip-cache.outputs.dir }}
5153
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}
5254

5355
- run: pip install tox
5456
- run: tox -e ${{ matrix.tox }}
57+
- name: Upload coverage.xml
58+
if: ${{ matrix.python == '3.10' }}
59+
uses: actions/upload-artifact@v3
60+
with:
61+
name: graphene-sqlalchemy-coverage
62+
path: coverage.xml
63+
if-no-files-found: error
64+
- name: Upload coverage.xml to codecov
65+
if: ${{ matrix.python == '3.10' }}
66+
uses: codecov/codecov-action@v3

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
default_language_version:
2-
python: python3.8
2+
python: python3.9
33

44
repos:
5-
- repo: git://github.com/pre-commit/pre-commit-hooks
6-
rev: v2.3.0
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.3.0
77
hooks:
88
- id: check-merge-conflict
99
- id: check-json
@@ -16,15 +16,15 @@ repos:
1616
- --autofix
1717
- id: trailing-whitespace
1818
exclude: README.md
19-
- repo: git://github.com/asottile/pyupgrade
20-
rev: v2.24.0
19+
- repo: https://github.com/asottile/pyupgrade
20+
rev: v2.37.3
2121
hooks:
2222
- id: pyupgrade
23-
- repo: git://github.com/ambv/black
24-
rev: 19.3b0
23+
- repo: https://github.com/psf/black
24+
rev: 22.6.0
2525
hooks:
2626
- id: black
27-
- repo: git://github.com/PyCQA/flake8
28-
rev: 3.8.4
27+
- repo: https://github.com/PyCQA/flake8
28+
rev: 5.0.4
2929
hooks:
3030
- id: flake8

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
**We are looking for contributors**! Please check the [ROADMAP](https://github.com/graphql-python/graphene/blob/master/ROADMAP.md) to see how you can help ❤️
66

7-
---
8-
9-
**The below readme is the documentation for the `dev` (prerelease) version of Graphene. To view the documentation for the latest stable Graphene version go to the [v2 docs](https://docs.graphene-python.org/en/stable/)**
10-
11-
---
12-
137
## Introduction
148

159
[Graphene](http://graphene-python.org) is an opinionated Python library for building GraphQL schemas/types fast and easily.
@@ -34,10 +28,10 @@ Also, Graphene is fully compatible with the GraphQL spec, working seamlessly wit
3428

3529
## Installation
3630

37-
For instaling graphene, just run this command in your shell
31+
To install `graphene`, just run this command in your shell
3832

3933
```bash
40-
pip install "graphene>=2.0"
34+
pip install "graphene>=3.0"
4135
```
4236

4337
## Examples

README.rst

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
**We are looking for contributors**! Please check the
2-
`ROADMAP <https://github.com/graphql-python/graphene/blob/master/ROADMAP.md>`__
3-
to see how you can help ❤️
4-
5-
--------------
6-
71
|Graphene Logo| `Graphene <http://graphene-python.org>`__ |Build Status| |PyPI version| |Coverage Status|
82
=========================================================================================================
93

4+
`💬 Join the community on
5+
Slack <https://join.slack.com/t/graphenetools/shared_invite/enQtOTE2MDQ1NTg4MDM1LTA4Nzk0MGU0NGEwNzUxZGNjNDQ4ZjAwNDJjMjY0OGE1ZDgxZTg4YjM2ZTc4MjE2ZTAzZjE2ZThhZTQzZTkyMmM>`__
6+
7+
**We are looking for contributors**! Please check the
8+
`ROADMAP <https://github.com/graphql-python/graphene/blob/master/ROADMAP.md>`__
9+
to see how you can help ❤️
1010

1111
Introduction
1212
------------
1313

14-
`Graphene <http://graphene-python.org>`__ is a Python library for
15-
building GraphQL schemas/types fast and easily.
14+
`Graphene <http://graphene-python.org>`__ is an opinionated Python
15+
library for building GraphQL schemas/types fast and easily.
1616

1717
- **Easy to use:** Graphene helps you use GraphQL in Python without
1818
effort.
@@ -27,17 +27,18 @@ Integrations
2727

2828
Graphene has multiple integrations with different frameworks:
2929

30-
+---------------------+----------------------------------------------------------------------------------------------+
31-
| integration | Package |
32-
+=====================+==============================================================================================+
33-
| Django | `graphene-django <https://github.com/graphql-python/graphene-django/>`__ |
34-
+---------------------+----------------------------------------------------------------------------------------------+
35-
| SQLAlchemy | `graphene-sqlalchemy <https://github.com/graphql-python/graphene-sqlalchemy/>`__ |
36-
+---------------------+----------------------------------------------------------------------------------------------+
37-
| Google App Engine | `graphene-gae <https://github.com/graphql-python/graphene-gae/>`__ |
38-
+---------------------+----------------------------------------------------------------------------------------------+
39-
| Peewee | *In progress* (`Tracking Issue <https://github.com/graphql-python/graphene/issues/289>`__) |
40-
+---------------------+----------------------------------------------------------------------------------------------+
30+
+-------------------+-------------------------------------------------+
31+
| integration | Package |
32+
+===================+=================================================+
33+
| Django | `graphene-django <https:/ |
34+
| | /github.com/graphql-python/graphene-django/>`__ |
35+
+-------------------+-------------------------------------------------+
36+
| SQLAlchemy | `graphene-sqlalchemy <https://git |
37+
| | hub.com/graphql-python/graphene-sqlalchemy/>`__ |
38+
+-------------------+-------------------------------------------------+
39+
| Google App Engine | `graphene-gae <http |
40+
| | s://github.com/graphql-python/graphene-gae/>`__ |
41+
+-------------------+-------------------------------------------------+
4142

4243
Also, Graphene is fully compatible with the GraphQL spec, working
4344
seamlessly with all GraphQL clients, such as
@@ -48,17 +49,11 @@ seamlessly with all GraphQL clients, such as
4849
Installation
4950
------------
5051

51-
For instaling graphene, just run this command in your shell
52+
To install `graphene`, just run this command in your shell
5253

5354
.. code:: bash
5455
55-
pip install "graphene>=2.0"
56-
57-
2.0 Upgrade Guide
58-
-----------------
59-
60-
Please read `UPGRADE-v2.0.md </UPGRADE-v2.0.md>`__ to learn how to
61-
upgrade.
56+
pip install "graphene>=3.0"
6257
6358
Examples
6459
--------
@@ -67,26 +62,26 @@ Here is one example for you to get started:
6762

6863
.. code:: python
6964
70-
import graphene
65+
import graphene
7166
72-
class Query(graphene.ObjectType):
73-
hello = graphene.String(description='A typical hello world')
67+
class Query(graphene.ObjectType):
68+
hello = graphene.String(description='A typical hello world')
7469
75-
def resolve_hello(self, info):
76-
return 'World'
70+
def resolve_hello(self, info):
71+
return 'World'
7772
78-
schema = graphene.Schema(query=Query)
73+
schema = graphene.Schema(query=Query)
7974
8075
Then Querying ``graphene.Schema`` is as simple as:
8176

8277
.. code:: python
8378
84-
query = '''
85-
query SayHello {
86-
hello
87-
}
88-
'''
89-
result = schema.execute(query)
79+
query = '''
80+
query SayHello {
81+
hello
82+
}
83+
'''
84+
result = schema.execute(query)
9085
9186
If you want to learn even more, you can also check the following
9287
`examples <examples/>`__:
@@ -110,20 +105,20 @@ dependencies are installed by running:
110105

111106
.. code:: sh
112107
113-
virtualenv venv
114-
source venv/bin/activate
115-
pip install -e ".[test]"
108+
virtualenv venv
109+
source venv/bin/activate
110+
pip install -e ".[test]"
116111
117112
Well-written tests and maintaining good test coverage is important to
118113
this project. While developing, run new and existing tests with:
119114

120115
.. code:: sh
121116
122-
py.test graphene/relay/tests/test_node.py # Single file
123-
py.test graphene/relay # All tests in directory
117+
py.test graphene/relay/tests/test_node.py # Single file
118+
py.test graphene/relay # All tests in directory
124119
125120
Add the ``-s`` flag if you have introduced breakpoints into the code for
126-
debugging. Add the ``-v`` ("verbose") flag to get more detailed test
121+
debugging. Add the ``-v`` (verbose) flag to get more detailed test
127122
output. For even more detailed output, use ``-vv``. Check out the
128123
`pytest documentation <https://docs.pytest.org/en/latest/>`__ for more
129124
options and test running controls.
@@ -132,7 +127,7 @@ You can also run the benchmarks with:
132127

133128
.. code:: sh
134129
135-
py.test graphene --benchmark-only
130+
py.test graphene --benchmark-only
136131
137132
Graphene supports several versions of Python. To make sure that changes
138133
do not break compatibility with any of those versions, we use ``tox`` to
@@ -142,14 +137,14 @@ config file, just run:
142137

143138
.. code:: sh
144139
145-
tox
140+
tox
146141
147142
If you wish to run against a specific version defined in the ``tox.ini``
148143
file:
149144

150145
.. code:: sh
151146
152-
tox -e py36
147+
tox -e py36
153148
154149
Tox can only use whatever versions of Python are installed on your
155150
system. When you create a pull request, Travis will also be running the
@@ -168,7 +163,7 @@ An HTML version of the documentation is produced by running:
168163

169164
.. code:: sh
170165
171-
make docs
166+
make docs
172167
173168
.. |Graphene Logo| image:: http://graphene-python.org/favicon.png
174169
.. |Build Status| image:: https://travis-ci.org/graphql-python/graphene.svg?branch=master

UPGRADE-v1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Query(ObjectType):
153153
```
154154

155155
Also, if you wanted to create an `ObjectType` that implements `Node`, you have to do it
156-
explicity.
156+
explicitly.
157157

158158
## Django
159159

UPGRADE-v2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def resolve_my_field(root, info, my_arg):
123123
return ...
124124
```
125125

126-
**PS.: Take care with receiving args like `my_arg` as above. This doesn't work for optional (non-required) arguments as stantard `Connection`'s arguments (first, before, after, before).**
126+
**PS.: Take care with receiving args like `my_arg` as above. This doesn't work for optional (non-required) arguments as standard `Connection`'s arguments (first, last, after, before).**
127127
You may need something like this:
128128

129129
```python

0 commit comments

Comments
 (0)