Skip to content

Comments

add Numpy + PIL IMAGE return type, ability to specify response mime-type#13

Open
baturayo wants to merge 16 commits intomasterfrom
image_return_mimetype
Open

add Numpy + PIL IMAGE return type, ability to specify response mime-type#13
baturayo wants to merge 16 commits intomasterfrom
image_return_mimetype

Conversation

@baturayo
Copy link
Contributor

@baturayo baturayo commented Nov 12, 2020

  1. Following return types for exposed python function will be accepted;
  • PIL.Image
  • numpy.ndarray
  • numpy.matrix
  • int8, int 16, int32, int 64
  • uint8, unit16, uint32, uint64
  • float16, float32, float64
  1. Add the option to manually select response mime type by using # @dploy response_mime_type annotation.

  2. Fix ScriptImportError & UnsupportedEntrypoint, return more meaningful errors instead of raising

dploy_kickstart.errors.UnsupportedEntrypoint: (UnsupportedEntrypoint(...), UnsupportedEntrypoint(...))

or

dploy_kickstart.errors.ScriptImportError: (ScriptImportError(...), ScriptImportError(...))
  1. Add additional unit tests to increase coverage for transform.py, error.py and deps.py

@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #13 (a68eef2) into master (415a57b) will increase coverage by 1.46%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   96.47%   97.94%   +1.46%     
==========================================
  Files           8        8              
  Lines         312      340      +28     
==========================================
+ Hits          301      333      +32     
+ Misses         11        7       -4     
Impacted Files Coverage Δ
dploy_kickstart/errors.py 96.15% <ø> (+6.86%) ⬆️
dploy_kickstart/server.py 100.00% <ø> (ø)
dploy_kickstart/annotations.py 98.75% <100.00%> (ø)
dploy_kickstart/transformers.py 100.00% <100.00%> (ø)
dploy_kickstart/wrapper.py 97.14% <100.00%> (ø)
dploy_kickstart/deps.py 96.29% <0.00%> (+7.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 415a57b...a68eef2. Read the comment docs.

@baturayo baturayo changed the title add PIL IMAGE return type add Numpy + PIL IMAGE return type, option to manually change content-type Nov 23, 2020
@baturayo baturayo requested a review from bart6114 November 23, 2020 16:09
@baturayo baturayo changed the title add Numpy + PIL IMAGE return type, option to manually change content-type add Numpy + PIL IMAGE return type, ability to specify response mime-type Nov 25, 2020
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.

1 participant