Skip to content

Commit

Permalink
DOC: Move example into docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Feb 10, 2025
1 parent 922ed70 commit 88fe9f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
17 changes: 2 additions & 15 deletions docs/src/standard_results/initial_inplace_volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,6 @@ should be moved to after the export for flow simulation.

## Usage

```python
from fmu.dataio.export.rms import export_inplace_volumes

# 'Geogrid' is the grid model name
# 'geogrid_volumes' is the name of the volume job
export_results = export_inplace_volumes(project, "Geogrid", "geogrid_volumes")

for result in export_results.items:
print(f"Output volumes to {result.absolute_path}")
```

### Implementation

```{eval-rst}
.. autofunction:: fmu.dataio.export.rms.inplace_volumes.export_inplace_volumes
```
Expand Down Expand Up @@ -82,8 +69,8 @@ However, when these columns are present, their type is validated.
## Standard result schema

This standard results is made available with a validation schema that can be
used by consumers. A reference to the URL where this schema is present within
the `data.product` key in its associated object metadata.
used by consumers. A reference to the URL where this schema is located is
present within the `data.product` key in its associated object metadata.

| Field | Value |
| --- | --- |
Expand Down
13 changes: 12 additions & 1 deletion src/fmu/dataio/export/rms/inplace_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,18 @@ def export_inplace_volumes(
Note:
This function is experimental and may change in future versions.
"""
Examples:
Example usage in an RMS script::
from fmu.dataio.export.rms import export_inplace_volumes
export_results = export_inplace_volumes(project, "Geogrid", "geogrid_volumes")
for result in export_results.items:
print(f"Output volumes to {result.absolute_path}")
""" # noqa: E501 line too long

check_rmsapi_version(minimum_version="1.7")

Expand Down

0 comments on commit 88fe9f5

Please sign in to comment.