Skip to content

Commit

Permalink
Prepare backward compatible minor release
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Dec 30, 2019
1 parent 08c5995 commit 512e052
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 47 deletions.
27 changes: 3 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
# Created by https://www.gitignore.io

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
Expand All @@ -26,36 +18,23 @@ var/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.venv/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
*.cover

# Translations
*.mo
*.pot
.idea/

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,26 @@ python:
- 3.5
- 3.6
- 3.7
- 3.8
- pypy3
install:
- pip install pytest pytest-cov flake8
- pip install .
script:
- py.test --cov=graphql_relay
# - flake8
- pytest --cov=graphql_relay
- flake8 setup.py src tests
after_success:
- pip install coveralls
- coveralls

deploy:
provider: pypi
distributions: sdist bdist_wheel
on:
branch: master
tags: true
python: 3.7
skip_existing: true
user: mvanlonden
password:
secure: gu79sV5e3wkUI8eH20TbBRctOOGkuWe6EQUjJP17q1Jm15/sJsehOaaLPiG0psxtqBGABp+z+xXkjhRfNMowY2xJPLjGmpF23pOIWGjBWKLKXzJStegKM6kwJYyHzcykIhBEb74047FhqhcwOgZcsp6sZpfzuby+onevLzPDI0C4jTARw7WAqMln9JIBZJyoQKp9fpr8AoXL2JtHr6sjkeJ94lz1XViL9rtTo7qFYfqYS3XdKO0wJhLfMUXSihIzSWQykBVv+75tMKQr0CtGALXcJSRGT6Sb31GiFyG93rtcOcBvbjFt1MK8aNKyIMhwgSqjcgKvxWAvXn4MsCaabHPVEv0YuT9t9cQzaAvi81LqHkpALgpDfXFfsMzHG18/8ME9TpM8u52r/ST5lhukglfnxWVy4hg8VLZ0iiTtpS3hx1Ba4Uecr++6fI5X+KL3EPabApQM+t4rcC0h4mEbjq3IkZ/ANAIJ2UjKTMcUkbQbKqJ1MY4xQyw+vVugffBmhEWSb4GnQPEadMGD6qfUI+t7epDP0ipp67rOiUooFYGabQp40pf7MxFPG23fvJ3JWbo3fzcIRmQiSalrIL1gFXH2DQnv4xhZvwnci+dIK29mamH0CfmjAJ8BdfzRsjV156BZbfkzXRfWDMes9G2E8S27xJJ2N4ySNIMkaXsu1u4=
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[flake8]
exclude = tests/*,setup.py
max-line-length = 160
max-line-length = 120
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ def run_tests(self):
errno = pytest.main(self.pytest_args)
sys.exit(errno)


setup(
name='graphql-relay',
version='0.4.5',
version='0.5.0',

description='Relay implementation for Python',
long_description=open('README.rst').read(),
Expand All @@ -43,9 +44,10 @@ def run_tests(self):
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: PyPy',
],

Expand All @@ -58,7 +60,7 @@ def run_tests(self):
'graphql-core>=0.5.0,<2',
'promise>=0.4.0'
],
tests_require=['pytest>=2.7.2'],
tests_require=['pytest>=3,<4'],
extras_require={
},

Expand Down
9 changes: 4 additions & 5 deletions tests/starwars/schema.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from collections import namedtuple

from graphql.type import (
GraphQLID,
GraphQLNonNull,
Expand Down Expand Up @@ -31,7 +29,7 @@

from .data import (
Faction,
Ship,
# Ship,
getFaction,
getShip,
getRebels,
Expand All @@ -54,7 +52,7 @@
# Wars trilogy.

# Using our shorthand to describe type systems, the type system for our
# example will be the followng:
# example will be the following:
#
# interface Node {
# id: ID!
Expand Down Expand Up @@ -132,8 +130,8 @@ def get_node_type(obj, context, info):
else:
return shipType

node_interface, node_field = node_definitions(get_node, get_node_type)

node_interface, node_field = node_definitions(get_node, get_node_type)

# We define our basic ship type.
#
Expand Down Expand Up @@ -259,6 +257,7 @@ def mutate_and_get_payload(data, *_):
factionId=factionId,
)


shipMutation = mutation_with_client_mutation_id(
'IntroduceShip',
input_fields={
Expand Down
1 change: 0 additions & 1 deletion tests/starwars/test_connections.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pytest import raises
from graphql import graphql

from .schema import StarWarsSchema
Expand Down
1 change: 0 additions & 1 deletion tests/starwars/test_mutations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pytest import raises
from graphql import graphql

from .schema import StarWarsSchema
Expand Down
1 change: 0 additions & 1 deletion tests/starwars/test_objectidentification.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pytest import raises
from graphql import graphql

from .schema import StarWarsSchema
Expand Down
19 changes: 12 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
[tox]
envlist = py27,py33,py34,py35,pypy
envlist = py{27,35,36,37,38,py}, flake8

[testenv:flake8]
basepython = python3.7
deps = flake8>=3.7,<4
commands =
flake8 src tests setup.py

[testenv]
deps=
pytest>=2.7.2
pytest>=3,<4
django>=1.8.0,<1.9
six
flake8
singledispatch
six>=0.10.0
singledispatch>=3.4,<3.5
commands=
py.test
flake8
pytest {posargs}

0 comments on commit 512e052

Please sign in to comment.