Skip to content
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 60 commits into from
Jan 8, 2015
Merged

[WIP] Wrap extension #38

merged 60 commits into from
Jan 8, 2015

Conversation

tacaswell
Copy link
Member

No description provided.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) when pulling fa7290f on tacaswell:wrap_extension into 1ace9f3 on Nikea:master.

default_count = len(func_args[3])

for val in range(len(func_args[3])):
default_dict[func_args[0][(arg_count-default_count+val)]] = \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove \

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.98%) when pulling 2665627 on tacaswell:wrap_extension into 1ace9f3 on Nikea:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.98%) when pulling 2665627 on tacaswell:wrap_extension into 1ace9f3 on Nikea:master.

Gabriel Iltis and others added 24 commits December 26, 2014 20:47
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 (!?!)
@coveralls
Copy link

Coverage Status

Coverage increased (+1.93%) when pulling 9b47371 on tacaswell:wrap_extension into 35f5695 on Nikea:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.11%) when pulling 4f079de on tacaswell:wrap_extension into 35f5695 on Nikea:master.

 - 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
@coveralls
Copy link

Coverage Status

Coverage increased (+4.69%) when pulling 1d7f9c8 on tacaswell:wrap_extension into 35f5695 on Nikea:master.

 - moved test function into dummy module
@coveralls
Copy link

Coverage Status

Coverage increased (+8.41%) when pulling d07c615 on tacaswell:wrap_extension into 35f5695 on Nikea:master.

@sameera2004
Copy link

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

giltis pushed a commit that referenced this pull request Jan 8, 2015
@giltis giltis merged commit 55ce6eb into Nikea:master Jan 8, 2015
@tacaswell tacaswell deleted the wrap_extension branch January 8, 2015 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants