Skip to content

docs: make the documentation build complete - #365

Open
lachlangrose wants to merge 1 commit into
masterfrom
docs/green-build
Open

lachlangrose wants to merge 1 commit into
masterfrom
docs/green-build

Conversation

@lachlangrose

Copy link
Copy Markdown
Member

First step of a docs/examples cleanup: make sphinx-build complete. Before this, the build crashed on the homepage and no HTML was produced.

Fixes

  • Homepage and what_is_a_geological_model.rst: the examples called bounding_box.structured_grid().properties, but that method returns the interpolation-support grid, which has no properties. The pyvista plot directive then raised an AssertionError and killed the build. The examples now build LoopStructural.geometry.StructuredGrid directly, as the library does internally. Also fixed the 'stratí' typo and the malformed second toctree on the homepage.
  • LoopStructural/utils/dtm_creator.py: imported Union from ctypes instead of typing, so the module could not be imported (and its API page failed).
  • docs/requirements.txt now installs the project's docs extra; the extra gains trame, trame-vtk and trame-vuetify, which the pyvista Sphinx extensions need.
  • Gallery errors: four examples added units to the default stratigraphic column, whose empty Basement group became Group_1 and logged Model does not contain Group_N. They now call stratigraphic_column.clear(basement=False) first (plot_2, plot_3, plot_5, 4_advanced/plot_2).
  • reST problems: seven single-colon code-block: directives, a literal block in the contributors guide, a bullet list in about.rst, a title underline, the CHANGELOG toctree entry that did not resolve, and two docstrings (set_stratigraphic_column, setup_interpolator).
  • Added preparing_data and structural_frames to the User Guide toctree (they were orphans).

Result

sphinx-build now finishes ("build succeeded, 98 warnings") and all 20 gallery examples run. Previously it crashed.

Not in this PR

  • Duplicate-object and ambiguous cross-reference warnings (the same classes are documented under both loop_common and LoopStructural).
  • Dead pyvista cross-references from Loop3DView docstrings.
  • visualisation.rst / debugging.rst still describe the removed LavaVuModelViewer; map2loop.rst is an unformatted paste.
  • Gallery runtime is about 7 minutes (mostly plot_7, plot_9, plot_6).
  • Isosurface warnings in plot_3 and plot_4.
  • No docs CI job yet.

Build notes

  • On a fresh output directory the pyvista viewer directive writes _static as a file and the build then fails with NotADirectoryError. Run mkdir -p <out>/_static before building. A CI job would need this.
  • I built with the repo's packages/*/src on PYTHONPATH in a scratch venv; I did not build from a clean pip install .[docs].
  • After refactor: dedupe the StructuredGrid results container and rename it PropertyGrid #363 lands, LoopStructural.geometry.StructuredGrid is an alias of PropertyGrid, so these examples keep working either way.

🤖 Generated with Claude Code

- fix homepage and user-guide examples that used bounding_box.structured_grid().properties
  (that returns the interpolation-support grid, which has no properties dict)
- fix dtm_creator importing Union from ctypes, which made the module unimportable
- make docs/requirements.txt install the docs extra; add trame packages to it
- start gallery examples from an empty stratigraphic column so the unused Basement
  group no longer logs 'Model does not contain Group_N' errors
- fix reST errors (toctree, code-block directives, literal blocks, title underline)
- add preparing_data and structural_frames to the user guide toctree

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.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.

1 participant