Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tox & actions updates #1143

Merged
merged 6 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Build wheel and source tarball
run: |
pip install wheel
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v1
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
strategy:
max-parallel: 4
matrix:
django: ["2.2", "3.0", "3.1"]
python-version: ["3.6", "3.7", "3.8"]
django: ["2.2", "3.0", "3.1", "3.2"]
python-version: ["3.6", "3.7", "3.8", "3.9"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial-relay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ from the command line.
$ python ./manage.py runserver

Performing system checks...
Django version 1.11, using settings 'cookbook.settings'
Django version 3.1.7, using settings 'cookbook.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Expand Down
5 changes: 1 addition & 4 deletions graphene_django/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,7 @@ def dynamic_type():
if not _type:
return

# We do this for a bug in Django 1.8, where null attr
# is not available in the OneToOneRel instance
null = getattr(field, "null", True)
return Field(_type, required=not null)
return Field(_type, required=not field.null)

return Dynamic(dynamic_type)

Expand Down
5 changes: 1 addition & 4 deletions graphene_django/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
from django.conf import settings
from django.test.signals import setting_changed

try:
import importlib # Available in Python 3.1+
except ImportError:
from django.utils import importlib # Will be removed in Django 1.9
import importlib # Available in Python 3.1+


# Copied shamelessly from Django REST Framework
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: PyPy",
"Framework :: Django",
"Framework :: Django :: 1.11",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
],
keywords="api graphql protocol rest relay graphene",
packages=find_packages(exclude=["tests", "examples", "examples.*"]),
Expand Down
15 changes: 8 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
[tox]
envlist =
py{36,37,38}-django{22,30,31,master},
py{36,37,38,39}-django{22,30,31,32,main},
black,flake8

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39

[gh-actions:env]
DJANGO =
2.2: django22
3.0: django30
3.1: django31
master: djangomaster
3.2: django32
main: djangomain

[testenv]
passenv = *
Expand All @@ -24,24 +26,23 @@ setenv =
deps =
-e.[test]
psycopg2-binary
django111: Django>=1.11,<2.0
django111: djangorestframework<3.12
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<3.0
django30: Django>=3.0a1,<3.1
django31: Django>=3.1,<3.2
djangomaster: https://github.com/django/django/archive/master.zip
django32: Django>=3.2a1,<3.3
djangomain: https://github.com/django/django/archive/main.zip
commands = {posargs:py.test --cov=graphene_django graphene_django examples}

[testenv:black]
basepython = python3.8
basepython = python3.9
deps = -e.[dev]
commands =
black --exclude "/migrations/" graphene_django examples setup.py --check

[testenv:flake8]
basepython = python3.8
basepython = python3.9
deps = -e.[dev]
commands =
flake8 graphene_django examples setup.py