Implement DX improvements and automated quality checks
Summary
Currently, the project lacks automated checks for code quality, formatting, and type safety. This issue tracks the integration of standard DX tooling to catch bugs early and maintain a clean codebase without manual effort.
Tasks
Linting & Formatting
Integrate Ruff to handle linting (including dead code detection) and automatic formatting.
Type Checking
Add Mypy for static type analysis to ensure type safety across the bookextractor package.
Automated Testing
Configure Pytest with coverage reporting to track test health.
Git Hooks
- Add pre-commit hooks for Ruff and Mypy to catch errors before code is committed.
- Add pre-push hooks to run the full test suite before code reaches the remote.
CI Pipeline
Set up a .gitlab-ci.yml to automate all checks on every Merge Request.
Constraint
All tools must be included in the main project dependencies so they are installed automatically during standard setup (pip install -e .). No additional manual setup should be required from developers.
Goal
Ensure that any code added to the repository is linted, type-checked, and tested automatically, without requiring additional manual setup from developers.