Skip to content

Commit

Permalink
1.7.0 - integration of plotly dash charts
Browse files Browse the repository at this point in the history
 - redesign of charts popup to use plotly/dash
 - [#55](#55): raise exception when data contains duplicate column names
 - heatmap integration
 - combination of "_main.jsx" files into one for spacial optimization
 - made arctic an "extra" dependency
  • Loading branch information
Andrew Schonfeld committed Jan 28, 2020
1 parent 922c4a7 commit fd19c34
Show file tree
Hide file tree
Showing 53 changed files with 40,888 additions and 444 deletions.
50 changes: 24 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defaults: &defaults
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
CODECOV_TOKEN: b0d35139-0a75-427a-907b-2c78a762f8f0
VERSION: 1.6.10
VERSION: 1.7.0
PANDOC_RELEASES_URL: https://github.com/jgm/pandoc/releases
steps:
- checkout
Expand Down Expand Up @@ -107,31 +107,29 @@ defaults: &defaults
- run:
name: Build egg
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
set -e
. ci/bin/activate
pip install pypandoc
pip install docutils
pip install Pygments
grep version setup.py | grep -q $VERSION || (echo "ERROR: Version number not found in setup.py: $VERSION"; exit 1)
grep -q $VERSION CHANGES.md || (echo "ERROR: Version number not found in CHANGES.md: $VERSION"; exit 1)
grep -q $VERSION docker/2_7/Dockerfile || (echo "ERROR: Version number not found in docker/2_7/Dockerfile: $VERSION"; exit 1)
grep -q $VERSION docker/3_6/Dockerfile || (echo "ERROR: Version number not found in docker/3_6/Dockerfile: $VERSION"; exit 1)
grep -q $VERSION docs/source/conf.py || (echo "ERROR: Version number not found in docs/source/conf.py: $VERSION"; exit 1)
grep -q $VERSION package.json || (echo "ERROR: Version number not found in package.json: $VERSION"; exit 1)
python setup.py --long-description > ../README.rst
# pandoc --from=markdown --to=rst --output=../README.rst README.md
cat ../README.rst | rst2html.py 1> ../README.html 2> ../log
cp ../README.rst /tmp/circleci-artifacts
cp ../log /tmp/circleci-artifacts
if [ -s ../log ] ; then
exit 1
fi # rst2html.py alwaysexits with 0, check log size
python setup.py bdist_wheel --universal
python setup.py bdist_egg
python setup.py sdist
cp -r ./dist /tmp/circleci-artifacts
fi
set -e
. ci/bin/activate
pip install pypandoc
pip install docutils
pip install Pygments
grep version setup.py | grep -q $VERSION || (echo "ERROR: Version number not found in setup.py: $VERSION"; exit 1)
grep -q $VERSION CHANGES.md || (echo "ERROR: Version number not found in CHANGES.md: $VERSION"; exit 1)
grep -q $VERSION docker/2_7/Dockerfile || (echo "ERROR: Version number not found in docker/2_7/Dockerfile: $VERSION"; exit 1)
grep -q $VERSION docker/3_6/Dockerfile || (echo "ERROR: Version number not found in docker/3_6/Dockerfile: $VERSION"; exit 1)
grep -q $VERSION docs/source/conf.py || (echo "ERROR: Version number not found in docs/source/conf.py: $VERSION"; exit 1)
grep -q $VERSION package.json || (echo "ERROR: Version number not found in package.json: $VERSION"; exit 1)
python setup.py --long-description > ../README.rst
# pandoc --from=markdown --to=rst --output=../README.rst README.md
cat ../README.rst | rst2html.py 1> ../README.html 2> ../log
cp ../README.rst /tmp/circleci-artifacts
cp ../log /tmp/circleci-artifacts
if [ -s ../log ] ; then
exit 1
fi # rst2html.py alwaysexits with 0, check log size
python setup.py bdist_wheel --universal
python setup.py bdist_egg
python setup.py sdist
cp -r ./dist /tmp/circleci-artifacts
# Save test results
- store_test_results:
path: /tmp/circleci-test-results
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ docs/source/modules.rst

# built JS files
dtale/static/dist
dtale/static/dash
jest_tmp

# custom CLI loaders
Expand Down
4 changes: 3 additions & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[settings]
not_skip=dtale/__init__.py
not_skip =
dtale/__init__.py
dtale/dash_application/components/__init__.py
default_section = THIRDPARTY
known_first_party = dtale
known_flask = flask
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog

### 1.7.0 (2020-1-28)
* redesign of charts popup to use plotly/dash
* [#55](https://github.com/man-group/dtale/issues/55): raise exception when data contains duplicate column names
* heatmap integration
* combination of "_main.jsx" files into one for spacial optimization
* made arctic an "extra" dependency

### 1.6.10 (2020-1-12)
* better front-end handling of dates for charting as to avoid timezone issues
* the ability to switch between sorting any axis in bar charts
Expand Down
2 changes: 1 addition & 1 deletion docker/2_7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ WORKDIR /app

RUN set -eux \
; . /root/.bashrc \
; easy_install dtale-1.6.10-py2.7.egg
; easy_install dtale-1.7.0-py2.7.egg
2 changes: 1 addition & 1 deletion docker/3_6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ WORKDIR /app

RUN set -eux \
; . /root/.bashrc \
; easy_install dtale-1.6.10-py3.7.egg
; easy_install dtale-1.7.0-py3.7.egg
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
# built documents.
#
# The short X.Y version.
version = u'1.6.10'
version = u'1.7.0'
# The full version, including alpha/beta/rc tags.
release = u'1.6.10'
release = u'1.7.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion dtale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
dtale = Blueprint('dtale', __name__, url_prefix='/dtale')

# flake8: NOQA
from dtale.app import show, get_instance, instances # isort:skip
from dtale.app import show, get_instance, instances # isort:skip
8 changes: 6 additions & 2 deletions dtale/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def build_app(url, host=None, reaper_on=True, hide_shutdown=False, github_fork=F
:rtype: :class:`dtale.app.DtaleFlask`
"""

app = DtaleFlask('dtale', reaper_on=reaper_on, static_url_path='', url=url)
app = DtaleFlask('dtale', reaper_on=reaper_on, static_url_path='', url=url, instance_relative_config=False)
app.config['SECRET_KEY'] = 'Dtale'
app.config['HIDE_SHUTDOWN'] = hide_shutdown
app.config['GITHUB_FORK'] = github_fork
Expand Down Expand Up @@ -337,7 +337,11 @@ def health_check():
"""
return 'ok'

return app
with app.app_context():

from .dash_application import views as dash_views
app = dash_views.add_dash(app)
return app


def initialize_process_props(host=None, port=None, force=False):
Expand Down
10 changes: 7 additions & 3 deletions dtale/cli/clickutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@ def get_loader_options(key, options):
:return: dictionary of click options with start with key
:rtype: dict
"""
prefix = key + '_'
len_prefix = len(prefix)
return dict(((k[len_prefix:], v) for k, v in options.items() if k.startswith(prefix)))

def _build_key(option):
segs = option.split('_')
if len(segs) == 1:
return ''
return '_'.join(segs[1:])
return dict(((_build_key(k), v) for k, v in options.items() if k.startswith(key)))


def get_log_options(options):
Expand Down
5 changes: 4 additions & 1 deletion dtale/cli/loaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ def decorator(f):
for cli_loader in LOADERS.values():
if len(cli_loader.LOADER_PROPS):
for p in cli_loader.LOADER_PROPS:
prop_name = '--{}'.format(cli_loader.LOADER_KEY)
if len(p):
prop_name = '{}-{}'.format(prop_name, p)
f = click.option(
'--' + cli_loader.LOADER_KEY + '-' + p, help='Override {} {}'.format(cli_loader.LOADER_KEY, p)
prop_name, help='Override {}'.format(prop_name)
)(f)
else:
f = click.option(
Expand Down
12 changes: 9 additions & 3 deletions dtale/cli/loaders/arctic_loader.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from arctic import Arctic # isort:skip

from builtins import map

from logging import getLogger
import pandas as pd
from arctic.store.versioned_item import VersionedItem

from dtale.cli.clickutils import get_loader_options

logger = getLogger(__name__)

'''
IMPORTANT!!! This global variable is required for building any customized CLI loader.
When find loaders on startup it will search for any modules containing the global variable LOADER_KEY.
Expand All @@ -26,6 +26,12 @@ def find_loader(kwargs):
"""
arctic_opts = get_loader_options(LOADER_KEY, kwargs)
if len([f for f in arctic_opts.values() if f]):
try:
from arctic import Arctic
from arctic.store.versioned_item import VersionedItem
except ImportError:
raise ImportError('In order to use the --arctic loader you must install arctic!')

def _arctic_loader():
host = Arctic(arctic_opts['host'])
lib = host.get_library(arctic_opts['library'])
Expand Down
Empty file.
Loading

0 comments on commit fd19c34

Please sign in to comment.