Skip to content

refactor: modernize type hints and project configuration - #25

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

ilypopv merged 22 commits into
mainfrom
dev

Conversation

@ilypopv

@ilypopv ilypopv commented Aug 13, 2026

Copy link
Copy Markdown
Member

📝 Summary

This PR modernizes the codebase by adopting PEP 604 union types (|) and Annotated for Typer CLI arguments. It also improves project maintainability by
adding a comprehensive .gitignore and updating project metadata in pytest.toml.

🛠 Type of Change

  • Refactoring

🔍 Key Changes

  • Type Hint Modernization: Replaced legacy Optional[T] and Union[A, B] syntax with modern Python 3.10+ pipe operators (T | None and A | B) across
    all modules.
  • Typer Refactoring: Updated CLI argument definitions to use Annotated[...] for better type safety and cleaner parameter defaults.
  • Project Configuration:
    • Added a robust .gitignore covering Python environments, IDEs (PyCharm/VSCode), and large data artifacts (CSV, Parquet, Models).
    • Bumped version to 1.1.3 in pyproject.toml.
    • Updated author contact information and added pythonpath = ["."] for better testing integration.
  • Code Quality & Robustness:
    • Refined error handling in pipeline.py to catch specific OSError instead of broad Exception.
    • Cleaned up unused variables in unit tests using the underscore prefix convention.
    • Standardized shebangs and import orders across entry-point scripts.

🧪 How Has This Been Tested?

  • Verified that existing unit tests in tests/test_units.py pass after refactoring variable names.
  • Manual verification of CLI argument parsing via typer to ensure Annotated implementation does not alter command-line behavior.

ilypopv and others added 22 commits July 31, 2026 15:20
…ed for better clarity and modern Python typing
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
krakenparser/pipeline.py 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ilypopv
ilypopv marked this pull request as ready for review August 14, 2026 04:58
@ilypopv
ilypopv merged commit 50e1a38 into main Aug 14, 2026
11 checks passed
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