-
Notifications
You must be signed in to change notification settings - Fork 15
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
Split DataContainer to a HDF and non HDF part #1299
Conversation
Basically DataContainer is renamed to DataContainerBase and the methods used for HasHDF/HDFStub are moved to a new sub class DataContainer. Docstrings are replicated where necessary.
I think this may be of even more imminent utility to @samwaseda? Will review shortly, but I peeked at the diff and it was what I intuitively expected so that should go pretty smoothly. |
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.
99% as expected and no nits or anything.
The only thing I'm not sure of is the consistent use of type(self)
for a bunch of recursion checks. Most of these seem to me like they should instead hard-code the class they're written in, so that if derived classes hold an instance of their parent class the recursion can continue uninterrupted. I'm not totally sure that's the right behaviour choice though.
At any rate, now that we explicitly have a base and child class, I think it's important to extend the tests to cover the case of child-holds-parent-instance to encode whatever behaviour decision you make.
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.
LGTM once @liamhuber s concerns are matched
If we put a sub class of DataContainer(Base) into a base class, we still want to recurse all of it, so checking against type(self) is not sufficient, since that would abort early.
@jan-janssen Sounds related to your recent developments. Would that be fixed by #1300 or #1301? |
The issue was solved by restarting the CI. We have to take a look at this and maybe increase the time out in case the issue continues to come up. |
Once this is merged, we should also release a new |
I think it makes more sense to just use the timeout directly in the tests, then this can never happen. |
@pmrv As more tests were requested, I changed the status of this pull request to |
Setting one value is not used in the older tests and would make the newer ones more complicated
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.
Nice, type checking and testing changes lgtm.
Basically DataContainer is renamed to DataContainerBase and the methods used for HasHDF/HDFStub are moved to a new sub class DataContainer. Docstrings are replicated where necessary. No API changes for users.
In preparation of https://github.com/orgs/pyiron/projects/7/views/1
@liamhuber Pulling
DataContainer
out should be just a matter of copy/paste now.