-
Notifications
You must be signed in to change notification settings - Fork 8
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
[WIP] Wrap extension #38
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_count = len(func_args[3]) | ||
|
||
for val in range(len(func_args[3])): | ||
default_dict[func_args[0][(arg_count-default_count+val)]] = \ |
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.
remove \
1c7332f
to
2665627
Compare
d575e6c
to
77ef09c
Compare
Ended up only including the basic tests for the function. I have been trying to come up with a test case that triggers the ValueError starting on line 500, however, I have not been able to come up with one thus far. If necessary this can be revisited.
- moved tests to be in canonical location - added skip for windows-only tests
Use generator tests where possible
massive bad-form commit, but there is too much intertwined code to split up. - moved to providing single function `_normalize_type` to handle all of the type parsing - handle normalization via lots of regular expressions - handle of / or recursively - module-level precedence ordering
A bug remains in find_ring_center_acorr_iD that prevents auto_wrapping. This import statement has been commented out until the input/output types can be converted, or added to the wrap_lib library of dtypes.
Function is called _default_vals. This fuction will be used by the function define_input_ports when functions are being autowrapped into VisTrails objects.
These commented functions are temporary removals that should be fully functional after default value assignment is merged into master
- further simplified type handling - extended int and array RE to hit more cases - improved code readibility
- tweaks to indentation - simplified logic - re-organized functions/definitions a bit
ufuncs (np.sin, np.log, ...) are not actually functions, they are instances of the ufunc class which are callable. They do not support unpacking dictionaries in to keywords so we need to collect (in the correct order) the args and unpack them from a tuple.
Allow trailing text so linspace works (which has an optional!) return value.
inspect seems to not work on 'builtins' which is what a fair number of numpy function (ex np.zeros) report as.
skip, not raise exception as numpy _does_ have optional output values (!?!)
- they can change (as interp did in np 1.10)
To quote the docstring from basic_modules.Tuple: """Tuple represents a tuple of values. Tuple might not be well integrated with the rest of VisTrails, so don't use it unless you know what you're doing.""" It also is not a constant descriptor which means attepmpting to set a default value for it will fail with a cryptic error out of the VT stack.
- simplified function - changed function name - changed name of return value to not shadow collection.defaultdict - added tests
Could not figure out any condations under which TypeError would actually be raised
- moved test function into dummy module
I was able to get the numpy and scipy wrapping in Vistrails/NSLS2 and I checked few of those functions too. No issue with them. @giltis If there is no issue you can merge this PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.