Skip to content

refactor: modernize type hints and update project dependencies - #38

Merged
ilypopv merged 42 commits into
mainfrom
dev
Aug 14, 2026
Merged

ilypopv merged 42 commits into
mainfrom
dev

Conversation

@ilypopv

@ilypopv ilypopv commented Aug 13, 2026

Copy link
Copy Markdown
Owner

📝 Summary

This PR modernizes the codebase by adopting Python 3.10+ type hinting syntax (PEP 585 and PEP 604) across all modules, replacing legacy typing generics with
built-in collections. It also updates project metadata to reflect new repository URLs and migrates the testing suite from httpx to httpx2.

🛠 Type of Change

  • Refactoring

🔍 Key Changes

  • Type Hint Modernization: Replaced List, Dict, Tuple, Union, and Optional with modern alternatives like list, dict, tuple, and the |
    operator across the entire repository.
  • Dependency Update: Migrated from httpx to httxt2 in pyproject.toml and updated all corresponding test implementations.
  • Improved Error Handling: Refined exception blocks in app.py and web.py to catch specific error types (e.g., json.JSONDecodeError, OSError)
    instead of broad Exception catches, improving debuggability.
  • FastAPI Refactoring: Utilized Annotated for defining Form parameters in the web application to align with modern FastAPI best practices.
  • Metadata & URL Updates: Updated GitHub repository URLs in README.md, CITATION.cff, and static HTML assets to reflect the updated user handle.
  • Project Maintenance: Added a comprehensive .gitignore file covering Python, Jupyter, and ML-related artifacts (models, datasets, etc.).

🧪 How Has This Been Tested?

  • Verified that the existing test suite passes using pytest.
  • Confirmed that all integration tests in tests/test_app_helpers.py and tests/test_web_routes.py correctly utilize the new httpx2 client.
  • Validated that the web application launch sequence remains stable with the updated exception handling logic.

ilypopv and others added 30 commits August 1, 2026 09:52
@ilypopv
ilypopv marked this pull request as ready for review August 14, 2026 04:58
@ilypopv
ilypopv merged commit a6aef68 into main Aug 14, 2026
10 checks passed
@ilypopv
ilypopv deleted the dev branch August 30, 2026 12:47
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.

1 participant