Skip to content

Exclude unit tests code from coverage #779

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

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

akram
Copy link
Contributor

@akram akram commented Dec 12, 2024

Issue link

Unit tests are themselves counted in coverage

What changes have been made

This PR excludes them from the count

Verification steps

coverage run --omit="src/**/test_*.py,src/codeflare_sdk/common/utils/unit_test_support.py" -m pytest
(app-root) (app-root) coverage report -m
Name                                                              Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------------------
src/codeflare_sdk/__init__.py                                        11      2    82%   36-37
src/codeflare_sdk/common/__init__.py                                  1      0   100%
src/codeflare_sdk/common/kubernetes_cluster/__init__.py               2      0   100%
src/codeflare_sdk/common/kubernetes_cluster/auth.py                  93      7    92%   66, 72, 124-125, 214, 224, 241
src/codeflare_sdk/common/kubernetes_cluster/kube_api_helpers.py       3      0   100%
src/codeflare_sdk/common/kueue/__init__.py                            1      0   100%
src/codeflare_sdk/common/kueue/kueue.py                              48     23    52%   39-60, 128-143, 165-174
src/codeflare_sdk/common/utils/__init__.py                            0      0   100%
src/codeflare_sdk/common/utils/demos.py                               8      3    62%   26-31
src/codeflare_sdk/common/utils/generate_cert.py                      53      8    85%   111-123
src/codeflare_sdk/common/widgets/__init__.py                          1      0   100%
src/codeflare_sdk/common/widgets/widgets.py                         196      0   100%
src/codeflare_sdk/ray/__init__.py                                     3      0   100%
src/codeflare_sdk/ray/appwrapper/__init__.py                          2      0   100%
src/codeflare_sdk/ray/appwrapper/awload.py                           42      4    90%   73-74, 98-99
src/codeflare_sdk/ray/appwrapper/status.py                           15      0   100%
src/codeflare_sdk/ray/client/__init__.py                              1      0   100%
src/codeflare_sdk/ray/client/ray_jobs.py                             32      0   100%
src/codeflare_sdk/ray/cluster/__init__.py                             2      0   100%
src/codeflare_sdk/ray/cluster/build_ray_cluster.py                  168      2    99%   420, 534
src/codeflare_sdk/ray/cluster/cluster.py                            378    184    51%   67-76, 85-87, 96, 98, 105-107, 125, 128, 134, 144, 148, 150-153, 170-173, 188-198, 208, 217-219, 233-237, 239-256, 259-261, 275, 277, 283-284, 288-291, 325-344, 352, 356, 358-368, 389-400, 405, 425, 429-446, 452-460, 466-483, 506-508, 514-516, 520, 549-550, 613, 623-639, 690, 694-695, 703, 747, 761-762, 820-829, 839-848, 850-881, 900-905, 907-908, 919-920, 924, 927, 941-944, 1000, 1018-1029
src/codeflare_sdk/ray/cluster/config.py                             136      9    93%   132, 158, 169, 179, 188, 195, 200, 205, 272
src/codeflare_sdk/ray/cluster/pretty_print.py                       113      3    97%   77, 87-88
src/codeflare_sdk/ray/cluster/status.py                              35      0   100%
-----------------------------------------------------------------------------------------------
TOTAL

Checks

  • [ x] I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.07%. Comparing base (be9763a) to head (518af43).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #779   +/-   ##
=======================================
  Coverage   93.07%   93.07%           
=======================================
  Files          36       36           
  Lines        2410     2410           
=======================================
  Hits         2243     2243           
  Misses        167      167           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Bobbins228 Bobbins228 left a comment

Choose a reason for hiding this comment

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

Good catch Akram
/lgtm /approve

Copy link
Contributor

@Bobbins228 Bobbins228 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2024
Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobbins228

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 3e7a960 into project-codeflare:main Dec 17, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants