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

Update for Documenter.jl v1 #683

Merged
merged 5 commits into from
Jan 9, 2024
Merged

Conversation

hyrodium
Copy link
Contributor

@hyrodium hyrodium commented Jan 4, 2024

No description provided.

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

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

The doc build fails currently because docs/Project.toml is missing a compat entry for Documenter. Could you add one to avoid that a future breaking update of Documenter breaks the docs again?

Comment on lines 63 to 68

## Other API
```@docs
ForwardDiff.can_dual
ForwardDiff.:≺
```
Copy link
Member

Choose a reason for hiding this comment

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

The docstring for can_dual is not useful at all, and both functions are not exported. IMO including them in the docs should be discussed and proposed in separate issues (#682) and PRs, but not be part of upgrading to Documenter v1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Documenter.jl v1 has warnonly=false keyword argument in makedocs. (JuliaDocs/Documenter.jl#2194), so makedocs will fail without adding the docs or setting warnonly=true.

These functions are already documented as docstrings, and I thought it would be okay to add them to the documentation. I understand these functions are not stable.
Should I replace "Other API" with "Internal API"?

Copy link
Member

Choose a reason for hiding this comment

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

AFAIK you can set checkdocs = :exports.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's right.
My point is, that the ignored docstrings may confuse other users. The functions are documented as docstrings, so someone may think these functions are stable. I thought emphasizing that these functions are not stable would help that kind of people.

Copy link
Member

Choose a reason for hiding this comment

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

But they are not exported, are they?

Copy link
Member

Choose a reason for hiding this comment

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

To clarify, I think these functions should not be included in the documentation for the time being and only added if they are considered important enough and their docstrings are more useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I don't quite understand.

Documentation should be written for both package users and developers, and including Internal API documentation will be useful for future package developers. Of course, if these docstrings are incorrect or meaningless, they should be removed, but that is not the case.

There are more functions and types that need to be written (#682), but I believe this is simply a matter of insufficient documentation, and not a reason to eliminate existing documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While I am not the maintainer of the repository, I am open to following your guidance as the maintainer. If you believe that removing these documents is the best course of action, I am willing to proceed with that.

Copy link
Member

Choose a reason for hiding this comment

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

AFAICT neither users nor developers should have to deal with can_dual and , so even though there is a docstring I don't think it should be included in the documentation (to me it seems these are just more detailed comments). value, Dual, etc. are more relevant IMO: #682 (but this should be discussed and addressed separately)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll update this PR to remove them from the documentation.

I will write down additional my concerns for future reference:

  • If we use checkdocs=:exports, that will be as harmful as warnonly=true because this package provides non-exported stable API.
  • I agree that the docstrings are something like detailed comments. But it would be very hard to discuss whether new docstrings should be in the docs or not every time. The easiest way would be to document the all docstrings.

@hyrodium
Copy link
Contributor Author

hyrodium commented Jan 5, 2024

The doc build fails currently because docs/Project.toml is missing a compat entry for Documenter.

The doc build is not failing, but I agree with adding [compat] for future breaking changes in Documenter, and I have added the [compat].

@hyrodium hyrodium force-pushed the docs/documenter_v1 branch from 0486391 to 675b191 Compare January 6, 2024 03:42
docs/make.jl Outdated Show resolved Hide resolved
docs/make.jl Outdated Show resolved Hide resolved
@hyrodium hyrodium force-pushed the docs/documenter_v1 branch from c51f7b4 to 675b191 Compare January 9, 2024 11:33
@devmotion devmotion merged commit 5e9240a into JuliaDiff:master Jan 9, 2024
3 of 10 checks passed
devmotion pushed a commit that referenced this pull request Sep 30, 2024
* ignore `docs/Manifest.toml`

* add missing docstrings

* add compat table for Documneter.jl

* rename Other API with Internal API

* Use `checkdocs=:exports` and ignore internal docstrings as strongly suggested by the reviewer
devmotion pushed a commit that referenced this pull request Sep 30, 2024
* ignore `docs/Manifest.toml`

* add missing docstrings

* add compat table for Documneter.jl

* rename Other API with Internal API

* Use `checkdocs=:exports` and ignore internal docstrings as strongly suggested by the reviewer
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