From e815ce1c3ca4c1489f74d3f9412d7ab2e103ac62 Mon Sep 17 00:00:00 2001 From: gmatteo Date: Fri, 2 Jul 2021 02:00:50 +0200 Subject: [PATCH] Add requirements-panel.txt --- abipy/panels/core.py | 3 ++- abipy/scripts/abigui.py | 3 ++- requirements-optional.txt | 24 +++++++++++------------- requirements-panel.txt | 6 ++++++ requirements-tests.txt | 7 +++++++ requirements.txt | 1 + 6 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 requirements-panel.txt create mode 100644 requirements-tests.txt diff --git a/abipy/panels/core.py b/abipy/panels/core.py index 35953de6..6d20e19e 100644 --- a/abipy/panels/core.py +++ b/abipy/panels/core.py @@ -22,10 +22,11 @@ _ABINIT_TEMPLATE_NAME = "FastList" def get_abinit_template_cls_kwds(): + #return pn.Column, {} cls = get_template_cls_from_name(_ABINIT_TEMPLATE_NAME) kwds = dict(header_background="#ff8c00", # Dark orange #favicon="assets/img/abinit_favicon.ico", - #logo="assets/img/abipy_logo.png", # TODO: Need new panel versio to fix logo alignment in FastLIst. + #logo="assets/img/abipy_logo.png", # TODO: Need new panel version to fix logo alignment in FastLIst. ) return cls, kwds diff --git a/abipy/scripts/abigui.py b/abipy/scripts/abigui.py index 09b3a00f..ba44fa06 100755 --- a/abipy/scripts/abigui.py +++ b/abipy/scripts/abigui.py @@ -8,7 +8,7 @@ import panel as pn @click.command() -@click.option('--port', default=80, help="Port to listen on. Default: 80") +@click.option('--port', default=5006, help="Port to listen on. Default: 5006") @click.option('--address', default=None, help="The address the server should listen on for HTTP requests.") @click.option('--show', default=True, help="Open server app(s) in a browser") @click.option('--num_procs', default=1, help="Number of worker processes for the app. Defaults to 1") @@ -116,6 +116,7 @@ compare the interpolated band structure with the *ab-initio* one. links = pn.pane.Markdown(links) for url, app in app_routes.items(): + #if not hasattr(app, "sidebar"): continue app.sidebar.append(links) # Call pn.serve to serve the multipage app. diff --git a/requirements-optional.txt b/requirements-optional.txt index b7b0d058..ab1d7d5d 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -1,3 +1,7 @@ +# List of all optional dependencies. +# This file includes other requirements-*.txt files providing libraries for specialized target +# so that we can easily select what we need + jupyter nbformat pygments @@ -7,16 +11,10 @@ scikit-image #graphviz or python-graphviz if conda phonopy ase -click -param -panel -bokeh -XlsxWriter # For DataFrame.to_excel() -#pymdown-extensions -# Unit tests -python-coveralls -pytest -pytest-cov -pytest-xdist -pytest-sugar -scripttest + +# Libraries required by AbiPy panel applications. +-r requirements-panel.txt + +# Libraries required for running unit tests. +-r requirements-tests.txt + diff --git a/requirements-panel.txt b/requirements-panel.txt new file mode 100644 index 00000000..2e46a119 --- /dev/null +++ b/requirements-panel.txt @@ -0,0 +1,6 @@ +# Libraries required by AbiPy panel applications. +param +panel +bokeh +XlsxWriter # For DataFrame.to_excel() +#pymdown-extensions diff --git a/requirements-tests.txt b/requirements-tests.txt new file mode 100644 index 00000000..bd6a9a7c --- /dev/null +++ b/requirements-tests.txt @@ -0,0 +1,7 @@ +# Libraries required for running unit tests. +python-coveralls +pytest +pytest-cov +pytest-xdist +pytest-sugar +scripttest diff --git a/requirements.txt b/requirements.txt index 03e6acbb..b444a240 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,4 @@ seaborn plotly ipython chart-studio +click