Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/source/ProtobufStructures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Key Data Structures
These are the most commonly used Protocol Buffer structures in the ResInsight Python API.


.. _simulatortabledata:

SimulatorTableData
~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -62,6 +64,8 @@ SimulatorTableData



.. _simulatorcompdatentry:

SimulatorCompdatEntry
~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -140,6 +144,8 @@ SimulatorCompdatEntry



.. _simulatorwelspecsentry:

SimulatorWelspecsEntry
~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -209,6 +215,8 @@ SimulatorWelspecsEntry



.. _simulatortablerequest:

SimulatorTableRequest
~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -233,6 +241,8 @@ SimulatorTableRequest



.. _vec3d:

Vec3d
~~~~~

Expand Down Expand Up @@ -260,6 +270,8 @@ Vec3d



.. _vec3i:

Vec3i
~~~~~

Expand Down Expand Up @@ -287,13 +299,17 @@ Vec3i



.. _cellcenters:

CellCenters
~~~~~~~~~~~

**Source:** ``Definitions.proto``



.. _cellcorners:

CellCorners
~~~~~~~~~~~

Expand Down
11 changes: 11 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@
napoleon_google_docstring = True
smartquotes = False

# Clean up automodapi generated files in source after build to make sure we get a full rebuild next time
def cleanup_automodapi_files(app, exception):
"""Remove automodapi generated files from source directory after build."""
import shutil
api_dir = os.path.join(app.srcdir, 'api')
if os.path.exists(api_dir):
shutil.rmtree(api_dir)

def setup(app):
app.connect('build-finished', cleanup_automodapi_files)

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down
7 changes: 6 additions & 1 deletion docs/source/generate_protobuf_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,13 @@ def _format_message(self, msg: ProtoMessage, file_key: str, is_important: bool)
"""Format a message as RST."""
# Use proper RST heading levels
# Level 3 (~~~) for important messages, Level 4 (""") for others in Complete Reference
content = ""

# Add RST label for important messages to enable cross-references
if is_important:
content = f"\n{msg.name}\n"
# Create lowercase label for referencing (e.g., SimulatorTableData -> simulatortabledata)
label = msg.name.lower()
content = f"\n.. _{label}:\n\n{msg.name}\n"
content += "~" * len(msg.name) + "\n\n"
else:
content = f"\n{msg.name}\n"
Expand Down