Use dependency-groups, add module docs#26
Conversation
225b837 to
39c6dea
Compare
bryborge
left a comment
There was a problem hiding this comment.
Changes look good, just didn't see D101 make the same move D100 did.
| "tests/**/test_*.py" = [ | ||
| "S101", # assert - pytest prefers plain assert | ||
| "PLC0415", # import - pytests need flexibility around when to import | ||
| "D100", # Module docstring - the test modules are pretty self-describing |
There was a problem hiding this comment.
Did you intend to add D101 here as well?
There was a problem hiding this comment.
I didn't since all the test classes already had docstrings, but, there doesn't really need to be docstrings there either I guess. I wonder if we should do any of the doc lints there at all?
Going off this list I think it might make sense to ignore D101 - D107 for tests. I can't really think that we'd want to enforce these, but if they're there already then we can lint their style. Thoughts?
There was a problem hiding this comment.
For tests, I tend to lean further away from strictly enforcing stuff like this, so I hear ya! I'm good with ignoring 101-107. 👍🏻
I just figured I'd ask because you mentioned in the description of this PR that you enabled D101.
The pyproject.toml table [dependency-groups] is relatively new and is intended for dependencies that shouldn't be referenced at all in the produced package, which makes it great for dev and testing things like ruff or pytest. I've also enabled D100 and D101 Ruff lints to check for class and module docs, and added the missing ones where they were needed. Finally I removed setuptools from the dev dependencies, as this is what setuptools recommends. The `build` tool will inspect [build-system].requires and fetch the packages then, which is the only time they should be needed.
The pyproject.toml table [dependency-groups] is relatively new and is intended for dependencies that shouldn't be referenced at all in the produced package, which makes it great for dev and testing things like ruff or pytest.
I've also enabled D100 and D101 Ruff lints to check for class and module docs, and added the missing ones where they were needed.
Finally I removed setuptools from the dev dependencies, as this is what setuptools recommends. The
buildtool will inspect [build-system].requires and fetch the packages then, which is the only time they should be needed.