Skip to content

Identify and prioritize backlog tech debt#4

Merged
PhilipMathieu merged 6 commits intomainfrom
claude/identify-tech-debt-01HdoKFmWEh4XccDBLUBbdhY
Nov 16, 2025
Merged

Identify and prioritize backlog tech debt#4
PhilipMathieu merged 6 commits intomainfrom
claude/identify-tech-debt-01HdoKFmWEh4XccDBLUBbdhY

Conversation

@PhilipMathieu
Copy link
Owner

No description provided.

This commit addresses three critical technical debt items:

1. Add .env.example file
   - Created comprehensive environment variable documentation
   - Includes CENSUS_API_KEY setup instructions with signup URL
   - Helps with onboarding and configuration management

2. Fix empty except blocks with proper error handling
   - Added logging to previously silent error handlers in changelog.py
   - Added logging to network/parsing errors in probe_data_sources.py
   - Errors are now visible for debugging instead of being silently ignored
   - Added logging import to probe_data_sources.py

3. Replace print() with proper logging
   - Replaced all print() statements with appropriate logging levels
   - Added logging configuration to convert_to_pmtiles.py, download_graphs.py
   - Added logging import to h3utils.py
   - Errors use logging.error(), warnings use logging.warning(), info uses logging.info()
   - Improves debuggability and allows for log level control

These improvements enhance code maintainability, debuggability, and user experience.
Following code review feedback, updated logging implementation to match
established patterns and ensure future maintainability:

1. Library modules (h3utils.py):
   - Use logger = logging.getLogger(__name__) pattern
   - Removed basicConfig() which shouldn't be in imported modules
   - Changed logging.info() to logger.info() calls

2. Entry point scripts (convert_to_pmtiles.py, download_graphs.py):
   - Added explicit handlers=[logging.StreamHandler()] to basicConfig
   - Use logger = logging.getLogger(__name__) + logger.info() pattern
   - Consistent with run_pipeline.py and update_data_sources.py format

3. Added DEVELOPMENT.md documentation:
   - Clear guidelines for when to use basicConfig vs getLogger
   - Examples showing proper patterns for library vs entry scripts
   - Integration guidance for TQDM progress bars
   - Error handling best practices
   - Helps future developers use logging correctly

These changes ensure:
- No conflicts when modules are imported
- Consistent logging format across the codebase
- Proper integration with TQDM progress bars
- Clear documentation for future contributors
@github-actions
Copy link

PR Preview Action v1.6.2

🚀 View preview at
https://PhilipMathieu.github.io/access/pr-previews/pr-4/

Built to branch gh-pages at 2025-11-15 20:03 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link

📦 PR Preview Built

The site has been built and is available as a downloadable artifact in this workflow run.

To preview locally:

  1. Download the artifact from the workflow run
  2. Extract and open index.html in your browser

Or wait for this PR to be merged to see it live on GitHub Pages.

@PhilipMathieu PhilipMathieu merged commit ae36bb9 into main Nov 16, 2025
11 of 13 checks passed
@PhilipMathieu PhilipMathieu deleted the claude/identify-tech-debt-01HdoKFmWEh4XccDBLUBbdhY branch November 16, 2025 22:23
@PhilipMathieu PhilipMathieu restored the claude/identify-tech-debt-01HdoKFmWEh4XccDBLUBbdhY branch November 20, 2025 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants