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
handle unavailable traits due to version differences #3273
Conversation
Potential hack for #3138
Codecov Report
@@ Coverage Diff @@
## master #3273 +/- ##
==========================================
- Coverage 64.98% 64.69% -0.30%
==========================================
Files 302 302
Lines 39947 39837 -110
Branches 5283 5286 +3
==========================================
- Hits 25961 25773 -188
- Misses 12910 12974 +64
- Partials 1076 1090 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Ah, thanks for the concrete example. I would be inclined to do it at What about 2a7452e? |
that would solve the issue of |
We should be raising exceptions at runtime if they are set by the user: nipype/nipype/interfaces/base/core.py Lines 380 to 382 in 2a7452e
nipype/nipype/interfaces/base/core.py Line 274 in 2a7452e
nipype/nipype/interfaces/base/core.py Lines 301 to 305 in 2a7452e
I think we need to do the first one with |
@effigies - sounds good. |
obj.inputs.foo = 1 | ||
obj.inputs.bar = 1 | ||
with caplog.at_level(logging.WARNING, logger="nipype.interface"): | ||
obj._check_version_requirements(obj.inputs) | ||
assert len(caplog.records) == 2 | ||
assert len(caplog.records) == 4 |
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 changed the expected warnings... I'm not sure if we want them at init?
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.
we could suppress them in init.
This is ready for review and merge, IMO. |
Summary
This turns all unavailable traits to undefined at runtime, and switches the order of checks. i'm not sure run is the best place for this yet.
Needs tests. @salma1601 and @effigies let's use this to see if we can address this.
Fixes #3138 .
List of changes proposed in this PR (pull-request)
Acknowledgment