diff --git a/examples/flask_sqlalchemy/README.md b/examples/flask_sqlalchemy/README.md index 7e446864..d08b4844 100644 --- a/examples/flask_sqlalchemy/README.md +++ b/examples/flask_sqlalchemy/README.md @@ -9,7 +9,7 @@ Getting started --------------- First you'll need to get the source of the project. Do this by cloning the -whole Graphene repository: +whole Graphene-SQLAlchemy repository: ```bash # Get the example project code diff --git a/examples/flask_sqlalchemy/requirements.txt b/examples/flask_sqlalchemy/requirements.txt index 337ff609..fa2c13ae 100644 --- a/examples/flask_sqlalchemy/requirements.txt +++ b/examples/flask_sqlalchemy/requirements.txt @@ -1,4 +1,2 @@ -graphene[sqlalchemy] -SQLAlchemy==1.0.11 -Flask==0.12.4 -Flask-GraphQL==1.3.0 +-e ../../ +Flask-GraphQL diff --git a/examples/nameko_sqlalchemy/README.md b/examples/nameko_sqlalchemy/README.md index 39cfe925..6302cb33 100644 --- a/examples/nameko_sqlalchemy/README.md +++ b/examples/nameko_sqlalchemy/README.md @@ -14,7 +14,7 @@ Getting started --------------- First you'll need to get the source of the project. Do this by cloning the -whole Graphene repository: +whole Graphene-SQLAlchemy repository: ```bash # Get the example project code diff --git a/examples/nameko_sqlalchemy/app.py b/examples/nameko_sqlalchemy/app.py index 42a40a0c..05352529 100755 --- a/examples/nameko_sqlalchemy/app.py +++ b/examples/nameko_sqlalchemy/app.py @@ -1,10 +1,10 @@ +from database import db_session, init_db +from schema import schema + from graphql_server import (HttpQueryError, default_format_error, encode_execution_results, json_encode, load_json_body, run_http_query) -from .database import db_session, init_db -from .schema import schema - class App(): def __init__(self): diff --git a/examples/nameko_sqlalchemy/models.py b/examples/nameko_sqlalchemy/models.py index e164c015..efbbe690 100644 --- a/examples/nameko_sqlalchemy/models.py +++ b/examples/nameko_sqlalchemy/models.py @@ -1,8 +1,7 @@ +from database import Base from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, func from sqlalchemy.orm import backref, relationship -from .database import Base - class Department(Base): __tablename__ = 'department' diff --git a/examples/nameko_sqlalchemy/requirements.txt b/examples/nameko_sqlalchemy/requirements.txt index be037f73..617d4872 100644 --- a/examples/nameko_sqlalchemy/requirements.txt +++ b/examples/nameko_sqlalchemy/requirements.txt @@ -1,4 +1,3 @@ -graphene[sqlalchemy] -SQLAlchemy==1.0.11 -nameko +-e ../../ graphql-server-core +nameko diff --git a/examples/nameko_sqlalchemy/schema.py b/examples/nameko_sqlalchemy/schema.py index fa747350..a33cab9b 100644 --- a/examples/nameko_sqlalchemy/schema.py +++ b/examples/nameko_sqlalchemy/schema.py @@ -1,11 +1,11 @@ +from models import Department as DepartmentModel +from models import Employee as EmployeeModel +from models import Role as RoleModel + import graphene from graphene import relay from graphene_sqlalchemy import SQLAlchemyConnectionField, SQLAlchemyObjectType -from .models import Department as DepartmentModel -from .models import Employee as EmployeeModel -from .models import Role as RoleModel - class Department(SQLAlchemyObjectType): diff --git a/examples/nameko_sqlalchemy/service.py b/examples/nameko_sqlalchemy/service.py index 98157508..d9c519c9 100644 --- a/examples/nameko_sqlalchemy/service.py +++ b/examples/nameko_sqlalchemy/service.py @@ -1,8 +1,7 @@ #!/usr/bin/env python +from app import App from nameko.web.handlers import http -from .app import App - class DepartmentService: name = 'department' diff --git a/setup.cfg b/setup.cfg index 39a48fd2..046db9dc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,11 +6,12 @@ exclude = setup.py,docs/*,examples/*,tests max-line-length = 120 [isort] +no_lines_before=FIRSTPARTY known_graphene=graphene,graphql_relay,flask_graphql,graphql_server,sphinx_graphene_theme known_first_party=graphene_sqlalchemy -known_third_party=database,flask,models,nameko,promise,py,pytest,schema,setuptools,singledispatch,six,sqlalchemy,sqlalchemy_utils +known_third_party=app,database,flask,models,nameko,promise,py,pytest,schema,setuptools,singledispatch,six,sqlalchemy,sqlalchemy_utils sections=FUTURE,STDLIB,THIRDPARTY,GRAPHENE,FIRSTPARTY,LOCALFOLDER -no_lines_before=FIRSTPARTY +skip_glob=examples/nameko_sqlalchemy [bdist_wheel] universal=1