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

Abstract network implements concrete type logic #640

Open
hellkite500 opened this issue Aug 23, 2023 · 0 comments
Open

Abstract network implements concrete type logic #640

hellkite500 opened this issue Aug 23, 2023 · 0 comments
Assignees

Comments

@hellkite500
Copy link
Member

The build_forcing_sets function in the abstract interface is implementing logic for the concrete types by switching on the configuration/input parameters provided in the config file.

This is a serious anit-pattern. The abstract functions should be @abstractmethods and the appropriate subclasses should implement overloaded functionality based on the dynamic type as needed.

This also seems to have crept in with other functions such as nex_files_to_binary. Though this function isn't a member of the abstract class, it really belongs to the hy_features/ngen utilities and probably shouldn't be in the AbstractNetwork module.
Similarly, but could possibly be argued as generic functionality, initialize_warmstate_preprocess looks like it may be encroaching as well.

@shorvath-noaa shorvath-noaa self-assigned this Nov 3, 2023
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

No branches or pull requests

2 participants