-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add missing attributes for python package #363
Conversation
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.
Do we have to do a similar thing to podio?
No, podio is fine. In podio we use in wrappers or bring elements from the cppyy created module to the Here we instruct the system to put under the name EDM4hep/python/edm4hep/__init__.py Line 31 in d7a209f
|
test/test_module.py
Outdated
expected_origin = str(Path(__file__).parent.parent / "python" / "edm4hep" / "__init__.py") | ||
assert edm4hep.__file__ == expected_origin | ||
# __path__ | ||
expected_path = [str(Path(expected_origin).parent)] | ||
assert edm4hep.__path__ == expected_path |
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.
These will obviously be different after installation, but I don't see an easy way to check them without doing an install first. Anyhow, there is no reason to expect this to not work after installation, unless I am missing something?
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.
I didn't think about it. I think it should be possible to find package without importing it and then check if the attributes' values are the same on the imported module. That should work for testing both in build environment and after install
But I don't expect that there should be any issues after installation
ee111fd
to
d246c46
Compare
BEGINRELEASENOTES
ENDRELEASENOTES
The package attributes from the import system were missing since the
edm4hep
is rebound to theedm4hep
submodule created with ROOT/cppyy. Similarly__version__
was set in the__init__.py
but then lostHaving missing attributes shouldn't be a problem as we didn't experience it yet. But I think there was an intention to have
edm4hep.__version__
availableImport system docs