Skip to content

fix: pydoclint needs a dir path#77

Merged
lwasser merged 2 commits intopyOpenSci:mainfrom
lwasser:fix-pydoclint
Mar 5, 2025
Merged

fix: pydoclint needs a dir path#77
lwasser merged 2 commits intopyOpenSci:mainfrom
lwasser:fix-pydoclint

Conversation

@lwasser
Copy link
Member

@lwasser lwasser commented Feb 27, 2025

closes #75
this just fixes a small bug and ensures we use numpy style docstrings which our packaging guide suggests.
NOTE,

@lwasser lwasser added the bug Something isn't working label Feb 27, 2025

[tool.hatch.envs.style.scripts]
docstrings = "pydoclint"
docstrings = "pydoclint src/"
Copy link
Member Author

Choose a reason for hiding this comment

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

the hatch lint step won't work within a dir associated with pydoclint ✨

Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to also run pydoclint on the tests.

@lwasser
Copy link
Member Author

lwasser commented Feb 28, 2025

Ok @Midnighter this has been fixed here and in the other pr. but we can at some point merge this and i'll rebase the other pr so everything is in sync.

@Midnighter
Copy link
Contributor

Ok @Midnighter this has been fixed here and in the other pr. but we can at some point merge this and i'll rebase the other pr so everything is in sync.

I think, pydoclint doesn't work like that. We can try either pydoclint . or change the command to ["pydoclint src", "pydoclint tests"].

@lwasser
Copy link
Member Author

lwasser commented Mar 4, 2025

Ok @Midnighter this has been fixed here and in the other pr. but we can at some point merge this and i'll rebase the other pr so everything is in sync.

I think, pydoclint doesn't work like that. We can try either pydoclint . or change the command to ["pydoclint src", "pydoclint tests"].

Heya, @Midnighter Can you please test it for me or look below at my example as it seems to work (our tests don't really have full docstrings)?

I read the Pydoclint docs on using it, and they say it accepts files or folders (plural). I tried it out, and I think it does work that way? I could be missing something as this is a new tool to me (but very cool and one that I want to add to our toolbox here!

pyosMeta (☊ main) [$✎ ×1 ?] via 🐍 v3.10.9 
➜ pydoclint tests/ src/
Skipping files that match this pattern: \.git|\.tox
tests/__init__.py
tests/conftest.py
tests/integration/__init__.py
tests/integration/test_parse_issues.py
tests/integration/test_review_model.py
tests/unit/__init__.py
...

src/pyosmeta/contributors.py
    15: DOC301: Class `ProcessContributors`: __init__() should not have a docstring; please combine it with the docstring of the class
...

@Midnighter
Copy link
Contributor

Oh perfect, I'm mostly interacting from the phone these days and hardly get the chance to touch my laptop. Sorry for misleading you.

@lwasser
Copy link
Member Author

lwasser commented Mar 5, 2025

No worries at all. It's great to have these sanity checks!

It was a good point! Are you comfortable with our merging this now? I hope being way from the laptop is a good thing!!

@lwasser
Copy link
Member Author

lwasser commented Mar 5, 2025

ok yay! merging this !! Thanks for the review, @Midnighter, and for all of the incredible work on this template. it's SO valuable to our community 🚀

@lwasser lwasser merged commit bc52c37 into pyOpenSci:main Mar 5, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove TODO in the pyproject.toml for pydoclint

2 participants