A script and Streamlit app that writes out EPW files from NREL Physical Solar Model (PSM) v3.2.2 (and v4.0.0 API).
- EPW Conversion: Converts NREL solar data to EnergyPlus Weather format.
- Streamlit App: User-friendly interface for downloading data.
- Secure: API keys are managed via Streamlit secrets and verified with hash checks.
- Modern Stack: Built with
uvfor dependency management andrufffor code quality.
app/: Contains the Streamlit application code.streamlit_app.py: Main entry point..streamlit/secrets.toml: (Not committed) Stores your API key.
nrel_psm3_2_epw/: Core transformation logic.tests/: Unit tests (100% coverage).
-
Install dependencies with uv:
uv sync --extra dev
-
Configure API Key:
- Create
app/.streamlit/secrets.toml:APIKEY = "YOUR_NREL_API_KEY"
- Note: The app verifies the default API key integrity.
- Create
-
Run the App:
uv run streamlit run app/streamlit_app.py
(Windows users can use
run_streamlit.bat) -
Run Tests:
uv run pytest
-
Lint & Format:
uv run ruff check --fix . uv run ruff format .