Skip to content

Conversation

@deven367
Copy link
Collaborator

@deven367 deven367 commented Oct 16, 2025

This PR does the migration from lazydocs to mkdocstrings

  • update Makefile
  • update build-docs workflow
  • add parser

@deven367
Copy link
Collaborator Author

@elephaint This PR is ready, but I can't figure the latex rendering issue from the docstrings, everything else looks good!

Copy link
Collaborator

@elephaint elephaint left a 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
Copy link
Collaborator

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
Copy link
Collaborator

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
Copy link
Collaborator

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:
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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 _?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants