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

Fix ignored docstring for Model{Missing} constructor #219

Merged
merged 3 commits into from
Jul 16, 2021

Conversation

knuesel
Copy link
Contributor

@knuesel knuesel commented Mar 24, 2021

Currently the help for Model doesn't show the documentation for the inner constructor Model{Missing}, due to JuliaLang/julia#16730 .

This PR fixes it using the @doc workaround mentioned in that issue.

With this PR, the Model{Missing} doc shows up at the top, before the struct Model doc. I hope it's not a problem.

@devmotion
Copy link
Member

Oh, nice catch, I didn't know that it is problematic to add docstrings to inner constructors.

Maybe we could clean up and merge the three different docstrings for Model? I don't think it's helpful to copy-paste the struct definition, as done in the first docstring, and additionally the docstring for the model struct contains examples of the inner and outer constructor, so the division into 3 parts does not seem consistent. So my suggestion would be to have one docstring with all important information and examples attached to the struct but without the struct definition and only the signature of the constructors at the top.

@knuesel
Copy link
Contributor Author

knuesel commented Mar 24, 2021

Sounds good, I'll try to come up with a proposal (though I'm quite a beginner with Turing 😊)

@yebai
Copy link
Member

yebai commented Jul 15, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 15, 2021

👎 Rejected by too few approved reviews

@yebai
Copy link
Member

yebai commented Jul 15, 2021

bors r+

bors bot pushed a commit that referenced this pull request Jul 15, 2021
Currently the help for `Model` doesn't show the documentation for the inner constructor `Model{Missing}`, due to JuliaLang/julia#16730 .

This PR fixes it using the `@doc` workaround mentioned in that issue.

With this PR, the `Model{Missing}` doc shows up at the top, before the `struct Model` doc. I hope it's not a problem.

Co-authored-by: Hong Ge <hg344@cam.ac.uk>
@bors
Copy link
Contributor

bors bot commented Jul 15, 2021

This PR was included in a batch that timed out, it will be automatically retried

bors bot pushed a commit that referenced this pull request Jul 15, 2021
Currently the help for `Model` doesn't show the documentation for the inner constructor `Model{Missing}`, due to JuliaLang/julia#16730 .

This PR fixes it using the `@doc` workaround mentioned in that issue.

With this PR, the `Model{Missing}` doc shows up at the top, before the `struct Model` doc. I hope it's not a problem.

Co-authored-by: Hong Ge <hg344@cam.ac.uk>
@bors
Copy link
Contributor

bors bot commented Jul 15, 2021

Timed out.

@yebai yebai merged commit 42f6030 into TuringLang:master Jul 16, 2021
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.

3 participants