awesome-panel icon indicating copy to clipboard operation
awesome-panel copied to clipboard

Awesome Panel supports Panel and its users. We want to show how awesome the framework is and help push it forward. ❤️🐍📈

📈 Awesome Panel Awesome

GitHub Repo stars Follow on Twitter YouTube Channel Views Linked In

Panel makes it easy to make your data, models and analytics interactive using the tools you know and love.

Awesome Panel aims to

  • inspire and help users of Panel and
  • push the framework forward.

This project provides

Check out awesome-panel.org.

Awesome Panel Org Animation

Check out the awesome-panel.org youtube channel.

Awesome Panel Youtube

Panel is completely open source and free for both commercial and non-commercial use. Panel is part of the HoloViz ecosystem.

🎁 Contribute

GitHub Issues and Pull requests are very welcome!

🔗 Contribute an Item to the Awesome List

Do as much of the below as possible.

  • Open a Feature Request on Github describing the item.

  • Make a PR to the awesome_list.yml file.

🖥️ Contribute an App to the Gallery

Do as much of the below as possible and reach out for help if needed.

  • Open a Feature Request on Github describing the request. If you already have an application attach the url, notebook, code file, .zip file etc. if possible.
  • Fork this repo and follow the Getting Started Instructions below.
  • Register your self as a new author in _authors.py and _site.py.
  • Add your application as a new subfolder to application/pages.
  • Add your application as a new route to APP_ROUTES.
  • Add your application to the menus links.html and links_fast.html
  • Add any tests you might have to tests/application
  • Run panel serve app.py and manully test your app
  • Run invoke test.all and fix all errors.
  • Add your app to the Locust end-2-end Test and run locust -f performance/locust_e2e.py to monitor the performance of your app.
  • Create a pull request.
  • Mark your pull request as "Ready".

🕊️ Share on Social Media

You can follow me on Twitter and Linked In and like or repost my posts.

☕ Sponsor the Awesome Panel Project

If you would like to sponsor my time or the infrastructure the platform is running on, feel free to reach out. I would love to run https://awesome-panel.org on some decent hardware instead of a low end dev server in Azure.

You can also appreciate the work that has already been done if you

Buy me a coffee

Thanks

⚖️ LICENSE

Apache 2.0 License

🏃 Getting Started with the Awesome Panel Repository

🧰 Prerequisites

  • A working Python installation.
    • Currently we are using v3.9.9.

🏎️ Installation

Clone the repo

git clone https://github.com/MarcSkovMadsen/awesome-panel.git

cd into the project root folder

cd awesome-panel

Create virtual environment and install Requirements

via python

Then you should create a virtual environment named .venv

python -m venv .venv

and activate the environment using one of the below commands.

source .venv/Scripts/activate
source .venv/bin/activate

or for windows

.venv/Scripts/activate.bat

On windows please manually install the geopandas requirements as described in using-geopandas-windows

Then you should install the local requirements

pip install -r requirements_local.txt -f https://download.pytorch.org/whl/torch_stable.html
or via Anaconda

Create virtual environment named awesome-panel

conda create -n awesome-panel python=3.9.9

and activate environment.

activate awesome-panel

On windows please manually install the geopandas requirements as described in using-geopandas-windows

Then you should install the local requirements

conda install --file requirements_local.txt

🧱 Build and run the Application Locally

Set the environment variables if needed

on bash:

export BOKEH_ADDRESS=localhost
export BOKEH_PORT=5006

on powershell:

$env:BOKEH_ADDRESS = 'localhost'
$env:BOKEH_PORT = 5006

Running the Application Locally

panel serve awesome_panel/apps/*.py --index home.py

or as a Docker container via

invoke docker.build --rebuild
invoke docker.run-server

🐋 Run the Application via Docker

If you don't want to clone the repo and build the docker container you can just use docker run to run the image from Dockerhub

To run the panel interactively on port 80

docker run -it -p 80:80 marcskovmadsen/awesome-panel:latest

To run bash interactively

docker run -it -p 80:80 --entrypoint "/bin/bash" marcskovmadsen/awesome-panel:latest

Code quality and Tests

We use

  • isort for sorting import statements
  • autoflake to remove unused imports and unused variables
  • black the opinionated code formatter
  • pylint for static analysis
  • mypy for static type checking
  • pytest for unit to functional tests
  • locust for end-2-end tests.

to ensure a high quality of our code and application.

You can run most tests using

invoke test.all

You can run the Locust end-2-end tests via

invoke test.e2e

Locust Gif

Please note you will need to have the Panel server running and point Locust to the correct host and port.

👷 Workflow

We use the power of Invoke to semi-automate the local workflow. You can see the list of available commands using

$ invoke --list
Available tasks:

  docker.build                            Build Docker image
  docker.push                             Push the Docker container
  docker.remove-unused                    Removes all unused containers to free up space
  docker.run                              Run the Docker container bash terminal interactively.
  docker.run-server                       Run the Docker image with the Panel server.
  docker.run-server-with-ping             Run the docker image with Panel server and
  docker.system-prune                     The docker system prune command will free up space
  jupyter.notebook                        Run jupyter notebook
  package.build                           Builds the awesome-panel package)
  sphinx.build                            Build local version of site and open in a browser
  sphinx.copy-from-project-root           We need to copy files like README.md into docs/_copy_of_project_root
  sphinx.linkcheck                        Build local version of site and open in a browser
  sphinx.livereload                       Start autobild documentation server and open in browser.
  sphinx.test                             Checks for broken internal and external links and
  test.all (test.pre-commit, test.test)   Runs isort, autoflake, black, pylint, mypy and pytest
  test.autoflake                          Runs autoflake to remove unused imports on all .py files recursively
  test.bandit                             Runs Bandit the security linter from PyCQA.
  test.black                              Runs black (autoformatter) on all .py files recursively
  test.e2e                                Runs the Locust end to end tests
  test.isort                              Runs isort (import sorter) on all .py files recursively
  test.mypy                               Runs mypy (static type checker) on all .py files recursively
  test.pylint                             Runs pylint (linter) on all .py files recursively to identify coding errors
  test.pytest                             Runs pytest to identify failing tests

💻 CI/ CD and Hosting

The application is

  • built as a Docker image and tested via Azure Pipelines.
    • You can find the Dockerfiles here and the Azure pipelines yml files here.

Azure Pipelines Azure Pipelines Build and Test

Dockerhub

  • released via Azure Pipelines

Azure Pipelines

  • to a web app for containers service on Azure on the cheapest non-free pricing tier

Azure Pipelines

Build and Deploy the Awesome Panel Package

PLEASE NOTE THE AWESOME PANEL PACKAGE IS OBSOLETE AND REPLACED BY awesome-panel-extensions.

You can build the package using

cd package
python setup.py sdist bdist_wheel

If you want to publish the package to PyPi you should first

update the version number in the setup.py file. The format is YYYYmmdd.version. For example 20191208.1

Then you run

twine upload dist/awesome-panel-YYYYmmdd.version.tar.gz -u <the-pypi-username> -p <the-pypi-password>