Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial readme #9

Merged
merged 1 commit into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,39 @@
# Data Stories
A [streamlit](https://streamlit.io/) app for designing and creating data stories using data from
[The Tuva Project](https://thetuvaproject.com/)

## Enivronment setup
This repo requires a few python packages to run the streamlit app, connect to S3, etc.
The list of required packages can be found in the `requirements.txt` file in the root of this repo.
Once you are within you desired working python env (or conda, venv), run the following to install the needed libraries

```pip install -r requirements.txt```

## Configuration
Currently, this app uses a `.env` file to store secrets and sensitive information needed for runtime. Create a `.env`
file in the repo root folder and add the following key/value pairs to the file.
```
SNOWFLAKE_USER = <username goes here>
SNOWFLAKE_PASSWORD = <password goes here>
SNOWFLAKE_ACCOUNT = <snowflake account url>
SNOWFLAKE_WH = <name of desired warehouse to use>
SNOWFLAKE_ROLE = <name of desired role to use>
```

## App Start Up
Once the python libraries are installed and the `.env` file has been configured, the streamlit app can be started
by running the following:

```streamlit run main_page.py```

The app should launch in a tab in your default internet browser, or can be reached by going to http://localhost:8501

## Pre-Commit
For code contribution, we use [pre-commit](https://pre-commit.com/) and [black](https://pypi.org/project/black/)
for automated code formatting. Before contributing code to the repo, please run the following from the repo root
folder to set up pre-commit to run:

```pre-commit install```

After successful setup, any files with changes that you are trying to commit to your branch will be checked and
reformatted whenever you run `git commit ...`