pymc-labs / CausalPy

A Python package for causal inference in quasi-experimental settings
https://causalpy.readthedocs.io
Apache License 2.0
829 stars 52 forks source link

Various improvements to documentation infrastructure #354

Closed OriolAbril closed 1 week ago

OriolAbril commented 2 weeks ago

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

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

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

drbenvincent commented 2 weeks ago

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?

OriolAbril commented 2 weeks ago

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 commented 2 weeks ago

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 commented 1 week ago

Should be ready to merge now