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

Generate API docs #2347

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Generate API docs #2347

wants to merge 10 commits into from

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Sep 26, 2024

Description

This PR generates API docs for Turing.jl itself. This exposes documentation for important things like samplers which are otherwise undocumented.

Many of the exported identifiers are defined in other packages (DynamicPPL, etc.) and re-exported and/or extended by Turing. Rather than inserting the actual docs (which can actually be quite difficult sometimes as it requires locating the right method), I've generally opted to put them in a table with links to the corresponding package documentation.

This PR also adds docstrings to exported identifiers where necessary, and fixes some inaccuracies in the MH() docstrings.

Closes #2344.

Preview the docs

https://turinglang.org/Turing.jl/previews/PR2347/

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (40a0d84) to head (446f278).

❗ There is a different number of reports uploaded between BASE (40a0d84) and HEAD (446f278). Click for more details.

HEAD has 16 uploads less than BASE
Flag BASE (40a0d84) HEAD (446f278)
56 40
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #2347       +/-   ##
==========================================
- Coverage   86.67%   0.00%   -86.68%     
==========================================
  Files          24      22        -2     
  Lines        1599    1533       -66     
==========================================
- Hits         1386       0     -1386     
- Misses        213    1533     +1320     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@penelopeysm penelopeysm force-pushed the pysm/docs branch 2 times, most recently from dda13b9 to 2efffe2 Compare September 27, 2024 01:21
@coveralls
Copy link

coveralls commented Sep 27, 2024

Pull Request Test Coverage Report for Build 11252307560

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1325 unchanged lines in 21 files lost coverage.
  • Overall coverage decreased (-87.0%) to 0.0%

Files with Coverage Reduction New Missed Lines %
src/variational/VariationalInference.jl 4 0.0%
src/Turing.jl 9 0.0%
src/mcmc/gibbs_conditional.jl 12 0.0%
src/mcmc/is.jl 16 0.0%
src/stdlib/RandomMeasures.jl 22 0.0%
src/essential/container.jl 27 0.0%
ext/TuringDynamicHMCExt.jl 29 0.0%
src/mcmc/emcee.jl 47 0.0%
ext/TuringOptimExt.jl 50 0.0%
src/mcmc/ess.jl 51 0.0%
Totals Coverage Status
Change from base Build 11180921169: -87.0%
Covered Lines: 0
Relevant Lines: 1533

💛 - Coveralls

@penelopeysm penelopeysm force-pushed the pysm/docs branch 2 times, most recently from 8c368c5 to 8d408b4 Compare October 2, 2024 19:48
@penelopeysm penelopeysm changed the title (WIP) Generate API docs Generate API docs Oct 8, 2024
@penelopeysm penelopeysm marked this pull request as ready for review October 8, 2024 15:22
@penelopeysm
Copy link
Member Author

penelopeysm commented Oct 8, 2024

I think this is finally ready :) Most of the changes can be seen via the preview docs (https://turinglang.org/Turing.jl/previews/PR2347/) but also please do check over the docstrings I added.

(There are no source code changes in this PR)

@yebai yebai requested review from sunxd3 and removed request for yebai October 8, 2024 16:34
@yebai
Copy link
Member

yebai commented Oct 8, 2024

@sunxd3 can you help review @penelopeysm's PR?

@penelopeysm
Copy link
Member Author

1.11 tests failing because of compintell/Mooncake.jl#180

Copy link
Collaborator

@sunxd3 sunxd3 left a comment

Choose a reason for hiding this comment

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

Great work @penelopeysm

.github/workflows/Docs.yml Outdated Show resolved Hide resolved
docs/src/api.md Show resolved Hide resolved
# API: `Turing.Inference`

```@autodocs
Modules = [Turing.Inference]
Copy link
Collaborator

Choose a reason for hiding this comment

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

ideally, this page is more structured. but I think we should merge this now and fix it later.

src/Turing.jl Show resolved Hide resolved
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.

Regenerate API docs
4 participants