-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sources sinks converter (UNST-8528) #721
feat: sources sinks converter (UNST-8528) #721
Conversation
…es to the `TestMeteo`
…he tests.utils module
… in the `ExternalForcingConverter` class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my individual remarks. I will review still a bit more in depth too.
…ase of a polyline without z values
… salinity in the `SourceSink` class
… `SourceSink` class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MAfarrag, thanks for all the fixes. Only a few minor typing thingies left. Almost ready to merge.
…ure, and salinity in the `SourceSink` class" This reverts commit 89b55a0 Signed-off-by: Mostafa Farrag <[email protected]>
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed: this part of the source sink converter is now OK.
The tim to BC converter part will continue in a separate issue + branch (UNST-8553).
Merge Topic
Sources and Sinks Converter
SourceSink
overrides the super class method of validating input parameters (quantities) to includeinitialtracers
,tracebnd
,sedfracbnd
,initialsedfrac
, and adds these quantities dynamically through the__init__
method in the class and the class method_exclude_from_validation
INIBasedModel
is modified to allow certain keywords (quantities) to bypass the validation to allow theSourceSink
class to implement the dynamic parameters/keywords above.PolyFile
class to retrieve the x, y and z_source_sinks coordinates.convert_interpolation_data
to create a dictionaly keys for the interpolation data for all converters.ExternalForcingConverter
Converter classfrom_mdu
method to create the converter from mdu filesave
method adds the .bak after the file name and the extensionfile-name.txt
becomesfile-name.txt.bak
post_fix
as if conflict with the backup functionality.Documentation
PolyFile
class including different cases of the polyline filesDev
Testing
Data
tests
Tests in
tools/test_converters.py
TestConvertParameters
test_sample_data_file
TestConvertMeteo
test_default
TestBoundaryConverter
test_default
to run in the terminal paste the following lines individually after
pytest -vvv
Tests in
tools/test_converters_source_sink.py
TestParseTimFileForSourceSink
test_default
test_list_of_ext_quantities_tim_column_mismatch
test_no_temperature
test_no_salinity
test_no_salinity_no_temperature
TestSourceSinkConverter
test_default
test_4_5_columns_polyline
test_no_temperature_no_salinity
to run in the terminal paste the following lines individually after
pytest -vvv
Tests in
tools/test_main_converters.py
TestExtOldToNewFromMDU
test_wind_combi_uniform_curvi
to run in the terminal paste the following lines individually after
pytest -vvv
Tests in
tests/dflowfm/polyfile/test_polyline_models.py
TestGetZSourcesSinks
test_get_z_sources_sinks_no_z_values
to run in the terminal paste the following lines individually after
pytest -vvv
tests/dflowfm/polyfile/test_polyline_models.py::TestGetZSourcesSinks.test_get_z_sources_sinks_no_z_values
Rearrange tests
tests/dflowfm/extold/test_ext_forcing.py
andtests/dflowfm/extold/test_extold.py
are spin off the tests/dflowfm/test_extold.py (moved to a subdirectory and split the file for better debugging)patch
andmock
to avoid adding too many files (two files -pliz
andtim
- for each case), so the mock tricks the functions to read pair of pliz and tim files that does not have the same name.