pymc-labs / CausalPy

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

Change docs theme #371

Closed drbenvincent closed 3 months ago

drbenvincent commented 3 months ago

Worth checking the API docs. For example, the API docs for the class LinearRegression (in pymc_model.py) includes a LOT of stuff because we inherit from ModelBuilder which in turn inherits from pm.Model. Not saying we don't, but do we want all that stuff?


📚 Documentation preview 📚: https://causalpy--371.org.readthedocs.build/en/371/

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 85.60%. Comparing base (f659908) to head (f513ef8). Report is 110 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #371 +/- ## ======================================= Coverage 85.60% 85.60% ======================================= Files 22 22 Lines 1716 1716 ======================================= Hits 1469 1469 Misses 247 247 ```

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

OriolAbril commented 3 months ago

Worth checking the API docs. For example, the API docs for the class LinearRegression (in pymc_model.py) includes a LOT of stuff because we inherit from ModelBuilder which in turn inherits from pm.Model. Not saying we don't, but do we want all that stuff?

It is probably enough for many of them to mention the parent class and link to its docs (which should have those methods). That being said, the approach initially taken for pymc-marketing was to automate completely the generation of API docs. I think it would be possible to modify the template so inherited methods are not shown, but given the templates are only type specific (class/method/module) customization of the hierarchy or content depending on the module or class will end up complicating things more than generating all the rst/markdown files once and update them whenever a new object is added/removed to the library.

Everything else looks good, but at some point (especially if a pymc-analytics is created) it might help to externalize the common customizations into a labs theme

drbenvincent commented 3 months ago

Thanks @OriolAbril. If you think this is good to go, could you approve in a review so I can merge?