Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test if all exported names has a docstring #90

Open
Roger-luo opened this issue Dec 9, 2022 · 10 comments · May be fixed by #313
Open

Test if all exported names has a docstring #90

Roger-luo opened this issue Dec 9, 2022 · 10 comments · May be fixed by #313
Labels
enhancement New feature or request new test

Comments

@Roger-luo
Copy link
Contributor

Roger-luo commented Dec 9, 2022

we have some facilities testing this here: https://github.com/QuEraComputing/Bloqade.jl/pull/470/files#diff-8b6a3d1fcb6507d7155106fb9cbecf22d4b3b1377f4128af77b2112c2277e0a7R4

might be a good test for everyone in general? what do people think?

@lucaferranti
Copy link

lucaferranti commented Dec 28, 2022

just a friendly thumbs up, as I think this would be very nice to have :)

@KeithWM
Copy link

KeithWM commented Apr 28, 2023

Not quite sure if this is exactly what you're looking for, but Documenter also allows to check for existing docstrings. See this PR: JuliaDocs/Documenter.jl#1995 in particular.

@fingolfin fingolfin added the enhancement New feature or request label Jun 1, 2023
@gdalle
Copy link
Contributor

gdalle commented Jun 11, 2023

Not quite sure if this is exactly what you're looking for, but Documenter also allows to check for existing docstrings.

Indeed but some packages don't have a Documenter page (for instance because the README is very good). Still, they might want to add quality checks with Aqua, and this is an important one in my opinion :)

@KeithWM
Copy link

KeithWM commented Jun 17, 2023

Even then, it might be wise for Aqua to use or borrow the implementation of Documenter rather than reinventing the wheel. That said, there is a question whether Aqua attempts to be a one-stop quality assurance package, or play alongside other quality checks. What goes for Documenter's tests on documentation could also be said for JET's type stability checks. And maybe for other packages in this area too.

@hyrodium
Copy link
Contributor

hasdoc will be added in Base.

JuliaLang/julia#51174

@stevengj
Copy link

stevengj commented Jan 19, 2024

This is now as simple as:

 @test isempty(Docs.undocumented_names(MyModule))

in Julia 1.11.

(Note that this checks all public names, not just exported, i.e. it includes identifiers declared with the new public keyword in addition to identifiers declared with export.)

@gdalle
Copy link
Contributor

gdalle commented Jan 24, 2024

Just because it's a one liner perhaps doesn't mean it shouldn't be part of Aqua?

@j-fu
Copy link

j-fu commented Mar 22, 2024

I just wanted to open an issue on this and found this one. I think it should be part of Aqua, to make it a real one-stop solution for these quality tests.

@gdalle
Copy link
Contributor

gdalle commented Mar 22, 2024

I move to reopen as well

@gdalle
Copy link
Contributor

gdalle commented Nov 24, 2024

I finally got around to fixing it, would love a review on #313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants