Index: DamClients/DamPythonInterface/trunk/src/tests/test_output/test_full_output.xml
===================================================================
diff -u -r3491 -r3499
--- DamClients/DamPythonInterface/trunk/src/tests/test_output/test_full_output.xml (.../test_full_output.xml) (revision 3491)
+++ DamClients/DamPythonInterface/trunk/src/tests/test_output/test_full_output.xml (.../test_full_output.xml) (revision 3499)
@@ -40,8 +40,4 @@
-
-
-
-
Index: DamClients/DamPythonInterface/trunk/src/tests/test_soil.py
===================================================================
diff -u -r3487 -r3499
--- DamClients/DamPythonInterface/trunk/src/tests/test_soil.py (.../test_soil.py) (revision 3487)
+++ DamClients/DamPythonInterface/trunk/src/tests/test_soil.py (.../test_soil.py) (revision 3499)
@@ -36,7 +36,6 @@
Name="new soil",
AbovePhreaticLevel=18,
BelowPhreaticLevel=20,
- IsAquifer=True,
)
# check expectations
assert test_soil.Name == "new soil"
@@ -63,7 +62,6 @@
RRatio=1,
StrengthIncreaseExponent=0.7,
RatioCuPc=0.22,
- IsAquifer=True,
)
# run test
root = test_soil.serialize_soil()
@@ -81,27 +79,3 @@
# Line by line comparison
for output_file, test_file in zip(open(xml_output), open(xml_test_data)):
assert output_file.strip() == test_file.strip()
-
- @pytest.mark.unittest
- def test_serialize_aquifer_soil(self):
- # initialize the soil model class
- test_soil = Soil(
- Name="Aquifer soil",
- IsAquifer=True,
- )
- # run test
- root = test_soil.serialize_aquifer_soil()
- # test output
- xml_output = Path(
- TestUtils.get_output_test_data_dir(""), "test_serialize_aquifer_soil.xml"
- )
- tree = etree.ElementTree(root)
- tree.write(str(xml_output), pretty_print=True)
- # get template file
- xml_test_data = Path(
- TestUtils.get_test_data_dir("", "test_data"),
- "test_serialize_aquifer_soil.xml",
- )
- # Line by line comparison
- for output_file, test_file in zip(open(xml_output), open(xml_test_data)):
- assert output_file.strip() == test_file.strip()
Index: DamClients/DamPythonInterface/trunk/src/dampythoninterface/input.py
===================================================================
diff -u -r3496 -r3499
--- DamClients/DamPythonInterface/trunk/src/dampythoninterface/input.py (.../input.py) (revision 3496)
+++ DamClients/DamPythonInterface/trunk/src/dampythoninterface/input.py (.../input.py) (revision 3499)
@@ -88,10 +88,8 @@
input_root.append(SurfaceLines_root)
# create soils element
soils_root = et.Element("Soils")
- soils_aquifer = et.Element("AquiferSoils")
for soil in self.Soils:
soils_root.append(soil.serialize_soil())
- soils_aquifer.append(soil.serialize_aquifer_soil())
input_root.append(soils_root)
# add soil profiles to the xml file
soilprofiles_root = et.Element("SoilProfiles1D")
@@ -105,8 +103,6 @@
input_root.append(segments_root)
# add stability parameters to input root
input_root.append(self.StabilityParameters.serialize())
- # append soil aquifers
- input_root.append(soils_aquifer)
# Construct the whole input tree
tree = et.ElementTree(input_root)
tree.write(str(xml_file), pretty_print=True)
Index: DamClients/DamPythonInterface/trunk/src/dampythoninterface/soil.py
===================================================================
diff -u -r3492 -r3499
--- DamClients/DamPythonInterface/trunk/src/dampythoninterface/soil.py (.../soil.py) (revision 3492)
+++ DamClients/DamPythonInterface/trunk/src/dampythoninterface/soil.py (.../soil.py) (revision 3499)
@@ -93,7 +93,6 @@
RRatio: Optional[float] = None
StrengthIncreaseExponent: Optional[float] = None
RatioCuPc: Optional[float] = None
- IsAquifer: bool = False
def serialize_soil(self) -> et.Element:
"""
@@ -102,25 +101,12 @@
soil_root = et.Element("Soil")
dictionary_of_values = self.dict()
for field, value in dictionary_of_values.items():
- if not (field == "IsAquifer"):
- if value is None:
- soil_root.set(field, str(1))
- elif isinstance(value, Enum):
- soil_root.set(field, value.value)
- elif isinstance(value, bool):
- soil_root.set(field, str(value).lower())
- else:
- soil_root.set(field, str(value))
+ if value is None:
+ soil_root.set(field, str(1))
+ elif isinstance(value, Enum):
+ soil_root.set(field, value.value)
+ elif isinstance(value, bool):
+ soil_root.set(field, str(value).lower())
+ else:
+ soil_root.set(field, str(value))
return soil_root
-
- def serialize_aquifer_soil(self) -> et.Element:
- """
- Function that serializes the AquiferSoil part of the class.
- """
- aquifer_soil_root = et.Element("AquiferSoil")
- dictionary_of_values = self.dict()
- aquifer_soil_root.set("Soilname", dictionary_of_values.get("Name"))
- aquifer_soil_root.set(
- "IsAquifer", str(dictionary_of_values.get("IsAquifer")).lower()
- )
- return aquifer_soil_root
Fisheye: Tag 3499 refers to a dead (removed) revision in file `DamClients/DamPythonInterface/trunk/src/tests/test_data/test_serialize_aquifer_soil.xml'.
Fisheye: No comparison available. Pass `N' to diff?