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

Add checkdocs_ignored_modules to exclude certain modules from checkdocs #2377

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

frankier
Copy link
Contributor

Fixes #2233

I went with missingdocs_ignore only rather than trying to check the other way i.e. that they are not included in the docs. I think this is an edge case and not something people need help verifying in practice.

It might be nice to have a more general API at some point. I did think about this again this a bit, but I have had the need (a few times) for what's in this PR so maybe let's go with a KISS approach for now?

@mortenpi
Copy link
Member

mortenpi commented Jan 25, 2024

This generally seems fine to me. There might be some opportunity to bikeshed the API here.. Should it be modules_ignore or something? Or should this just be done somehow via the modules keyword. A more general mechanism could be to filter by having the user pass a callback that checks the bindings (you could e.g. then filter out functions that start with _).

But I also think that we could have this as is, and deprecate this approach if we think we have a better API. The behavior here seems to be very well-defined, so deprecation should be relatively easy.

@frankier
Copy link
Contributor Author

Forgot about this PR! Rebased.

I think on balance that this is probably fine as-is if you are able to accept it. It would be possible to filter at the symbol level, but that seems like a different thing in that it is not a small change to this PR to do that, although I suppose module and symbol filtering could be exposed together with some kind of common (tree-walking-callback) API. I suspect these other requirement may not materialize, so perhaps let's lean towards saying YAGNI? It might be fine and/or nicer to do module filtering and symbol filtering separately if and when such a need arises?

I don't think it should be modules_ignore. The modules are not being ignored, they're just being ignored by checkdocs. I could change checkdocs_ignore to checkdocs_ignore_modules, but that might be a bit long?

What should I do with the changelog? Do I start a new heading?

@mortenpi
Copy link
Member

How about checkdocs_ignored_modules? It's long, yes, but clarity might be good here. E.g. we also have size_threshold_ignore, which takes file paths. So it would probably be good if the option name here would say what "type" of value it expects.

Beyond that, I think it would only need a CHANGELOG entry.

@maleadt
Copy link
Contributor

maleadt commented Aug 29, 2024

I was just looking for a feature like this, great to see a PR already!
Some context why this matters to me: in LLVM.jl, the LLVM.API submodule has Clang.jl-generated docstrings from Doxygen comments. Those are purely there for developers, so shouldn't be part of the documentation.

@frankier frankier changed the title Add checkdocs_ignore to exclude certain modules from checkdocs Add checkdocs_ignored_modules to exclude certain modules from checkdocs Sep 3, 2024
@frankier
Copy link
Contributor Author

frankier commented Sep 3, 2024

Rebased, updated to checkdocs_ignored_modules, changelog entry added. Ready to merge?

@mortenpi
Copy link
Member

mortenpi commented Sep 3, 2024

Yes, indeed! Thank you @frankier!

@mortenpi mortenpi merged commit d93aad0 into JuliaDocs:master Sep 3, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A way to excluding some submodules from missingdocs
3 participants