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

Fix model-archiver to fail if extra files are missing #2212

Merged
merged 7 commits into from
May 30, 2023

Conversation

mreso
Copy link
Collaborator

@mreso mreso commented Apr 1, 2023

Description

This PR lets the model-archiver fail if a file given in the extra-file list does not exist.
Additionally, it refactors the integration test to not start a subprocess to determine code coverage.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Feature/Issue validation/testing

Please describe the Unit or Integration tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

  • pytest model_archiver/tests/integ_tests/
=============================================================================== test session starts ===============================================================================
platform linux -- Python 3.9.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/ubuntu/serve/model-archiver
plugins: mock-3.10.0, cov-4.0.0
collected 3 items

model_archiver/tests/integ_tests/test_integration_model_archiver.py ...                                                                                                     [100%]

================================================================================ 3 passed in 0.09s ================================================================================
  • pytest model_archiver/tests/unit_tests/
=============================================================================== test session starts ===============================================================================
platform linux -- Python 3.9.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/ubuntu/serve/model-archiver
plugins: mock-3.10.0, cov-4.0.0
collected 28 items

model_archiver/tests/unit_tests/test_model_packaging.py ....                                                                                                                [ 14%]
model_archiver/tests/unit_tests/test_model_packaging_utils.py .......................                                                                                       [ 96%]
model_archiver/tests/unit_tests/test_version.py .                                                                                                                           [100%]

=============================================================================== 28 passed in 0.10s ================================================================================

Checklist:

  • Did you have fun?
  • Have you added tests that prove your fix is effective or that this feature works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

@codecov
Copy link

codecov bot commented Apr 1, 2023

Codecov Report

Merging #2212 (341ad86) into master (ffa6847) will increase coverage by 1.45%.
The diff coverage is 100.00%.

❗ Current head 341ad86 differs from pull request most recent head 5a5c7ab. Consider uploading reports for the commit 5a5c7ab to get more accurate results

@@            Coverage Diff             @@
##           master    #2212      +/-   ##
==========================================
+ Coverage   70.69%   72.15%   +1.45%     
==========================================
  Files          78       78              
  Lines        3638     3641       +3     
  Branches       57       58       +1     
==========================================
+ Hits         2572     2627      +55     
+ Misses       1063     1010      -53     
- Partials        3        4       +1     
Impacted Files Coverage Δ
...l-archiver/model_archiver/model_packaging_utils.py 92.30% <100.00%> (+32.17%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mreso mreso marked this pull request as ready for review April 2, 2023 04:34
@mreso mreso changed the title [WIP] Fix model-archiver to fail if extra files are missing Fix model-archiver to fail if extra files are missing Apr 2, 2023
@mreso mreso merged commit c816465 into master May 30, 2023
9 checks passed
@mreso mreso deleted the fix/missing_extra_files branch May 30, 2023 20:22
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

3 participants