From abc9abfe7ea4868e1be4b1a5df47041e8045d233 Mon Sep 17 00:00:00 2001 From: Mark Gibbs Date: Wed, 26 Dec 2018 16:10:45 -0800 Subject: [PATCH 1/3] v0.9.5 packages for future reference --- frozen_dev.txt | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/frozen_dev.txt b/frozen_dev.txt index f6eb025d..eb773fd1 100644 --- a/frozen_dev.txt +++ b/frozen_dev.txt @@ -6,31 +6,35 @@ astroid==2.0.4 async-timeout==2.0.1 atomicwrites==1.2.1 attrs==18.2.0 -autobahn==18.8.2 +autobahn==18.9.2 Automat==0.7.0 Babel==2.6.0 +bleach==3.0.2 certifi==2018.8.24 +cffi==1.11.5 channels==2.1.3 channels-redis==2.3.0 chardet==3.0.4 -click==6.7 +Click==7.0 +cmarkgfm==0.4.2 constantly==15.1.0 coverage==4.5.1 daphne==2.2.2 -dash==0.28.5 -dash-core-components==0.28.1 -dash-html-components==0.11.0 -dash-renderer==0.13.2 +dash==0.28.2 +dash-core-components==0.33.0 +dash-html-components==0.13.2 +dash-renderer==0.14.3 decorator==4.3.0 -Django==2.1.1 +Django==2.1.2 django-bootstrap4==0.0.7 --e git+https://github.com/delsim/django-plotly-dash.git@1a6a184eac871a0a675fa971fe4c10c3dac195d8#egg=django_plotly_dash +-e git+https://github.com/delsim/django-plotly-dash.git@affccd8b280b2fdbc7f7e2d975b9cf4c7ace5f06#egg=django_plotly_dash django-redis==4.9.0 docopt==0.6.2 docutils==0.14 dpd-components==0.1.0 Flask==1.0.2 Flask-Compress==1.4.0 +future==0.16.0 grip==4.5.2 hiredis==0.2.0 hyperlink==18.0.0 @@ -45,13 +49,13 @@ jsonschema==2.6.0 jupyter-core==4.4.0 lazy-object-proxy==1.3.1 livereload==2.5.2 -Markdown==2.6.11 +Markdown==3.0.1 MarkupSafe==1.0 mccabe==0.6.1 more-itertools==4.3.0 msgpack==0.5.6 nbformat==4.4.0 -numpy==1.15.1 +numpy==1.15.2 packaging==18.0 pandas==0.23.4 path-and-address==2.0.1 @@ -59,20 +63,22 @@ pathlib2==2.3.2 pathtools==0.1.2 pkg-resources==0.0.0 pkginfo==1.4.2 -plotly==3.1.1 +plotly==3.3.0 pluggy==0.7.1 port-for==0.3.1 -py==1.6.0 +py==1.7.0 +pycparser==2.19 Pygments==2.2.0 PyHamcrest==1.9.0 pylint==2.1.1 -pyparsing==2.3.0 -pytest==3.7.4 -pytest-cov==2.5.1 -pytest-django==3.4.2 +pyparsing==2.2.2 +pytest==3.8.2 +pytest-cov==2.6.0 +pytest-django==3.4.3 python-dateutil==2.7.3 pytz==2018.5 PyYAML==3.13 +readme-renderer==22.0 redis==2.10.6 requests==2.19.1 requests-toolbelt==0.8.0 @@ -83,15 +89,16 @@ Sphinx==1.8.1 sphinx-autobuild==0.7.1 sphinx-rtd-theme==0.4.2 sphinxcontrib-websupport==1.1.0 -tornado==5.1 -tqdm==4.25.0 +tornado==5.1.1 +tqdm==4.26.0 traitlets==4.3.2 -twine==1.11.0 +twine==1.12.1 Twisted==18.7.0 txaio==18.8.1 typed-ast==1.1.0 urllib3==1.23 watchdog==0.9.0 +webencodings==0.5.1 Werkzeug==0.14.1 wrapt==1.10.11 zope.interface==4.5.0 From 2cbd7ad56558db9c7224ef7963932c72bb93e9ee Mon Sep 17 00:00:00 2001 From: Mark Gibbs Date: Sat, 12 Jan 2019 23:18:09 -0800 Subject: [PATCH 2/3] Linter-inspired improvements --- demo/demo/bootstrap_app.py | 8 +++----- django_plotly_dash/dash_wrapper.py | 3 ++- django_plotly_dash/finders.py | 13 ++++++++++--- django_plotly_dash/views.py | 3 ++- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/demo/demo/bootstrap_app.py b/demo/demo/bootstrap_app.py index cfa180af..207df220 100644 --- a/demo/demo/bootstrap_app.py +++ b/demo/demo/bootstrap_app.py @@ -22,7 +22,6 @@ SOFTWARE. ''' -import dash import dash_bootstrap_components as dbc import dash_html_components as html @@ -33,8 +32,7 @@ dd.layout = html.Div( [ - dbc.Alert("This is an alert", color="primary"), - dbc.Alert("Danger", color="danger"), - ] + dbc.Alert("This is an alert", color="primary"), + dbc.Alert("Danger", color="danger"), + ] ) - diff --git a/django_plotly_dash/dash_wrapper.py b/django_plotly_dash/dash_wrapper.py index c7dceae4..bfb93fa8 100644 --- a/django_plotly_dash/dash_wrapper.py +++ b/django_plotly_dash/dash_wrapper.py @@ -83,11 +83,12 @@ class DjangoDash: To use, construct an instance of DjangoDash() in place of a Dash() one. ''' + #pylint: disable=too-many-instance-attributes def __init__(self, name=None, serve_locally=False, expanded_callbacks=False, add_bootstrap_links=False, suppress_callback_exceptions=False, - **kwargs): # pylint: disable=unused-argument + **kwargs): # pylint: disable=unused-argument, too-many-arguments if name is None: global uid_counter # pylint: disable=global-statement uid_counter += 1 diff --git a/django_plotly_dash/finders.py b/django_plotly_dash/finders.py index 96a05fe8..2c23a911 100644 --- a/django_plotly_dash/finders.py +++ b/django_plotly_dash/finders.py @@ -33,13 +33,15 @@ from django.core.files.storage import FileSystemStorage from django.conf import settings -from django.apps import apps +from django.apps import apps #pylint: disable=unused-import from django_plotly_dash.dash_wrapper import all_apps class DashComponentFinder(BaseFinder): 'Find static files in components' + #pylint: disable=abstract-method, redefined-builtin + def __init__(self): self.locations = [] @@ -87,7 +89,9 @@ def find(self, path, all=False): return matches + # pylint: disable=inconsistent-return-statements, no-self-use def find_location(self, path): + 'Return location, if it exists' if os.path.exists(path): return path @@ -95,12 +99,14 @@ def list(self, ignore_patterns): for component_name in self.locations: storage = self.storages[component_name] for path in get_files(storage, ignore_patterns + self.ignore_patterns): - print("DashAssetFinder",path,storage) + print("DashAssetFinder", path, storage) yield path, storage class DashAssetFinder(BaseFinder): 'Find static files in asset directories' + #pylint: disable=unused-import, unused-variable, no-name-in-module, import-error, abstract-method + def __init__(self): # Get all registered apps @@ -120,7 +126,7 @@ def __init__(self): for app_slug, obj in self.apps.items(): caller_module = obj.caller_module location = obj.caller_module_location - path_directory = os.path.join(os.path.dirname(location),self.subdir) + path_directory = os.path.join(os.path.dirname(location), self.subdir) if os.path.isdir(path_directory): @@ -134,6 +140,7 @@ def __init__(self): super(DashAssetFinder, self).__init__() + #pylint: disable=redefined-builtin def find(self, path, all=False): return [] diff --git a/django_plotly_dash/views.py b/django_plotly_dash/views.py index 5f24649c..814eed71 100644 --- a/django_plotly_dash/views.py +++ b/django_plotly_dash/views.py @@ -101,6 +101,7 @@ def main_view(request, ident, stateless=False, cache_id=None, **kwargs): return HttpResponse(resp) def component_component_suites(request, resource=None, component=None, **kwargs): + 'Return part of a client-side component, served locally for some reason' return component_suites(request, resource=resource, component=component, @@ -116,7 +117,7 @@ def component_suites(request, resource=None, component=None, extra_element="", * else: redone_url = "/static/dash/component/%s/%s%s" %(component, extra_element, resource) - print("Redirecting to :",redone_url) + print("Redirecting to :", redone_url) return HttpResponseRedirect(redirect_to=redone_url) From 954552873df48fe7e79a26253d9b56154d994171 Mon Sep 17 00:00:00 2001 From: Mark Gibbs Date: Sat, 12 Jan 2019 23:25:34 -0800 Subject: [PATCH 3/3] Update version to 0.9.6 --- django_plotly_dash/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_plotly_dash/version.py b/django_plotly_dash/version.py index e0bb46dc..4e925193 100644 --- a/django_plotly_dash/version.py +++ b/django_plotly_dash/version.py @@ -4,4 +4,4 @@ This addresses issue #81 ''' -__version__ = "0.9.5" +__version__ = "0.9.6"