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

Naming clash due to duplicate REGULAR objects in swan.components inpgrid and cgrid #114

Open
pbranson opened this issue Sep 12, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@pbranson
Copy link
Member

When working with Alson on a SWAN model setup we started getting validation errors on our previously working CGRID because we had combined imports to the top of the module/notebook so had inadvertently ended up with:

from rompy.swan.components.cgrid import REGULAR
.
.
.
from rompy.swan.components.inpgrid import REGULAR

Propose that we should maybe rename them to INPREGULAR and CGRIDREGULAR given that their definition string has different parameters in SWAN also. Thoughts @rafa-guedes?

@pbranson pbranson added the question Further information is requested label Sep 12, 2024
@pbranson
Copy link
Member Author

cc @alsonathif

@rafa-guedes
Copy link
Collaborator

rafa-guedes commented Sep 12, 2024

@pbranson yes I think you are right - It is possible to import ... as but I agree we could avoid this namespace issue altogether by renaming them as you suggest. I can look into it

@pbranson
Copy link
Member Author

Thanks @rafa-guedes, we added the as to work around it also, also narrowing the scope of imports is also option.

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

No branches or pull requests

2 participants