Skip to content

Commit

Permalink
Dependencies and readme fix (#22)
Browse files Browse the repository at this point in the history
* Add codecov settings
* Travis fixes
* Set xenial as main dist
  • Loading branch information
redzej authored Apr 8, 2019
1 parent 8c2c378 commit ebf30a9
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 20 deletions.
15 changes: 15 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: true
require_base: no
require_head: yes
branches: null

coverage:
status:
project:
default: false
app:
target: 80%
paths: "graphene_permissions/"
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
dist: xenial

language: python

cache: pip

python:
- 3.5
- 3.6
- "3.6"

env:
- DJANGO_VERSION=2.0.*
- DJANGO_VERSION=2.1.*

install:
- pip install Django==$DJANGO_VERSION
Expand All @@ -18,3 +20,6 @@ script:
- flake8
- pytest
- mypy graphene_permissions --ignore-missing

after_success:
- pytest --cov=graphene_permissions tests/ --cov-report=xml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

[![Build Status](https://travis-ci.org/redzej/graphene-permissions.svg?branch=master)](https://travis-ci.org/redzej/graphene-permissions)
[![PyPI version](https://badge.fury.io/py/graphene-permissions.svg)](https://badge.fury.io/py/graphene-permissions)
[![Coverage Status](https://coveralls.io/repos/github/redzej/graphene-permissions/badge.svg?branch=master)](https://coveralls.io/github/redzej/graphene-permissions?branch=master)
[![Python 3.6](https://img.shields.io/badge/python-3.6-green.svg)](https://www.python.org/downloads/release/python-360/)
[![codecov](https://codecov.io/gh/redzej/graphene-permissions/branch/master/graph/badge.svg)](https://codecov.io/gh/redzej/graphene-permissions)
[![Maintainability](https://api.codeclimate.com/v1/badges/12b39435f888adf2370b/maintainability)](https://codeclimate.com/github/redzej/graphene-permissions/maintainability)


Expand Down
2 changes: 1 addition & 1 deletion graphene_permissions/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.1.1'
__version__ = '1.1.2'
17 changes: 8 additions & 9 deletions requirements/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
pytest==3.2.2
pytest-django==3.1.2
pytest-cov==2.5.1
python-coveralls==2.9.1
flake8==3.5.0
pyyaml==3.12
isort==4.3.3
twine==1.9.1
mypy==0.580
pytest==4.4.0
pytest-cov>=2.6.1
pytest-django>=3.4.8
flake8==3.7.7
pyyaml==5.1
isort==4.3.17
twine==1.13.0
mypy==0.700
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django-filter>=2.*
graphene>=2.0.0
graphene>=2.*
graphene-django>=2.0.0
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
author='redzej',
description='Simple graphene-django permission system.',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/redzej/graphene-permissions',
install_requires=install_requirements,
keywords='graphene django permissions permission system',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_mutation_superuser_required_permission(client, test_kwargs, login, pass
response = client.post(data=mutation, **test_kwargs)
result = response.json()

if login is 'tom':
if login == 'tom':
assert result['data'] == {
'superuserAddPet': {
'pet': {
Expand Down Expand Up @@ -74,7 +74,7 @@ def test_mutation_staff_required_permission(client, test_kwargs, login, password
response = client.post(data=mutation, **test_kwargs)
result = response.json()

if login is 'tom':
if login == 'tom':
assert result['data'] == {
'staffAddPet': {
'pet': {
Expand Down
8 changes: 4 additions & 4 deletions tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_node_superuser_required_permission(client, test_kwargs, login, password
response = client.post(data=query, **test_kwargs)
result = response.json()

if login is 'tom':
if login == 'tom':

assert result['data'] == {
'superuserPet': {
Expand Down Expand Up @@ -66,7 +66,7 @@ def test_filter_superuser_required_permission(client, test_kwargs, login, passwo
response = client.post(data=query, **test_kwargs)
result = response.json()

if login is 'tom':
if login == 'tom':
assert result['data'] == {
'allSuperuserPets': {
'edges': [
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_node_staff_required_permission(client, test_kwargs, login, password):
response = client.post(data=query, **test_kwargs)
result = response.json()

if login is 'tom':
if login == 'tom':
assert result['data'] == {
'staffPet': {
'name': 'Snakey',
Expand Down Expand Up @@ -155,7 +155,7 @@ def test_filter_staff_required_permission(client, test_kwargs, login, password):
response = client.post(data=query, **test_kwargs)
result = response.json()

if login is 'tom':
if login == 'tom':
assert result['data'] == {
'allStaffPets': {
'edges': [
Expand Down

0 comments on commit ebf30a9

Please sign in to comment.