-
Notifications
You must be signed in to change notification settings - Fork 39
Add init file to opm keyword directory #554
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
Conversation
|
Questions regarding the
|
yes! |
Have created a separate pr for fixing up the opmkeywords. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an __init__.py file to the opmkeywords directory and modernizes resource loading by replacing Path(__file__).parent with importlib.resources.files(). This change addresses packaging issues where the opmkeywords folder was being treated as a namespace package, which can cause problems with komodoenv and editable installs.
- Replace direct file path construction with
importlib.resourcesfor accessing package data files - Update resource loading for both OPM keywords and SVG color names
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
e4aa74f to
65f3cdb
Compare
alifbe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
This avoids the opmkeyword folder being treated as a namespace package which does not mix very well with komodoenv and editable installs...Issue still persists, but I still think this is more correct.