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

Tell Documenter about non-exported names that are part of my package's public API #1506

Open
DilumAluthge opened this issue Jan 19, 2021 · 3 comments

Comments

@DilumAluthge
Copy link
Contributor

In my package's documentation, I have a page public.md with the following contents:

# Public API

```@autodocs
Modules = [MyPackage]
Public = true
Private = false
```

And a page private.md with the following contents:

# Private API (Internals)

```@autodocs
Modules = [MyPackage]
Public = false
Private = true
```

Obviously, all of the exported names in my package are part of the public API. However, the converse is false. There are some names in my package that part of the public API but are not exported.

Unfortunately, currently, these names will show up on the private.md page, and they will not show up on the public.md page.

Is there a way to tell Documenter that certain non-exported names are actually part of the public API, so that they do show up under the public names and do not show up under the private names?

@mortenpi
Copy link
Member

Just thinking out loud here a bit:

  • Now that we have the public keyword (Add public keyword JuliaLang/julia#50105), this should be based on that.
  • I also think that there are two slightly separate actionable things here:
    1. Adding support for using the public declarations for filtering in the at-autodocs.
    2. Adding an indicator to the spliced docstrings. My two cents right now is that we should add a badge (or something) for internal docstrings, and just keep rendering the public ones like we do right now (I expect most docstrings that get included in the manual to be public API).

@mortenpi
Copy link
Member

Third action item here:

  1. Add a checkdocs = :public option, to make sure that all docstrings that are considered public API are included in the manual. Current options are :none (no checks), :exports (only checks exported names, but not non-exported public names), and :all (would include also non-public internal docstrings).

@LilithHafner
Copy link
Contributor

Adding an indicator to the spliced docstrings. My two cents right now is that we should add a badge (or something) for internal docstrings, and just keep rendering the public ones like we do right now (I expect most docstrings that get included in the manual to be public API).

Agreed. This is also what the REPL help mode does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants