A repository for sharing knowledge and resources on awesome analytics apps in python
APACHE-2.0 License
A repository for sharing knowledge and resources on awesome analytics apps in Python.
I've started this project because there are a lot of emerging frameworks for creating awesome analytics apps in Python. These are
And I wan't to share knowledge and the why, what, when and how of each because they are so awesome but different.
Clone the repo
git clone https://github.com/MarcSkovMadsen/awesome-analytics-apps.git
cd into the project root folder
cd awesome-analytics-apps
Then you should create a virtual environment named .venv
python -m venv .venv
and activate the environment.
On Linux, OsX or in a Windows Git Bash terminal it's
source .venv/Scripts/activate
or alternatively
source .venv/bin/activate
In a Windows terminal it's
.venv/Scripts/activate.bat
Then you should install the local requirements
pip install -r requirements_local.txt
and enable the qgrid extension for Jupyter Notebooks
jupyter nbextension enable --py --sys-prefix qgrid
streamlit run apps/streamlit_apps/app.py
voila apps/voila_apps/app.py
and the associated Jupyter Notebook
jupyter notebook apps/voila_apps/app.py
invoke test.all
If all tests pass successfully you will see
All Tests Passed Successfully
=============================
We use Invoke to build our command line interface. 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 Streamlit server.
docker.run-server-with-ping Run the docker image with Streamlit server and
docker.system-prune The docker system prune command will free up space
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.livereload Start autobild documentation server and open in browser.
sphinx.test Checks for broken internal and external links and
package.build Builds the awesome-streamlit package)
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.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
and help on a specific command using
$ invoke test.pytest --help
Usage: inv[oke] [--core-opts] test.pytest [--options] [other tasks here ...]
Docstring:
Runs pytest to identify failing tests
Arguments:
command {[type]} -- Invoke command object
Keyword Arguments:
root_dir {str} -- The directory from which to run the tests
test_files {str} -- A space separated list of folders and files to test. (default: {'tests})
integrationtest {bool} -- If True tests marked integrationtest or
functionaltest will be run. Otherwise not. (default: {False})
These tests requires the test backend server running.
test_results {string} -- If not None test reports will be generated in the
test_results folder
# Print running pytest
Options:
-e STRING, --test-results=STRING
-t STRING, --test-files=STRING