Skip to content

Commit

Permalink
Remove old seed deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeda authored Nov 20, 2024
1 parent 4701ee9 commit 5880b9f
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/fmu/tools/sensitivities/_excel2dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
read by fmu.tools.DesignMatrix.generate
"""

import warnings
from collections import OrderedDict

import numpy as np
import openpyxl
import pandas as pd
import yaml

SEEDS_DEPRECATION_WARNING = """
The keyword "seeds" in the "general_input" sheet is changed
to "rms_seeds", and will be deprecated in a future version.
Please update your excel spreadsheet
"""


def excel2dict_design(input_filename, sheetnames=None):
"""Read excel file with input to design setup
Expand Down Expand Up @@ -45,6 +38,11 @@ def excel2dict_design(input_filename, sheetnames=None):

if str(generalinput[1]["designtype"]) == "onebyone":
returndict = _excel2dict_onebyone(input_filename, sheetnames)
elif "seeds" in generalinput[1]:
raise ValueError(
"The 'seeds' parameter has been deprecated and is no longer supported. "
"Use 'rms_seeds' instead"
)
else:
raise ValueError(
"Generation of DesignMatrix only "
Expand Down Expand Up @@ -243,13 +241,6 @@ def _excel2dict_onebyone(input_filename, sheetnames=None):
inputdict["seeds"] = None
else:
inputdict["seeds"] = generalinput[1]["rms_seeds"]
elif "seeds" in generalinput[1]:
warnings.simplefilter("always")
warnings.warn(SEEDS_DEPRECATION_WARNING, DeprecationWarning)
if str(generalinput[1]["seeds"]) == "None":
inputdict["seeds"] = None
else:
inputdict["seeds"] = generalinput[1]["seeds"]
else:
inputdict["seeds"] = None

Expand Down

0 comments on commit 5880b9f

Please sign in to comment.