Skip to content

Commit

Permalink
feat: Remove indentation from MDU file
Browse files Browse the repository at this point in the history
Refs: #493
  • Loading branch information
MRVermeulenDeltares committed Apr 11, 2023
1 parent dd1b522 commit 5b73359
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 329 deletions.
2 changes: 1 addition & 1 deletion hydrolib/core/dflowfm/ini/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class INISerializerConfig(SerializerConfig):
"""

section_indent: int = 0
property_indent: int = 4
property_indent: int = 0
datablock_indent: int = 8
datablock_spacing: int = 2
comment_delimiter: str = "#"
Expand Down
16 changes: 8 additions & 8 deletions tests/data/reference/crosssection/crsloc.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# written by HYDROLIB-core 0.3.1

[General]
fileVersion = 3.00
fileType = crossLoc
fileVersion = 3.00
fileType = crossLoc

[CrossSection]
id = testCrossSection # Unique cross-section location id.
branchId = branch1 # Branch on which the cross section is located.
chainage = 123.00 # Chainage on the branch (m).
shift = 0.00 # Vertical shift of the cross section definition [m]. Defined positive upwards.
definitionId = randomDefinition # Id of cross section definition.
locationtype = 1d
id = testCrossSection # Unique cross-section location id.
branchId = branch1 # Branch on which the cross section is located.
chainage = 123.00 # Chainage on the branch (m).
shift = 0.00 # Vertical shift of the cross section definition [m]. Defined positive upwards.
definitionId = randomDefinition # Id of cross section definition.
locationtype = 1d

92 changes: 46 additions & 46 deletions tests/data/reference/fm/serialize_initialFields.ini
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
# written by HYDROLIB-core 0.3.0

[General]
fileVersion = 2.00
fileType = iniField
fileVersion = 2.00
fileType = iniField

[Initial]
quantity = waterlevel
dataFile = iniwaterlevels.asc
dataFileType = arcinfo
interpolationMethod = triangulation
operand = O # How this data is combined with previous data for the same quantity (if any).
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = 2d
quantity = waterlevel
dataFile = iniwaterlevels.asc
dataFileType = arcinfo
interpolationMethod = triangulation
operand = O # How this data is combined with previous data for the same quantity (if any).
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = 2d

[Initial]
quantity = bedlevel
dataFile = inibedlevel.ini
dataFileType = 1dField
operand = O # How this data is combined with previous data for the same quantity (if any).
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = all # Target location of interpolation.
quantity = bedlevel
dataFile = inibedlevel.ini
dataFileType = 1dField
operand = O # How this data is combined with previous data for the same quantity (if any).
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = all # Target location of interpolation.

[Parameter]
quantity = frictioncoefficient
dataFile = manning.xyz
dataFileType = sample
interpolationMethod = triangulation
operand = O # How this data is combined with previous data for the same quantity (if any).
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = all # Target location of interpolation.
quantity = frictioncoefficient
dataFile = manning.xyz
dataFileType = sample
interpolationMethod = triangulation
operand = O # How this data is combined with previous data for the same quantity (if any).
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = all # Target location of interpolation.

[Parameter]
quantity = frictioncoefficient
dataFile = calibration1.pol
dataFileType = polygon
interpolationMethod = constant
operand = *
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = all # Target location of interpolation.
value = 0.03
quantity = frictioncoefficient
dataFile = calibration1.pol
dataFileType = polygon
interpolationMethod = constant
operand = *
averagingType = mean # Type of averaging, if interpolationMethod=averaging .
averagingRelSize = 1.01 # Relative search cell size for averaging.
averagingNumMin = 1 # Minimum number of points in averaging. Must be ≥ 1.
averagingPercentile = 0 # Percentile value for which data values to include in averaging. 0.0 means off.
extrapolationMethod = 0 # Option for (spatial) extrapolation.
locationType = all # Target location of interpolation.
value = 0.03

32 changes: 16 additions & 16 deletions tests/data/reference/fm/serialize_roughness.ini
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# written by HYDROLIB-core 0.3.0

[General]
fileVersion = 3.01
fileType = roughness
fileVersion = 3.01
fileType = roughness

[Global]
frictionId = Main
frictionType = Chezy
frictionValue = 45.00
frictionId = Main
frictionType = Chezy
frictionValue = 45.00

[Branch]
branchId = Channel1
frictionType = Manning
functionType = constant
numLocations = 2 # at two locations
chainage = 0.00 100.00
frictionValues = 0.20 0.30
branchId = Channel1
frictionType = Manning
functionType = constant
numLocations = 2 # at two locations
chainage = 0.00 100.00
frictionValues = 0.20 0.30

[Branch]
branchId = Channel4
frictionType = Chezy
functionType = constant
numLocations = 0 # Number of locations on branch. The default 0 implies branch uniform values.
frictionValues = 40.00
branchId = Channel4
frictionType = Chezy
functionType = constant
numLocations = 0 # Number of locations on branch. The default 0 implies branch uniform values.
frictionValues = 40.00

Loading

0 comments on commit 5b73359

Please sign in to comment.