Skip to content

Conversation

@larsevj
Copy link
Collaborator

@larsevj larsevj commented Sep 17, 2025

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.

@larsevj
Copy link
Collaborator Author

larsevj commented Sep 17, 2025

Questions regarding the runmetoupdate.sh script in opmkeywords:

  • This does currently not work since the paths have changed in opm-common, should this be fixed? Does the schemas need to be updated, new keywords added?
  • Should this script at best be moved to another place? Feels unnatural to include in the package.

@berland
Copy link
Collaborator

berland commented Sep 17, 2025

  • This does currently not work since the paths have changed in opm-common, should this be fixed?

yes!

@larsevj
Copy link
Collaborator Author

larsevj commented Sep 18, 2025

  • This does currently not work since the paths have changed in opm-common, should this be fixed?

yes!

Have created a separate pr for fixing up the opmkeywords.

@larsevj larsevj requested review from alifbe and rnyb September 19, 2025 08:36
@rnyb rnyb requested a review from Copilot September 19, 2025 13:55
Copy link

Copilot AI left a 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.resources for 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.

@larsevj larsevj force-pushed the add_init_file_to_opm_keyword branch from e4aa74f to 65f3cdb Compare September 19, 2025 14:05
Copy link
Collaborator

@alifbe alifbe left a 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 👍

@larsevj larsevj merged commit c5f74f5 into master Sep 22, 2025
7 checks passed
@larsevj larsevj deleted the add_init_file_to_opm_keyword branch October 7, 2025 08:55
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

Successfully merging this pull request may close these issues.

4 participants