Repository navigation
build: migrate to Ruff and refresh README badges - #39
Merged
Merged
Conversation
Replace the loose badge list with the nine-category table from the repository template, using the shared palette, a padlock for the security policy, and a download glyph for PyPI downloads.
Add the badge to the Community row, next to the contributing guide, the code of conduct, and the security policy. The repository already requires the format in CONTRIBUTING and release-please consumes it.
Replace black, isort, flake8 and its plugins with Ruff for both linting and formatting. Add the Ruff configuration to pyproject.toml, replace the flake8 and format tox environments with lint, format and format-check, and switch the pre-commit hooks to ruff check and ruff format. Tests are exempt from the docstring and line length rules.
Apply ruff format and the safe ruff check fixes (import order, unused imports) to the package and the tests. Also remove four duplicated test functions in the service tests (exports, flow share, impact share and imports) that were silently shadowed by an identical later definition (F811).
Fix the poetry install command in CONTRIBUTING.md now that the format group no longer exists, correct the scope in SECURITY.md that named wattnet-storage instead of wattnet-api, and normalize the wording of the pull request and issue templates. Use two-space indentation in dependabot.yml and remove em dashes from the README.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Description
Migrate
wattnet-apifrom black, isort and flake8 to Ruff for both linting and formatting, and align the README and community files with the Wattnet repository reference (wattnet-repo-template).build: Ruff configuration inpyproject.toml, tox environmentslint,formatandformat-check, and Ruff hooks in pre-commit. The old lint and format dependency groups are removed. Tests are exempt from the docstring and line length rules so thatruff check .passes on the whole repository.style:ruff formatand the saferuff checkfixes applied to the package and the tests. Four duplicated test functions that were shadowed by an identical later definition (F811) are removed.docs: new badge table and Conventional Commits badge, apoetry installcommand inCONTRIBUTING.mdthat no longer references the removedformatgroup, and aSECURITY.mdscope that namedwattnet-storageinstead ofwattnet-api. The wording of the pull request and issue templates is normalized, anddependabot.ymluses two-space indentation.No runtime behavior changes. The only source changes are formatting and the
zip(..., strict=...)arguments required by the B905 rule.Type of change
Checklist
pytest/tox)ruff format .)ruff check wattnet)mypy -p wattnet.api)bandit -r wattnet/)Notes for reviewers
The full
toxmatrix passes locally on all 12 environments (Python 3.10 to 3.14, lint, format-check, bandit, mypy, deptry, pypi and wheel).The commits are split so they can be reviewed or reverted separately:
build(tooling),style(formatting, large but mechanical) anddocs. The two earlier README badge commits are also part of this branch.feat/openapi-bearer-schemedoes not touch any file changed here, and its files already pass the new Ruff configuration, so it should rebase onmainwithout Ruff-related conflicts.