Skip to content
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

Parameters Converter #718

Open
wants to merge 19 commits into
base: feature/unst-8490-621_extforce_converter-boundary-condition
Choose a base branch
from

Conversation

MAfarrag
Copy link

@MAfarrag MAfarrag commented Dec 5, 2024

Parameter Quantity Converter

  • Add old parameter quantities in the extold.ExtOldParametersQuantity
  • Add converter for the parameter quantities in the main_converter to the

New Features

  • The main_converter.py now can convert the boundary condition quantities.

Design

  • Functions/method better have one return statement at the end of the function for readability (ext.models.Boundary.forcing).
  • Test directory better be a mirror of the modules in the package directory.
  • merge base_converter.py, converter_factory.py in converters.py.
  • merge tools.ext_old_to_new.enum_converters.py to tools.ext_old_to_new.utils.
  • the __contains__ function is now a method contains in the ConverterFactory class.

Formating and Styling

None

Testing

Data

None

New Tests

  • tests/dflowfm/test_extold.py::test_ext_old_parameter_quantity
  • tests\tools\test_converters.py::TestConvertParameters::test_sample_data_file
  • tests\tools\test_converters.py::TestConvertMeteo::test_default

Old errors

  • Multiple uses of mutable objects like lists [] as a default values was converted to Field(default_factory=list)

@MAfarrag MAfarrag changed the base branch from main to feature/621_extforce_converter December 5, 2024 11:49
@MAfarrag MAfarrag changed the base branch from feature/621_extforce_converter to feature/unst-8490-621_extforce_converter-boundary-condition December 11, 2024 11:11
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant