Skip to content

Migrate to shared uv + ruff + pylint + pre-commit tooling - #10

Closed
Tokarzewski wants to merge 1 commit into
DesignBuilderSoftware:masterfrom
Tokarzewski:chore/ruff-pylint-precommit
Closed

Tokarzewski wants to merge 1 commit into
DesignBuilderSoftware:masterfrom
Tokarzewski:chore/ruff-pylint-precommit

Conversation

@Tokarzewski

Copy link
Copy Markdown

Summary

Brings db-eplustbl-reader in line with the other db-* repos: uv + ruff + pylint + pre-commit, replacing the Poetry + black/flake8/isort setup.

Changes

  • pyproject.toml — Poetry → PEP 621 + uv. [tool.uv] package = false (this is a PyInstaller-packaged tool, not an installable library). Drop black/flake8/isort; dev group is ruff, pylint, pre-commit, pytest, pytest-cov, pyinstaller. Add [tool.ruff] + [tool.pylint] config and pytest pythonpath = ["src"] so the flat src/ modules import by bare name.
  • .pre-commit-config.yaml — the shared ruff-imports / ruff-check / ruff-format + local pylint and pytest hooks (same as db-batch / db-eplusout-reader / db-dsbxml-viewer).
  • CI (run-tests.yml) — replaced the external voightp/github-actions reusable workflows (which assumed Poetry) with a standard uv-based lint + test matrix (ruff + pylint, then pytest on 3.9–3.12).
  • Removed .flake8 and poetry.lock; added uv.lock.
  • Small fixes surfaced by the new linters: wrap the __main__ block in main() (invalid-name), make the test import consistent (db_writer, not src.db_writer), and mark the Windows-only ctypes.windll call.

Verification

ruff check .          All checks passed!
ruff format --check   7 files already formatted
pylint src            10.00/10
pytest                5 passed
pre-commit run -a     ruff-imports/check/format, pylint, pytest all Passed

Notes

  • run-build.yml (tag-triggered) still references the external Poetry-based reusable workflow. It doesn't run on PRs; left for a follow-up since the packaging/build flow (PyInstaller) is a separate concern.
  • Opened from a fork — I don't have push access to the upstream repo.

🤖 Generated with Claude Code

Bring this repo in line with the other db-* repos:

- convert pyproject from Poetry to PEP 621 + uv (package = false, since
  this is a PyInstaller-packaged tool, not an installable library);
  drop black / flake8 / isort in favour of ruff (check + format) + pylint
- add ruff + pylint config; pytest pythonpath = ['src'] so the flat src
  modules import by bare name
- replace .pre-commit-config.yaml with the shared ruff + pylint + pytest
  hooks; remove .flake8 and poetry.lock, add uv.lock
- replace the external reusable-workflow CI with a standard uv-based
  lint + test matrix workflow (ruff, pylint, pytest on 3.9-3.12)
- small fixes: wrap the __main__ block in main(), make the test import
  consistent, mark the Windows-only ctypes.windll call

ruff check + format clean, pylint 10.00/10, 5 tests pass; all pre-commit
hooks pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Tokarzewski Tokarzewski closed this by deleting the head repository Jun 20, 2026
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