Skip to content

Streamlit app for viewing weather on 48 4,000 footer peaks in NH

License

Notifications You must be signed in to change notification settings

gerardrbentley/peak-weather

Repository files navigation

Peak Weather: New Hampshire's 4,000 Footers

Check it out live on streamlit cloud

Built to give you a dashboard view of the next few hours' forecast for New Hampshires 48 4,000 ft mountains. Gonna rain on the Kinsmans? Is it snowing on Washington? Should I hike Owl's Head?

Powered by Streamlit + Open Weather API. Specifically, Streamlit runs the web interactinos and OpenWeather provides the data.

Local Run

Update OpenWeather connection secrets

Requires signing up for Open Weather API Account.

Considered using weather.gov feed, but found Avra on YouTube have success with Open Weather

  • Copy or Rename .env.example as .env.dev and fill in the OPEN_WEATHER_API_KEY for your account (should come via email)
mv .env.example .env.dev

Run with Docker

Requires docker-compose to be installed (this comes with Docker Desktop).

docker-compose up
# Open localhost:8501

Use -d to detach from logs.

Use --build on subsequent runs to rebuild dependencies / docker image.

Lint, Check, Test with Docker

# Linting
docker-compose run streamlit-app nox.sh -s lint
# Unit Testing
docker-compose run streamlit-app nox.sh -s test
# Both
docker-compose run streamlit-app nox.sh
# As needed:
docker-compose build

# E2E Testing
docker-compose up -d --build
# Replace screenshots
docker-compose exec streamlit-app nox -s test -- -m e2e --visual-baseline
# Compare to visual baseline screenshots
docker-compose exec streamlit-app nox -s test -- -m e2e
# Turn off / tear down
docker-compose down

Local Python environment

For code completion / linting / developing / etc.

python -m venv venv
. ./venv/bin/activate
# .\venv\Scripts\activate for Windows
python -m pip install -r ./streamlit_app/requirements.dev.txt
pre-commit install

# Linting / Static Checking / Unit Testing
python -m black streamlit_app
python -m isort --profile=black streamlit_app
python -m flake8 --config=./streamlit_app/.flake8 streamlit_app

Features

Project Breakdown

Utilizes Open Weather API Endpoints:

"One-Call" API

Documentation

About

Streamlit app for viewing weather on 48 4,000 footer peaks in NH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published