Getting Started
To run this project locally, you will need to install the prerequisites and follow the installation section.
Prerequisites¶
This Project depends on the following projects.
-
Poetry
-
Poe the Poet
Installation¶
- Clone the repo
- Install Poe the Poet and Poetry
- Install requirements for development
- Run tests
Usage¶
Some useful examples of how this project can be used:
Install requirements¶
Run tests¶
Unit tests¶
Integration tests¶
Prepare env vars by supplying a pytest.env file required for the integration tests
cp misc/pytest.env.template pytest.env
## Make edits on pytest.env with the correct values for the test environment then run the tests
Run the project¶
- Prepare env vars by supplying a Streamlit secrets file
- TIP: Make sure
.streamlit
directory is in the.gitignore
file so it isn't checked in with secrets. - Run the application and it will be available at http://localhost:8501
- To change the port number
Run with OpenTelemetry (OTel) Instrumentation¶
This runs the poe run
task above with the opentelemetry-instrument
command which auto instruments several libraries with tracing and sends traces to the configured exporter. Honeycomb env vars see the /misc/secrets.toml.template
Run doc site locally¶
Generate doc site¶
Build a docker image for tests¶
Build a container image to run the root files only without running any test¶
- Build image
- Set env vars
- TIP: Make sure
docker.env
is in the.gitignore
file so it isn't checked in with secrets. It's also safer if you only have the environment variable name for secrets and set the value in your shell withexport
.
Run container¶
Release¶
Bump the version number in pyproject.toml
(we follow SemVer)
Switch to main
branch locally and run
which creates a new release tag which further creates a GitHub release and a container image published to GitHub registry, via GitHub Actions.
For more examples, please refer to the Documentation