Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Move example into docstring #989

Merged
merged 1 commit into from
Feb 10, 2025
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
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