Skip to content

Commit

Permalink
Various documentation fixes for 0.10.0 (rev1) (#1541)
Browse files Browse the repository at this point in the history
* Remove duplicated section in Links

* Fixed issue with undefined width/height in latest pydeck versions

* Exclusively link https from homepage
  • Loading branch information
philippjfr authored Aug 23, 2020
1 parent b579f29 commit 696e349
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 39 deletions.
18 changes: 9 additions & 9 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ A high-level app and dashboarding solution for Python
<style>table {border-spacing: 15px} td { border: 1px solid black; vertical-align: top} </style>
<table>
<tr>
<td border=1><a href="https://examples.pyviz.org/attractors/attractors_panel.html"><b>Attractors</b></a><br><a href="https://attractors.pyviz.demo.anaconda.com/attractors_panel"><img src="http://assets.holoviews.org/panel/thumbnails/index/attractors.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/gapminders/gapminders.html"><b>Gapminders</b></a><br><a href="https://gapminders.pyviz.demo.anaconda.com"><img src="http://assets.holoviews.org/panel/thumbnails/index/gapminders.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/nyc_taxi/dashboard.html"><b>NYC Taxi</b></a><br><a href="https://nyc-taxi.pyviz.demo.anaconda.com"><img src="http://assets.holoviews.org/panel/thumbnails/index/nyc_taxi.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/glaciers/glaciers.html"><b>Glaciers</b></a><br><a href="https://glaciers.pyviz.demo.anaconda.com"><img src="http://assets.holoviews.org/panel/thumbnails/index/glaciers.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/portfolio_optimizer/portfolio.html"><b>Portfolio Optimizer</b></a><br><a href="https://portfolio-optimizer.pyviz.demo.anaconda.com"><img src="http://assets.holoviews.org/panel/thumbnails/index/portfolio_optimizer.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/attractors/attractors_panel.html"><b>Attractors</b></a><br><a href="https://attractors.pyviz.demo.anaconda.com/attractors_panel"><img src="https://assets.holoviews.org/panel/thumbnails/index/attractors.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/gapminders/gapminders.html"><b>Gapminders</b></a><br><a href="https://gapminders.pyviz.demo.anaconda.com"><img src="https://assets.holoviews.org/panel/thumbnails/index/gapminders.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/nyc_taxi/dashboard.html"><b>NYC Taxi</b></a><br><a href="https://nyc-taxi.pyviz.demo.anaconda.com"><img src="https://assets.holoviews.org/panel/thumbnails/index/nyc_taxi.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/glaciers/glaciers.html"><b>Glaciers</b></a><br><a href="https://glaciers.pyviz.demo.anaconda.com"><img src="https://assets.holoviews.org/panel/thumbnails/index/glaciers.png" /></a></td>
<td border=1><a href="https://examples.pyviz.org/portfolio_optimizer/portfolio.html"><b>Portfolio Optimizer</b></a><br><a href="https://portfolio-optimizer.pyviz.demo.anaconda.com"><img src="https://assets.holoviews.org/panel/thumbnails/index/portfolio_optimizer.png" /></a></td>
<tr>
</table>

Expand All @@ -35,12 +35,12 @@ Panel makes it simple to make:

Panel objects are reactive, immediately updating to reflect changes to their state, which makes it simple to compose viewable objects and link them into simple, one-off apps to do a specific exploratory task. The same objects can then be reused in more complex combinations to build more ambitious apps, while always sharing the same code that works well on its own.

Panel lets you move the same code freely between an interactive `Jupyter Notebook <http://jupyter.org>`__ prompt and a fully deployable standalone server. That way you can easily switch between exploring your data, building visualizations, adding custom interactivity, sharing with non-technical users, and back again at any point, using the same tools and the same code throughout. Panel thus helps support your entire workflow, so that you never have to commit to only one way of using your data and your analyses, and don't have to rewrite your code just to make it usable in a different way. In many cases, using Panel can turn projects that used to take weeks or months into something you finish on the same day you started, creating a full Python-backed deployed web service for your visualized data in minutes or hours without having to run a software development project or hand your work over to another team.
Panel lets you move the same code freely between an interactive `Jupyter Notebook <https://jupyter.org>`__ prompt and a fully deployable standalone server. That way you can easily switch between exploring your data, building visualizations, adding custom interactivity, sharing with non-technical users, and back again at any point, using the same tools and the same code throughout. Panel thus helps support your entire workflow, so that you never have to commit to only one way of using your data and your analyses, and don't have to rewrite your code just to make it usable in a different way. In many cases, using Panel can turn projects that used to take weeks or months into something you finish on the same day you started, creating a full Python-backed deployed web service for your visualized data in minutes or hours without having to run a software development project or hand your work over to another team.

Using Panel for declarative, reactive programming
-------------------------------------------------

Panel can also be used with the separate `Param <http://param.pyviz.org>`__ project to create interactively configurable objects with or without associated visualizations, in a fully declarative way. With this approach, you declare your configurable object using the pure-Python, zero-dependency ``param`` library, annotating your code with parameter ranges, documentation, and dependencies between parameters and your code. Using this information, you can make all of your domain-specific code be *optionally* configurable in a GUI, with *optional* visual displays and debugging information if you like, all with just a few lines of declarations. With this approach, you don't ever have to decide whether your code will eventually be used in a notebook, in a GUI app, or completely behind the scenes in batch processing, servers, or reports -- the same code can support all of these cases equally well, once you declare the associated parameters and constraints. This approach lets you completely separate your domain-specific code from anything to do with web browsers, GUI toolkits, or other volatile technologies that would otherwise make your hard work become obsolete as they change over time.
Panel can also be used with the separate `Param <https://param.pyviz.org>`__ project to create interactively configurable objects with or without associated visualizations, in a fully declarative way. With this approach, you declare your configurable object using the pure-Python, zero-dependency ``param`` library, annotating your code with parameter ranges, documentation, and dependencies between parameters and your code. Using this information, you can make all of your domain-specific code be *optionally* configurable in a GUI, with *optional* visual displays and debugging information if you like, all with just a few lines of declarations. With this approach, you don't ever have to decide whether your code will eventually be used in a notebook, in a GUI app, or completely behind the scenes in batch processing, servers, or reports -- the same code can support all of these cases equally well, once you declare the associated parameters and constraints. This approach lets you completely separate your domain-specific code from anything to do with web browsers, GUI toolkits, or other volatile technologies that would otherwise make your hard work become obsolete as they change over time.

The `Getting Started <getting_started>`_ will provide a quick introduction to the panel API and get you started while the `User Guide <user_guide>`_ provides a more detailed guide on how to use Panel.

Expand All @@ -53,7 +53,7 @@ Installation
|CondaPyViz|_ |CondaDefaults|_ |PyPI|_ |License|_


Panel works with `Python 2.7 and Python 3 <https://travis-ci.org/pyviz/panel>`_ on Linux, Windows, or Mac. The recommended way to install Panel is using the `conda <http://conda.pydata.org/docs/>`_ command provided by `Anaconda <http://docs.continuum.io/anaconda/install>`_ or `Miniconda <http://conda.pydata.org/miniconda.html>`_::
Panel works with `Python 2.7 and Python 3 <https://travis-ci.org/pyviz/panel>`_ on Linux, Windows, or Mac. The recommended way to install Panel is using the `conda <https://conda.pydata.org/docs/>`_ command provided by `Anaconda <https://docs.continuum.io/anaconda/install>`_ or `Miniconda <https://conda.pydata.org/miniconda.html>`_::

conda install -c pyviz panel

Expand Down Expand Up @@ -109,5 +109,5 @@ And then you can launch Jupyter to explore them yourself using either Jupyter No
Releases <releases>
Road Map <Roadmap>
FAQ
Github source <http://github.com/pyviz/panel>
Github source <https://github.com/pyviz/panel>
About <about>
30 changes: 0 additions & 30 deletions examples/user_guide/Links.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -271,36 +271,6 @@
"#toggle.param.unwatch(watcher)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Defining Javascript callbacks\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"value1 = pn.widgets.Spinner(value=0, width=75)\n",
"operator = pn.widgets.Select(value='*', options=['*', '+'], width=50, align='center')\n",
"value2 = pn.widgets.Spinner(value=0, width=75)\n",
"button = pn.widgets.Button(name='=', width=50)\n",
"result = pn.widgets.StaticText(value='0', width=50, align='center')\n",
"\n",
"button.jscallback(clicks=\"\"\"\n",
"if (op.value == '*') \n",
" result.text = (v1.value * v2.value).toString()\n",
"else\n",
" result.text = (v1.value + v2.value).toString()\n",
"\"\"\", args={'op': operator, 'result': result, 'v1': value1, 'v2': value2})\n",
"\n",
"pn.Row(value1, operator, value2, button, result)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
7 changes: 7 additions & 0 deletions panel/pane/deckgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ def _get_properties(self, layout=True):
tooltip = deck_widget.tooltip
data = {k: v for k, v in recurse_data(data).items() if v is not None}

# Delete undefined width and height
for view in data.get('views', []):
if view.get('width', False) is None:
view.pop('width')
if view.get('height', False) is None:
view.pop('height')

if layout:
properties = {p: getattr(self, p) for p in Layoutable.param
if getattr(self, p) is not None}
Expand Down

0 comments on commit 696e349

Please sign in to comment.