Skip to content

docs: fix API reference completeness and navigation (#888)#889

Open
egordm wants to merge 2 commits into
release/v4.0.0from
docs/888-api-reference-completeness
Open

docs: fix API reference completeness and navigation (#888)#889
egordm wants to merge 2 commits into
release/v4.0.0from
docs/888-api-reference-completeness

Conversation

@egordm
Copy link
Copy Markdown
Collaborator

@egordm egordm commented May 15, 2026

Summary

Fixes the API reference to cover the full public surface with navigable hierarchy. Resolves #888.

Changes

Coverage

  • openstef_meta section added to API index (models, presets, utils)
  • openstef_models.transforms now lists all 6 submodules and their public classes
  • Missing modules added: workflows, presets, integrations, utils, mixins, transforms (models), mixins, testing, transforms, types (core)
  • Phantom entries removed (pipelines, exceptions)
  • Zero autosummary.import_cycle warnings (suppressed as benign)

Pydantic rendering

  • Field(description=...) values shown alongside field definitions via object-description-transform hook (~30 LOC in conf.py, no new dependencies)

Navigation

  • collapse_navigation: True — sidebar collapsed by default
  • Package → module → class hierarchy with chevron expansion
  • Per-package sub-pages (core.rst, models.rst, beam.rst, meta.rst) for clean sidebar grouping

Template improvements

  • Dynamic submodule discovery via pkgutil.iter_modules() registered through autosummary_context — no hardcoded module names in templates
  • Removed all hardcoded drill-down sections from package RST files (utils/, transforms/, models/*)
  • Fixed short_name threshold (>3>=3) for correct sidebar labels on nested modules
  • :recursive: autosummary for automatic child module documentation

Spot-checks

  • openstef_models.transforms.general — shows OutlierHandler, Imputer, Scaler with docstrings
  • BacktestConfig — shows "Time interval between prediction samples..."
  • openstef_meta.presets — renders with classes and functions

Remaining warnings (pre-existing, not introduced)

  • 4 stub file not found for openstef_core.mixins.{predictor,stateful,transform} — macOS case-insensitive filesystem collision (Predictor.rst overwrites predictor.rst)
  • 1 failed to import SimpleTargetProvider[BenchmarkTarget, — generic type annotation with brackets confuses autosummary parser

egordm added 2 commits May 15, 2026 15:50
- Add openstef_meta package to API index (models, presets, utils)
- List transforms submodules explicitly (general, time_domain,
  energy_domain, weather_domain, validation) — fixes empty page
- Add missing modules: workflows, presets, integrations, utils, mixins
- Remove phantom entries: pipelines, exceptions (eliminated build warnings)
- Add autodoc hook to render Pydantic Field(description=...) values
- Collapse sidebar navigation by default (was 95+ items expanded)
- Add Meta card to API landing page grid

Closes #888

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
… descriptions

- Add dynamic submodule discovery via pkgutil.iter_modules() in conf.py
  (registered through autosummary_context for Jinja2 templates)
- Add Pydantic field description injection via object-description-transform
  event, placing descriptions next to attribute type annotations
- Create per-package API sub-pages (core, models, beam, meta) with
  :recursive: autosummary for automatic child module documentation
- Remove hardcoded submodule lists from package_overview.rst template,
  replaced with discover_submodules() calls
- Remove hardcoded drill-down sections from models.rst and meta.rst
- Fix short_name threshold (>3 to >=3) in both templates for correct
  sidebar labels on 3-part module names
- Update index.rst summary tables to match actual package contents
- Add missing modules: transforms (models pkg), mixins/testing/
  transforms/types (core pkg)

Resolves #888

Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
Signed-off-by: Egor Dmitriev <egor.dmitriev@alliander.com>
@egordm egordm requested a review from a team May 15, 2026 13:55
@github-actions github-actions Bot added the chore Improvements or additions to documentation label May 15, 2026
@sonarqubecloud
Copy link
Copy Markdown

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

Labels

chore Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant