Skip to content

Commit

Permalink
DEP: Add deprecation warning to generate_aggregation_metadata()
Browse files Browse the repository at this point in the history
  • Loading branch information
tnatt committed Oct 2, 2024
1 parent 41b7b0f commit 8473e6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/dataio_3_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,6 @@ Changes to input arguments
Changes to method arguments
- The ``skip_null`` argument to ``generate_metadata()`` is deprecated. It is redundant and can be removed.

Deprecated methods
- The ``generate_aggregation_metadata()`` method is deprecated. Replace it with the identical
``generate_metadata()`` method instead.
5 changes: 5 additions & 0 deletions src/fmu/dataio/aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ def generate_aggregation_metadata(
**kwargs: object,
) -> dict:
"""Alias method name, see ``generate_metadata``"""
warnings.warn(
"This method is deprecated and will be removed in the future. "
"Use the 'generate_metadata()' method directly instead.",
FutureWarning,
)
return self.generate_metadata(
obj, compute_md5=compute_md5, skip_null=skip_null, **kwargs
)
Expand Down

0 comments on commit 8473e6d

Please sign in to comment.