Skip to content

Reorganize API examples and documentation notebooks - #1643

Open
make-ki wants to merge 1 commit into
PowerGridModel:mainfrom
make-ki:feature/1642
Open

make-ki wants to merge 1 commit into
PowerGridModel:mainfrom
make-ki:feature/1642

Conversation

@make-ki

@make-ki make-ki commented Oct 17, 2026

Copy link
Copy Markdown

Closes #1642

Summary

  • Move the buildable C API examples from power_grid_model_c_example/ to
    examples/c_api/.
  • Rename docs/examples/ to docs/example_notebooks/, including the notebook
    data and license files.
  • Update the developer-build CMake path, Sphinx toctree, documentation links,
    and notebook-specific Ruff configuration.
  • Preserve the existing C example executable target names, CTest names, and
    behavior.

No C++ wrapper examples or public API changes are included.

Verification checklist

Tested locally on NixOS with GCC 16.2.0 using the gcc-debug CMake preset.

  • CMake developer configuration succeeds.
  • All three existing C example executables build.
  • CTest discovers and passes PGMExample, PGMExampleSerialization, and
    PGMExampleLogging.
  • The documented build-script option for running the C example still works.
    The full native workflow was run with:
    bash ./build.sh -p gcc-debug -e
  • Sphinx builds with the renamed notebook paths and no missing notebook or
    toctree references.
  • Ruff applies the intended notebook-specific exceptions to the moved
    notebooks.
  • Repository search finds no stale references to the old directories.
    Remaining power_grid_model_c_example occurrences are preserved target
    names.
  • The C API guide and folder-structure page link to the new C example paths.

Additional verification

  • All 235 non-example native tests passed.
  • All three C example tests passed.
  • All pre-commit hooks passed.
  • Python tests passed: 1,834 passed, 4 skipped, and 7 expected failures.
  • Sphinx generated all 12 notebook pages.
  • 179 generated notebook navigation/content links and their target anchors were
    checked with no failures.
  • The Sphinx build has no new normalized diagnostics compared with the
    unchanged baseline and resolves two previously broken notebook links.

AI assistance

I used ChatGPT to assist with the reorganization and local verification. I
reviewed the changes and take responsibility for the contribution.

Signed-off-by: Anupam Mishra <motivationalboosto@gmail.com>

This branch has not been deployed

No deployments
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.

[IMPROVEMENT] Reorganize examples

1 participant