Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
pip install ruff pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: set pythonpath
run: |
echo "PYTHONPATH=home/runner/work/" >> $GITHUB_ENV
- name: Lint with flake8
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
ruff check .
- name: Format check with ruff
run: |
ruff format --check .
- name: Test with pytest
run: |
python -m pytest --import-mode=append test/ --cov=netto test/
Expand Down
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
hooks:
# Run the linter.
- id: ruff
args: [--fix, --unsafe-fixes]
# Run the formatter.
- id: ruff-format
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.0a3] - 2025-11-15

### Added
- **Pre-commit hooks**: Added `.pre-commit-config.yaml` for automatic code quality checks
- Runs ruff linting with auto-fix before each commit
- Runs ruff formatting before each commit
- Prevents CI failures by catching issues locally
- Added `pre-commit` to development dependencies

### Changed
- **Code Quality Tools**: Migrated from Black, isort, and Flake8 to Ruff
- Single, faster tool for formatting and linting
- Configuration in `pyproject.toml`
- Line length set to 88 (Black-compatible, industry standard)
- Updated CI workflow to use Ruff
- Updated development dependencies in `requirements-dev.txt`
- Applied ruff formatting and linting fixes across entire codebase
- **README.md**: Completely redesigned for better usability
- Added comprehensive feature list with emojis
- Added installation instructions
- Added quick start examples (basic, custom config, with deductibles)
- Added configuration reference table
- Added development setup instructions
- Added code quality commands using Ruff
- Updated badge from "Code style: black" to Ruff badge
- **CLAUDE.md**: Updated project documentation
- Updated project structure to reflect `data/` directory instead of `const.py`
- Updated Code Style section to mention Ruff instead of Black/Flake8
- Updated Testing section to reflect pytest migration (completed)
- Updated Linting and Formatting section with Ruff commands
- Updated Updating Tax Data section to reflect new JSON-based workflow
- Updated CI/CD section to mention Ruff
- Moved completed tasks to "Completed Tasks" section
- Updated Tax Year Support Matrix (2023-2025 now fully supported)
- Updated last modified date to 2025-11-15 and version to 1.1

### Removed
- **Development Dependencies**: Removed Black, isort, and Twine from `requirements-dev.txt`
- Replaced with Ruff for formatting and linting
- Twine removed as it's not needed for modern PyPI publishing workflow

## [0.2.0] - 2025-11-15

### Added
Expand Down
Loading