Claude/prepare v0.2.0a3#6
Merged
0-k merged 12 commits intoNov 15, 2025
Merged
Conversation
- Switch from Black/Flake8/isort to Ruff for faster linting and formatting - Add Ruff configuration to pyproject.toml - Update CI workflow to use ruff check and ruff format - Update requirements-dev.txt (removed black, isort, twine) - Completely redesign README.md for better usability - Add comprehensive feature list with visual indicators - Add installation and quick start sections - Add configuration reference table - Add development setup instructions - Update badge from Black to Ruff - Update CLAUDE.md project documentation - Reflect completed tasks (ReadTheDocs, const.py refactor, pytest migration, ruff) - Update project structure to show data/ directory - Update all code style references from Black/Flake8 to Ruff - Update Tax Year Support Matrix (2023-2025 now fully supported) - Update version to 1.1 - Bump version to 0.2.0a3 in pyproject.toml - Add comprehensive changelog entry for v0.2.0a3
- Fix import sorting across all modules - Modernize type hints (Dict -> dict, List -> list, Optional[X] -> X | None) - Remove unused imports - Fix type comparison to use 'is' instead of '==' for NotImplementedError - Auto-format all Python files with ruff All ruff checks now pass successfully.
- Add .pre-commit-config.yaml with ruff hooks - Automatically runs ruff check --fix before commits - Automatically runs ruff format before commits - Prevents CI failures by catching issues locally - Add pre-commit to requirements-dev.txt - Update documentation (README.md and CLAUDE.md) - Add pre-commit installation instructions to setup - Document pre-commit usage in Git Workflow section - Emphasize importance for preventing CI failures - Update CHANGELOG.md with pre-commit addition This addresses the issue where code quality checks were failing in CI. Pre-commit hooks now catch formatting and linting issues before they are committed, ensuring all commits pass CI checks.
- Update isinstance calls to use `int | float` instead of `(int, float)` - Applies Python 3.10+ union type syntax in isinstance checks - Ensures all pre-commit hooks pass These were unsafe fixes that required manual application. All code quality checks now pass locally and should pass in CI.
Add --unsafe-fixes flag to ruff pre-commit hook to automatically apply all available fixes, including modern Python syntax updates like `int | float` instead of `(int, float)` in isinstance calls. This ensures maximum code modernization and prevents manual fixes.
- Update pyproject.toml to use line-length = 88 - Reformat all code with new 88-character line limit - Update CLAUDE.md to reflect new line length setting - Update CHANGELOG.md to document the change Rationale: - 88 is Black's default and widely adopted in Python community - Better for code review (fits in GitHub PR split views) - More readable on various screen sizes - Encourages cleaner, more focused code - Aligns with PEP 8 recommendations (up to 99 is acceptable) This is a one-time formatting change that establishes a consistent standard for all future contributions.
Reduce documentation fluff by removing: - Redundant "Validate with pydantic" comments in data_loader.py - Redundant "Skip missing years" comments in data_loader.py - One-liner class docstrings that just restate the class name - Verbose parameter descriptions that just repeat defaults - Explanatory comments in docstring examples - Obvious inline comments (e.g., "Calculate the gradient..." in __calc_gradient) Simplify docstrings by: - Converting verbose example comments to concise >>> format - Removing redundant "or int" type annotations - Shortening parameter descriptions to essentials - Removing return value names (use just the type) - Fixing outdated references (const.py -> JSON files) All code quality checks pass. Documentation is now more concise while retaining essential information.
Add explicit instructions to install package in editable mode before running pytest. This fixes the common 'ModuleNotFoundError: No module named netto' error when running tests. Changes: - Add pip install -e . as first step in test running instructions - Note that this is required for imports to work - Mention --import-mode=append alternative (used by CI) - Update both README.md and CLAUDE.md for consistency
Change pytest commands from bare 'pytest' to 'python -m pytest' to avoid issues with UV and other tool managers that isolate pytest in a separate environment. This ensures pytest runs in the same Python environment where the netto package is installed, preventing ModuleNotFoundError. Tested locally - all 194 tests pass with python -m pytest.
Add 'Advanced: Using Helper Functions' section demonstrating: - calc_deductible_social_security() - calc_taxable_income() - get_marginal_tax_rate() Shows how users can access intermediate calculations for more granular control over the tax calculation pipeline.
- README.md: Rename deductible_ss to deductible_social_security for clarity - CLAUDE.md: Add v0.3.0 API improvement proposal - Overloaded parameters for helper functions (salary OR taxable_income) - Eliminates redundant parameter passing - Implementation example and rationale documented
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.
No description provided.