Skip to content

HydPy 6.3.0

Choose a tag to compare

@holgeralbert holgeralbert released this 04 May 05:24

We are happy to release HydPy 6.3, which contains many internal optimisations and the following user-relevant extensions.

New model features and improvements:

New general features and improvements:

  • We again improved the type hints in HydPy's source code. They help both framework developers and users who write more complex workflow scripts. One user-relevant example is that we started typing the shapes of the internally defined numpy.ndarray aliases.
  • Static type hints cannot completely express the dynamic composition of HydPy models. We therefore started providing a plugin, which gives the static type checker Mypy a clearer understanding of each model. It helps, for example, to detect mispelled parameter names early. The plugin is still incomplete and hasn't been officially documented yet. Still, you can already activate it by adding the entry plugins = hydpy.mypy_plugin.py to the mypy section of your configuration file and also adding a special hydpy.mypy_plugin section with the entry relevant_sources = X, where X points to your own library or libraries that depend on HydPy.
  • The property currentdir now supports the context manager protocol, like most "normal" options in HydPy do. Hence, by using the with statement, you can temporarily change the current directory for reading or writing files, without having to reset the previous value.
  • The property conditions does not raise (annoying) errors anymore if one passes a dictionary to it that also contains information for models that are currently not selected.