-
Notifications
You must be signed in to change notification settings - Fork 60
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
Marking move from one component type to another one as impossible for schema evolution #622
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.
This turned out to be a slightly simpler change than what I would have imagined :).
Probably speaks for the design for once :-D |
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.
There seems to be an unrelated error that currently makes the script fail when trying to run it on the edm4hep.yaml file that triggered the original issue:
Traceback (most recent call last):
File "/home/tmadlener/work/AIDASoft/podio/python/podio_schema_evolution.py", line 476, in <module>
comparator.compare()
File "/home/tmadlener/work/AIDASoft/podio/python/podio_schema_evolution.py", line 184, in compare
self._compare_components()
File "/home/tmadlener/work/AIDASoft/podio/python/podio_schema_evolution.py", line 196, in _compare_components
[
File "/home/tmadlener/work/AIDASoft/podio/python/podio_schema_evolution.py", line 197, in <listcomp>
AddedComponent(self.datamodel_new.components[name], name)
File "/home/tmadlener/work/AIDASoft/podio/python/podio_schema_evolution.py", line 34, in __init__
super().__init__(f"'{self.component.name}' has been added")
AttributeError: 'dict' object has no attribute 'name'
The issue is here:
podio/python/podio_schema_evolution.py
Line 34 in ab6b2a4
super().__init__(f"'{self.component.name}' has been added") |
it should be self.name
instead of self.component.name
to make things work again. With that fix the script detects invalid schema changes in the EDM4hep yaml file.
Can we add a simple test that at least runs the script on the example datamodel(s) that we have?
Surprised we didn't have. This PR or a new one? |
Yeah, I also thought we had one, but at least I couldn't find one. Or if we have one at least it didn't trigger this issue. I would prefer a new PR. |
We only had for the C++ part it seems. OK. new ticket, new PR |
PR to fix the bug in the schema evolution generation: #627 |
other PR merged now |
Can you rebase this quickly to pick up those changes? |
obviously that fails now ;-) need to change the test definition |
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.
Works for me. Ideally we could condense down the test for a failing schema evolution a bit rather than having the third copy of the datamodel effectively, but we can also postpone that to after v1.0
for post v1 we could do that a bit separated without a file, but in pure python tests. I will merge now. |
BEGINRELEASENOTES
ENDRELEASENOTES
This addresses #563