Refactor: modular project with uv, Typer CLI, Streamlit, and Pydantic#3
Open
scottfrasso wants to merge 3 commits intocoffeethencode:mainfrom
Open
Conversation
…ydantic Break the monolithic 767-line pipeline.py into a proper Python package with modular architecture, modern tooling, and an interactive Streamlit dashboard for data exploration. - Set up uv with pyproject.toml (replaces zero-dep stdlib approach) - Add Typer CLI with run, explore, serve, and cache-clear commands - Add Pydantic models for data validation (CleanedRecord, DashboardStats) - Add pydantic-ai as dependency for future AI agent work - Add Streamlit app with folium heatmap and plotly charts - Add python-dateutil for robust datetime parsing - Add caching layer in tmp/ to avoid slow CKAN API re-fetches - Configure ruff + mypy (strict) for linting and type checking - Set up lefthook for pre-commit hooks - Split CI: parallel jobs with all-checks-pass gate - Update README with new setup and usage instructions - Add CLAUDE.md project guide - Extract HTML template to templates/dashboard.html Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pytest exits with code 5 (no tests collected) when the test directory is empty, which fails the CI check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Breaks the monolithic 767-line
pipeline.pyinto a proper Python package with modern tooling and an interactive Streamlit dashboard for data exploration.run,explore,serve, andcache-clearcommandsCleanedRecord,DashboardStats)tmp/to avoid slow CKAN API re-fetches during developmentall-checks-passgateStreamlit Dashboard
New CLI
Test plan
uv syncinstalls all dependenciesuv run boston-needle-map rungeneratesdocs/index.htmlanddocs/needle_data.jsonuv run boston-needle-map explorelaunches Streamlit with heatmap and chartsuv run boston-needle-map cache-clearclearstmp/cacheuv run ruff check src/passes cleanuv run mypy src/passes strict modelefthook install && git commitruns pre-commit hooks🤖 Generated with Claude Code