diff --git a/src/fmu/dataio/export/_decorators.py b/src/fmu/dataio/export/_decorators.py new file mode 100644 index 000000000..0cb2082aa --- /dev/null +++ b/src/fmu/dataio/export/_decorators.py @@ -0,0 +1,17 @@ +import warnings +from functools import wraps + + +def experimental(func): # type: ignore + """Decorator to mark functions as experimental.""" + + @wraps(func) + def wrapper(*args, **kwargs): # type: ignore + warnings.warn( + f"{func.__name__} is experimental and may change in future versions.", + UserWarning, + stacklevel=2, + ) + return func(*args, **kwargs) + + return wrapper diff --git a/src/fmu/dataio/export/rms/volumetrics.py b/src/fmu/dataio/export/rms/volumetrics.py index 22e5ca81f..100aed45f 100644 --- a/src/fmu/dataio/export/rms/volumetrics.py +++ b/src/fmu/dataio/export/rms/volumetrics.py @@ -13,6 +13,7 @@ from fmu.config.utilities import yaml_load from fmu.dataio._logging import null_logger +from .._decorators import experimental from ._conditional_rms_imports import import_rms_package _modules = import_rms_package() @@ -192,6 +193,7 @@ def export(self) -> dict[str, str]: return self._export_volume_table() +@experimental def export_volumetrics( project: Any, grid_name: str, @@ -229,6 +231,9 @@ def export_volumetrics( classification: Optional. Use 'internal' or 'restricted' (default). workflow: Optional. Information about the work flow; defaulted to 'rms volumetrics'. + + Note: + This function is experimental and may change in future versions. """ return _ExportVolumetricsRMS(