From a3a0b80123fdcaf6157f603a088a198234de65b8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 20 Dec 2021 19:32:31 -0600 Subject: [PATCH 1/5] Add release task --- tasks.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tasks.py diff --git a/tasks.py b/tasks.py new file mode 100644 index 0000000..0946dcd --- /dev/null +++ b/tasks.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8; -*- +################################################################################ +# +# Rattail -- Retail Software Framework +# Copyright © 2010-2021 Lance Edgar +# +# This file is part of Rattail. +# +# Rattail is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later +# version. +# +# Rattail is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# Rattail. If not, see . +# +################################################################################ +""" +Tasks for rattail-dash +""" + +import os +import shutil + +from invoke import task + + +here = os.path.abspath(os.path.dirname(__file__)) +exec(open(os.path.join(here, 'rattail_dash', '_version.py')).read()) + + +@task +def release(ctx): + """ + Release a new version of 'rattail-dash'. + """ + shutil.rmtree('rattail_dash.egg-info') + ctx.run('python setup.py sdist --formats=gztar') + ctx.run('twine upload dist/rattail_dash-{}.tar.gz'.format(__version__)) From 0fadd68fc2979626ac1ceec0b5ac7b714d9f7930 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 20 Dec 2021 19:45:17 -0600 Subject: [PATCH 2/5] Bind to all interfaces when running Dash app at least for now..sheesh --- rattail_dash/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rattail_dash/commands.py b/rattail_dash/commands.py index fba1dfe..162ce28 100644 --- a/rattail_dash/commands.py +++ b/rattail_dash/commands.py @@ -45,4 +45,4 @@ class RunDashApp(commands.Subcommand): def run(self, args): factory = self.app.load_object(args.spec) dashapp = factory(self.config) - dashapp.run_server(debug=True) + dashapp.run_server(debug=True, host='0.0.0.0') From b37911f7dbddabd4dc8482de2663b8ed2d7c3f4e Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 20 Dec 2021 19:45:54 -0600 Subject: [PATCH 3/5] Update changelog --- CHANGELOG.md | 4 ++++ rattail_dash/_version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd12c20..6e3ed8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to rattail-dash will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.1.1] - 2021-12-20 +### Added +- Bind to all interfaces when running Dash app. + ## [0.1.0] - 2021-12-20 ### Added - Initial version of the package, very basic demo only. diff --git a/rattail_dash/_version.py b/rattail_dash/_version.py index e41b669..4984097 100644 --- a/rattail_dash/_version.py +++ b/rattail_dash/_version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8; -*- -__version__ = '0.1.0' +__version__ = '0.1.1' From 333d8a513e4cb985e5bdbe4a6734ce872e12fdc2 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 21 Dec 2021 11:51:23 -0600 Subject: [PATCH 4/5] Don't assume we have Dash 2.0 installed i still have some python 3.5 out there, which can't use Dash 2.0 --- rattail_dash/dashapp/sample.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rattail_dash/dashapp/sample.py b/rattail_dash/dashapp/sample.py index 822640f..464680d 100644 --- a/rattail_dash/dashapp/sample.py +++ b/rattail_dash/dashapp/sample.py @@ -25,7 +25,11 @@ Sample Dash App """ import pandas as pd -from dash import dcc, html +try: + from dash import dcc, html +except ImportError: + import dash_core_components as dcc + import dash_html_components as html from dash.dependencies import Input, Output import plotly.express as px From f654ebf2dfb11c201ea5d64e2e53f516ff4f6277 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 13 Sep 2024 18:44:16 -0500 Subject: [PATCH 5/5] docs: use markdown for readme file --- .gitignore | 2 ++ README.md | 12 ++++++++++++ README.rst | 16 ---------------- setup.py | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/.gitignore b/.gitignore index 883c935..a23df04 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ +*~ +*.pyc rattail_dash.egg-info/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c68b306 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ + +# rattail-dash + +This package contains some helper logic, as well as a sample app, to +show how a [Dash](https://dash.plot.ly/) app can display Rattail (and +specifically Trainwreck) data. + +Rattail is a retail software framework, released under the GNU General +Public License. + +Please see Rattail's [home page](https://rattailproject.org/) for more +information. diff --git a/README.rst b/README.rst deleted file mode 100644 index 4c7ac5a..0000000 --- a/README.rst +++ /dev/null @@ -1,16 +0,0 @@ - -rattail-dash -============ - -This package contains some helper logic, as well as a sample app, to -show how a `Dash`_ app can display Rattail (and specifically -Trainwreck) data. - -.. _Dash: https://dash.plot.ly/ - -Rattail is a retail software framework, released under the GNU General -Public License. - -Please see Rattail's `home page`_ for more information. - -.. _`home page`: https://rattailproject.org/ diff --git a/setup.py b/setup.py index 86c1f0c..fd2e1af 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) exec(open(os.path.join(here, 'rattail_dash', '_version.py')).read()) -README = open(os.path.join(here, 'README.rst')).read() +README = open(os.path.join(here, 'README.md')).read() requires = [