Skip to content

Latest commit

 

History

History
67 lines (49 loc) · 2.98 KB

README.md

File metadata and controls

67 lines (49 loc) · 2.98 KB

Streamlit DataScience

Streamlit App Boilerplate that contains everything you need to get running.

Built with ❤️ by kpbush30

What's this?

  • README.md: This Document! To help you find your way around
  • streamlit_app.py: The main app that gets run by streamlit
  • requirements.txt: Pins the version of packages needed
  • LICENSE: Follows Streamlit's use of Apache 2.0 Open Source License
  • .gitignore: Tells git to avoid comitting / scanning certain local-specific files
  • .streamlit/config.toml: Customizes the behaviour of streamlit without specifying command line arguments (streamlit config show)
  • Makefile: Provides useful commands for working on the project such as run, lint, test, and test-e2e
  • requirements.dev.txt: Provides packages useful for development but not necessarily production deployment. Also includes all of requirements.txt via -r
  • pyproject.toml: Provides a main configuration point for Python dev tools
  • .flake8: Because flake8 doesn't play nicely with pyproject.toml out of the box
  • .pre-commit-config.yaml: Provides safeguards for what you commit and push to your repo
  • tests/: Folder for tests to be picked up by pytest

Local Setup

Assumes working python installation and some command line knowledge (install python with conda guide).

# External users: download Files
git clone git@github.com:kpbush30/streamlit_datascience.git

# Go to correct directory
cd streamlit_datascience

# Run the streamlit app (will install dependencies in a virtualenvironment in the folder venv)
make run

Open your browser to http://localhost:8501/ if it doesn't open automatically.

Local Development

The Makefile and development requirements provide some handy Python tools for writing better code. See the Makefile for more detail

# Run black, isort, and flake8 on your codebase
make lint
# Run pytest with coverage report on all tests not marked with `@pytest.mark.e2e`
make test
# Run pytest on tests marked e2e (NOTE: e2e tests require `make run` to be running in a separate terminal)
make test-e2e
# Run pytest on tests marked e2e and replace visual baseline images
make test-e2e-baseline
# After running tests, display the coverage html report on localhost
make coverage

Deploy

For the easiest experience, deploy to Streamlit Cloud

For other options, see Streamilt deployment wiki

Credits

This package was created with Cookiecutter and the gerardrbentley/cookiecutter-streamlit project template.