forked from equinor/fmu-dataio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: add experimental decorator on export_volumetrics()
- Loading branch information
1 parent
17cabe2
commit 71d9bb3
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters