enable passing strings to Transformers #103

merged 1 commit into from Jan 3, 2017


None yet

2 participants

tyarkoni commented Jan 3, 2017

This is a small but useful tweak that allows passing of filenames directly to Transformers. I.e., in addition to this:

img = ImageStim('my_image.jpg')
ext = MyExtractor()
result = ext.extract(img)

...a user can now do this:

ext = MyExtractor()
result = ext.extract('my_image.jpg')

This leverages the stimulus.load_stims function, which already does intelligent loading of Stims from filename strings based on the MIME type (via python-magic).

@tyarkoni enable passing strings to Extractors
coveralls commented Jan 3, 2017 edited

Coverage Status

Coverage increased (+0.09%) to 78.261% when pulling ddb7fcd on autoload-stims into 5e2606c on master.

@tyarkoni tyarkoni merged commit fbd9ff2 into master Jan 3, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
coverage/coveralls Coverage increased (+0.09%) to 78.261%
@tyarkoni tyarkoni deleted the autoload-stims branch Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment