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

Use AutoAPI for the API documentation #478

Merged
merged 13 commits into from
Feb 22, 2023
Merged

Conversation

rlouf
Copy link
Member

@rlouf rlouf commented Jan 26, 2023

In this PR I use AutoAPI to build a complete API documentation for Blackjax. We may still need to provide some higher-level information regarding how to use the library, but this is already pretty good out-of-the-box.

My only concern is related to the use of closures in Blackjax, and whether it is possible to write documentation for nested function automatically. We may want to forego the use of closures altogether in the library?

@rlouf rlouf added the documentation Improvements or additions to documentation label Jan 26, 2023
junpenglao
junpenglao previously approved these changes Jan 26, 2023
Copy link
Member

@junpenglao junpenglao left a comment

Choose a reason for hiding this comment

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

Nice.

@rlouf
Copy link
Member Author

rlouf commented Jan 26, 2023

What's your take on potentially removing the closures and just have (bigger) step functions? Almost looks like we would need a class

@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #478 (8466303) into main (2f19d12) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #478   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files          48       48           
  Lines        1915     1915           
=======================================
  Hits         1899     1899           
  Misses         16       16           
Impacted Files Coverage Δ
blackjax/adaptation/meads_adaptation.py 100.00% <ø> (ø)
blackjax/adaptation/step_size.py 100.00% <ø> (ø)
blackjax/base.py 100.00% <ø> (ø)
blackjax/diagnostics.py 100.00% <ø> (ø)
blackjax/kernels.py 99.17% <ø> (ø)
blackjax/mcmc/elliptical_slice.py 95.00% <ø> (ø)
blackjax/mcmc/integrators.py 100.00% <ø> (ø)
blackjax/mcmc/marginal_latent_gaussian.py 100.00% <ø> (ø)
blackjax/mcmc/metrics.py 100.00% <ø> (ø)
blackjax/mcmc/nuts.py 100.00% <ø> (ø)
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@junpenglao
Copy link
Member

We may want to forego the use of closures altogether in the library?

Closure is pretty huge feature for the functional style of the library, so I would discourage changing this part for having easier doc generation.

@@ -49,16 +49,17 @@ def velocity_verlet(
) -> EuclideanIntegrator:
"""The velocity Verlet (or Verlet-Störmer) integrator.

The velocity Verlet is a two-stage palindromic integrator [1]_ of the form
The velocity Verlet is a two-stage palindromic integrator [BouRabee2018]_ of the form
Copy link
Member

Choose a reason for hiding this comment

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

From here on it start to differ than above in terms of reference style ([1]), we should keep it consistent.

Copy link
Member

Choose a reason for hiding this comment

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

Just saw #493, so we should use explicit ref everywhere right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should, it will make #473 easier. I would even change the citation style to follow what Sphinx recommends.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's uniformize all this when solving #493.

@rlouf rlouf force-pushed the api-doc branch 2 times, most recently from aeb1742 to 8466303 Compare February 22, 2023 15:15
@rlouf rlouf merged commit 6b76746 into blackjax-devs:main Feb 22, 2023
@rlouf rlouf deleted the api-doc branch February 22, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants