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

Various improvements to documentation infrastructure #354

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

OriolAbril
Copy link
Contributor

@OriolAbril OriolAbril commented Jun 14, 2024

Multiple changes related to documentation infrastructure.
Can add some more depending on preferences.

  • Add conda forge install instructions

  • add viewcode and copybutton extensions. They add the [source] link to docs and a copybutton to
    copy whole cells. I will double check, but using the copy button should also copy the snippets
    in docstrings like the one in https://causalpy.readthedocs.io/en/latest/api_skl_experiments.html
    without the >>> parts.

  • Add the rtd-preview workflow that adds a link to the PR documentation preview as text at the
    bottom of the PR description. From what I see, PR doc preview aren't active yet, this can
    be done from https://readthedocs.org/dashboard/causalpy/edit/, scroll down and check
    the

    Build pull requests for this project:

    • More information in our docs.
  • remove sphinx-design from [docs] external dependencies as it was not used

  • updates to rtd config to make it more future proof

Related to #236 (not completely sure about the scope of the issue so not sure if it should be closed already or not yet), closes #86

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.98%. Comparing base (e092650) to head (7a23593).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #354   +/-   ##
=======================================
  Coverage   79.98%   79.98%           
=======================================
  Files          21       21           
  Lines        1634     1634           
=======================================
  Hits         1307     1307           
  Misses        327      327           

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

@drbenvincent
Copy link
Collaborator

drbenvincent commented Jun 14, 2024

Nice. So far with a local build of the docs... Copy button works great. Though it doesn't get rid of the >>> and ... parts from the examples in docstrings in the API documentation. It would be cool if that is possible.

I've also enabled that function on readthedocs. Though I guess we can't assess it works until this is merged.
Screenshot 2024-06-14 at 20 07 54

Did you have any other things you wanted to add, or shall I approve this?

@drbenvincent drbenvincent added the documentation Improvements or additions to documentation label Jun 14, 2024
@drbenvincent drbenvincent added this to the 0.3.1 milestone Jun 14, 2024
@OriolAbril
Copy link
Contributor Author

Still needs some work. I'll fix the copybutton and preview action. Do you want me to also add commonly referred libraries to intersphinx and start using more cross-references? Is there a page that come to mind that would be a candidate to serve as kind of example/template on how to use it?

@drbenvincent
Copy link
Collaborator

In terms of the cross-references, I think this is most useful in the API pages. An example would be the causalpy.pymc_experiments page

Screenshot 2024-06-17 at 09 38 22

For example the dataframe type is highlighted but not clickable to pandas. At the moment the pymc model is not type hinted, but that would be another cross-library reference.

@OriolAbril
Copy link
Contributor Author

Should be ready to merge now

Copy link
Collaborator

@drbenvincent drbenvincent left a comment

Choose a reason for hiding this comment

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

Thanks @OriolAbril!

@drbenvincent drbenvincent changed the title Documentation infrastructure Various improvements to documentation infrastructure Jun 18, 2024
@drbenvincent drbenvincent merged commit 4af4af6 into pymc-labs:main Jun 18, 2024
8 checks passed
@OriolAbril OriolAbril deleted the docs branch June 18, 2024 20:05
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.

Plots don't appear when running from ipython session
2 participants