BentoML icon indicating copy to clipboard operation
BentoML copied to clipboard

EXPERIMENTAL[grpc]: e2e and unit tests

Open aarnphm opened this issue 3 years ago • 5 comments

What does this PR address?

This PR is a follow up on #2808 for tests related manners

This includes e2e, unit tests

This will also include a fix in our e2e folder structure where test model should not be saved under bentoml local model directory if users run tests locally.

This PR also fixes multipart handles for from_proto and to_proto.

depends on #3012

aarnphm avatar Sep 12 '22 21:09 aarnphm

Codecov Report

Merging #2984 (da8df4b) into main (b3bd5a7) will increase coverage by 8.45%. The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2984      +/-   ##
==========================================
+ Coverage   61.22%   69.68%   +8.45%     
==========================================
  Files         132      115      -17     
  Lines       11521    10766     -755     
  Branches     1924     1834      -90     
==========================================
+ Hits         7054     7502     +448     
+ Misses       4035     2826    -1209     
- Partials      432      438       +6     
Impacted Files Coverage Δ
bentoml/_internal/io_descriptors/file.py 84.69% <ø> (+21.42%) :arrow_up:
bentoml/_internal/io_descriptors/image.py 76.66% <ø> (+24.66%) :arrow_up:
bentoml/grpc/utils/__init__.py 88.88% <50.00%> (+38.20%) :arrow_up:
bentoml/models.py 77.04% <50.00%> (ø)
bentoml/_internal/server/grpc/servicer.py 61.72% <66.66%> (+61.72%) :arrow_up:
bentoml/_internal/io_descriptors/multipart.py 94.11% <100.00%> (+26.47%) :arrow_up:
bentoml/picklable_model.py 0.00% <0.00%> (-100.00%) :arrow_down:
bentoml/exceptions.py 6.25% <0.00%> (-87.50%) :arrow_down:
bentoml/_internal/utils/uri.py 68.42% <0.00%> (-10.53%) :arrow_down:
bentoml/_internal/utils/buildx.py 19.04% <0.00%> (-5.45%) :arrow_down:
... and 53 more

codecov[bot] avatar Sep 12 '22 22:09 codecov[bot]

Hello @aarnphm, Thanks for updating this PR.

There are currently no PEP 8 issues detected in this PR. Cheers! :beers:

Comment last updated at 2022-09-13 14:16:01 UTC

pep8speaks avatar Sep 13 '22 11:09 pep8speaks

@sauyon I believe this is just flaky CI runner. I couldn't figure out what is wrong.

aarnphm avatar Sep 19 '22 20:09 aarnphm

I'll take a look.

sauyon avatar Sep 19 '22 22:09 sauyon

I believe it is fine to share conftest.py here. If we want to demonstrate how to write tests for bento, we can do it under the examples folder.

aarnphm avatar Sep 20 '22 03:09 aarnphm