Skip to content

Commit

Permalink
Prepare 0.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Dec 26, 2020
1 parent 289ea7f commit 54271bb
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 39 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ are used for versioning (schema follows below):

0.6.6
-----
2020-12-25
2020-12-26

.. note::

Expand Down
2 changes: 2 additions & 0 deletions docs/debugging.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Debugging
=========
Logging queries to console
--------------------------
The ``LOGGING_LEVEL`` key represents the logging level (defaults to
``logging.ERROR``). Override if needed.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ integration for `Graphene <http://graphene-python.org/>`__.
Prerequisites
=============
- Graphene 2.x. *Support for Graphene 1.x is not intended.*
- Python 3.6, 3.7, 3.8, 3.9. *Support for Python 2 is not intended.*
- Python 3.6, 3.7, 3.8, 3.9 and 3.10. *Support for Python 2 is not intended.*
- Elasticsearch 6.x, 7.x. *Support for Elasticsearch 5.x is not intended.*

Main features and highlights
Expand Down
5 changes: 4 additions & 1 deletion examples/apps/django_app/inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ def project_dir(base):

sys.path.insert(0, project_dir("../../../src"))
sys.path.insert(0, project_dir("../../../examples"))
sys.path.insert(0, '/home/delusionalinsanity/bbrepos/graphene-elastic/examples')
sys.path.insert(
0,
'/home/delusionalinsanity/bbrepos/graphene-elastic/examples'
)
4 changes: 2 additions & 2 deletions examples/apps/django_app/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

configure(locals(), django_admin=True)

from graphene_django.views import GraphQLView
from graphene_elastic.settings import graphene_settings
from graphene_django.views import GraphQLView # NOQA
from graphene_elastic.settings import graphene_settings # NOQA
route(
'graphql',
GraphQLView.as_view(
Expand Down
24 changes: 0 additions & 24 deletions examples/apps/graphql_views.py

This file was deleted.

4 changes: 3 additions & 1 deletion examples/apps/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ def timing_middleware(next, root, info, **args):
start = timer()
return_value = next(root, info, **args)
duration = round((timer() - start) * 1000, 2)
parent_type_name = root._meta.name if root and hasattr(root, '_meta') else ''
parent_type_name = root._meta.name \
if root and hasattr(root, '_meta') \
else ''
logger.debug("timing_middleware")
logger.debug(f"{parent_type_name}.{info.field_name}: {duration} ms")
return return_value
6 changes: 3 additions & 3 deletions examples/factories/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def project_dir(base):

sys.path.insert(0, project_dir("../../examples"))

from factories.blog_post import PostFactory
from factories.site_user import UserFactory
from factories.farm_animal import AnimalFactory
from factories.blog_post import PostFactory # NOQA
from factories.site_user import UserFactory # NOQA
from factories.farm_animal import AnimalFactory # NOQA


def generate(num_items=100):
Expand Down
6 changes: 4 additions & 2 deletions examples/search_index/documents/animal.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
connections.create_connection(**ELASTICSEARCH_CONNECTION)


html_strip = analyzer('html_strip',
html_strip = analyzer(
'html_strip',
tokenizer="standard",
filter=["lowercase", "stop", "snowball"],
char_filter=["html_strip"]
)

html_strip_preserve_case = analyzer('html_strip',
html_strip_preserve_case = analyzer(
'html_strip',
tokenizer="standard",
filter=["stop", "snowball"],
char_filter=["html_strip"]
Expand Down
3 changes: 2 additions & 1 deletion examples/search_index/documents/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
connections.create_connection(**ELASTICSEARCH_CONNECTION)


html_strip = analyzer('html_strip',
html_strip = analyzer(
'html_strip',
tokenizer="standard",
filter=["lowercase", "stop", "snowball"],
char_filter=["html_strip"]
Expand Down
3 changes: 2 additions & 1 deletion examples/search_index/documents/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
connections.create_connection(**ELASTICSEARCH_CONNECTION)


html_strip = analyzer('html_strip',
html_strip = analyzer(
'html_strip',
tokenizer="standard",
filter=["lowercase", "stop", "snowball"],
char_filter=["html_strip"]
Expand Down
1 change: 1 addition & 0 deletions scripts/pycodestyle.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
reset
pycodestyle src/graphene_elastic/
pycodestyle examples/ --exclude examples/apps/django_app/local_overrides.py,examples/apps/flask_app/local_overrides.py
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="graphene-elastic",
version="0.6.5",
version="0.6.6",
description="Graphene Elasticsearch (DSL) integration",
long_description=open("README.rst").read(),
url="https://github.com/barseghyanartur/graphene-elastic",
Expand All @@ -24,6 +24,8 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="api graphql protocol rest relay graphene elasticsearch "
"elasticsearch-dsl",
Expand Down
2 changes: 1 addition & 1 deletion src/graphene_elastic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from .types import ElasticsearchObjectType

__title__ = 'graphene-elastic'
__version__ = '0.6.5'
__version__ = '0.6.6'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2019-2020 Artur Barseghyan'
__license__ = 'GPL-2.0-only OR LGPL-2.1-or-later'
Expand Down

0 comments on commit 54271bb

Please sign in to comment.