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

Patch/deprications #128

Merged
merged 7 commits into from Jun 28, 2023
Merged

Patch/deprications #128

merged 7 commits into from Jun 28, 2023

Conversation

manuGil
Copy link
Collaborator

@manuGil manuGil commented Jun 28, 2023

The imp built-in package is deprecated. Therefore, this PR substitute it for the importlib, as recommended by the Python documentation.

  • AeoLiSRunner.parse_callback() was modified to used the mportlib package and to raise an exception when an invalid callback file or function is passed by the input (aka. config file).
  • Test for the pasre_caback() were added.

Pytest reports other warnings, including the use of matrix() instead of the recomended ndarray. However, this is an issue in the numpy source code and not of AeoLiS

@Sierd
Copy link
Collaborator

Sierd commented Jun 28, 2023

@manuGil your regarding reading the callback works fine.

The callback function is made to interfer with the model parameters on a timestep to timestep basis, adding extra information if that is available. Typical use involves the inclusion of measurement data.

To test this, I have created a callback file that can be called in any aeolis input file to test its functionality.
callback_manuel.txt

State somewhere in the input file:
callback = callback_manuel.txt:test_manuel

This seems to work.

@niketagrawal niketagrawal requested a review from Sierd June 28, 2023 11:49
@manuGil manuGil added this to the Handing over milestone Jun 28, 2023
@manuGil
Copy link
Collaborator Author

manuGil commented Jun 28, 2023

@manuGil your regarding reading the callback works fine.

The callback function is made to interfer with the model parameters on a timestep to timestep basis, adding extra information if that is available. Typical use involves the inclusion of measurement data.

To test this, I have created a callback file that can be called in any aeolis input file to test its functionality. callback_manuel.txt

State somewhere in the input file: callback = callback_manuel.txt:test_manuel

This seems to work.

Thanks @Sierd It works. I included some test for this function in this RP

@manuGil
Copy link
Collaborator Author

manuGil commented Jun 28, 2023

@niketagrawal and @Sierd This should be ready to merge.

@Sierd Sierd merged commit 9334bda into main Jun 28, 2023
3 checks passed
@manuGil manuGil deleted the patch/deprications branch July 5, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants