-
Notifications
You must be signed in to change notification settings - Fork 91
[docs] lazydocs to mkdocstrings #405
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
base: main
Are you sure you want to change the base?
Conversation
|
@elephaint This PR is ready, but I can't figure the latex rendering issue from the docstrings, everything else looks good! |
elephaint
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @deven367 , great work! Mostly minor comments 👍
| api_docs: | ||
| lazydocs .hierarchicalforecast --no-watermark | ||
| python docs/to_mdx.py | ||
| # lazydocs .hierarchicalforecast --no-watermark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed?
| - name: Install dependencies | ||
| run: | | ||
| pip install -e . lazydocs pyyaml | ||
| pip install -e . griffe2md pyyaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use uv here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly because our open-source repos don’t use uv, and I wanted to keep the workflow consistent with the rest of the Nixtlaverse.
happy to switch to uv if we want to standardize
|
|
||
| clean: | ||
| rm -f docs/*.md | ||
| # rm -f docs/*.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed?
| import yaml | ||
| from griffe2md import ConfigDict, render_object_docs | ||
|
|
||
| # from rich.console import Console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed?
|
|
||
| def process_file(self, input_file: str, output_file: Optional[str] = None) -> str: | ||
| """Process a markdown file and return the result""" | ||
| with open(input_file, "r", encoding="utf-8") as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't surrounded by a try... statement, are we sure this can't fail? e.g. file always exists, it is always a readable file format, it is always a markdown file?
|
|
||
| The `core.HierarchicalReconciliation` reconciliation class operates with | ||
| the hierarchical time series pd.DataFrame `Y_df`, the base predictions | ||
| pd.DataFrame `Y_hat_df`, the aggregation constraints matrix `S`. For |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S_df , not S
|
|
||
| ::: hierarchicalforecast.evaluation.evaluate | ||
|
|
||
| ### Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this example come from?
| OTexts.com/fpp3 Accessed on July | ||
| 2022.](https://otexts.com/fpp3/hierarchical.html) | ||
|
|
||
| ### Optimal Reconciliation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header can be removed imho, the references can just be added to the list under "General Reconciliation".
| ``` | ||
|
|
||
|
|
||
| ```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed imho (the polars example)
| ) | ||
| ``` | ||
|
|
||
| ## External Forecast Adapters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below function doesn't need to be in the docs - how to prevent it? Change the function to be private? (e.g. with a leading _?)
This PR does the migration from
lazydocstomkdocstrings