Skip to content

Use dependency-groups, add module docs#26

Merged
ThirteenFish merged 1 commit into
mainfrom
dep-groups
Mar 9, 2026
Merged

Use dependency-groups, add module docs#26
ThirteenFish merged 1 commit into
mainfrom
dep-groups

Conversation

@ThirteenFish
Copy link
Copy Markdown
Contributor

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.

@ThirteenFish ThirteenFish requested a review from bryborge March 9, 2026 02:21
@ThirteenFish ThirteenFish force-pushed the dep-groups branch 2 times, most recently from 225b837 to 39c6dea Compare March 9, 2026 02:23
Copy link
Copy Markdown
Contributor

@bryborge bryborge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, just didn't see D101 make the same move D100 did.

Comment thread pyproject.toml Outdated
"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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to add D101 here as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@ThirteenFish ThirteenFish merged commit 45287fb into main Mar 9, 2026
1 check passed
@ThirteenFish ThirteenFish deleted the dep-groups branch March 9, 2026 05:00
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.

2 participants