Closed thangckt closed 1 month ago
dpdispatcher/machines/pbs.py
[warning] 218-218: dpdispatcher/machines/pbs.py#L218 Added line #L218 was not covered by testsdpdispatcher/contexts/ssh_context.py
[warning] 298-298: dpdispatcher/contexts/ssh_context.py#L298 Added line #L298 was not covered by tests --- [warning] 812-815: dpdispatcher/contexts/ssh_context.py#L812-L815 Added lines #L812 - L815 were not covered by tests --- [warning] 817-817: dpdispatcher/contexts/ssh_context.py#L817 Added line #L817 was not covered by tests --- [warning] 819-821: dpdispatcher/contexts/ssh_context.py#L819-L821 Added lines #L819 - L821 were not covered by tests --- [warning] 969-970: dpdispatcher/contexts/ssh_context.py#L969-L970 Added lines #L969 - L970 were not covered by tests --- [warning] 972-972: dpdispatcher/contexts/ssh_context.py#L972 Added line #L972 was not covered by tests --- [warning] 976-976: dpdispatcher/contexts/ssh_context.py#L976 Added line #L976 was not covered by tests --- [warning] 981-985: dpdispatcher/contexts/ssh_context.py#L981-L985 Added lines #L981 - L985 were not covered by tests --- [warning] 988-988: dpdispatcher/contexts/ssh_context.py#L988 Added line #L988 was not covered by tests
dpdispatcher/machines/pbs.py (1)
`270-270`: **LGTM!** The string formatting has been updated to f-strings, improving readability.dpdispatcher/contexts/ssh_context.py (4)
`298-302`: **LGTM!** The additional exception handling improves robustness.--- `812-821`: **LGTM! But verify the function usage in the codebase.** The code changes are approved. However, ensure that all function calls to `write_file` are tested.Tools
GitHub Check: codecov/patch
[warning] 298-298: dpdispatcher/contexts/ssh_context.py#L298 Added line #L298 was not covered by testsVerification successful
--- **LGTM! But verify the function usage in the codebase.** The code changes are approved. The function `write_file` is adequately tested and integrated into the codebase, as evidenced by its presence in multiple test files and other parts of the codebase.Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify all function calls to `write_file` are tested. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'write_file' ``` Length of output: 65 --- Script: ```shell #!/bin/bash # Description: Verify all function calls to `write_file` are tested. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 $'write_file' ``` Length of output: 18112--- `362-373`: **LGTM! But verify the function usage in the codebase.** The code changes are approved. However, ensure that all function calls to `arginfo` are tested. --- `969-989`: **LGTM! But verify the function usage in the codebase.** The code changes are approved. However, ensure that all function calls to `_get_files` are tested.Tools
GitHub Check: codecov/patch
[warning] 812-815: dpdispatcher/contexts/ssh_context.py#L812-L815 Added lines #L812 - L815 were not covered by tests --- [warning] 817-817: dpdispatcher/contexts/ssh_context.py#L817 Added line #L817 was not covered by tests --- [warning] 819-821: dpdispatcher/contexts/ssh_context.py#L819-L821 Added lines #L819 - L821 were not covered by testsVerification successful
--- **Function usage verified:** The `_get_files` function in `SSHContext` is indirectly tested through the test cases for the `SSHContext` class found in `tests/test_ssh_context.py`. This ensures that the function is covered by tests. - `tests/test_ssh_context.py`Scripts executed
The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify all function calls to `_get_files` are tested. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type python -A 5 $'_get_files' ``` Length of output: 65 --- Script: ```shell #!/bin/bash # Description: Verify all function calls to `_get_files` are tested. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type py -A 5 '_get_files' ``` Length of output: 910 --- Script: ```shell #!/bin/bash # Description: Verify that the `_get_files` function and its caller are covered by tests. # Test: Search for test cases covering `_get_files` or its caller. rg --type py '_get_files' tests/ rg --type py 'self._get_files' tests/ ``` Length of output: 70 --- Script: ```shell #!/bin/bash # Description: Verify that the `SSHContext` class or the module `ssh_context.py` is covered by tests. # Test: Search for test cases covering the `SSHContext` class or the module `ssh_context.py`. rg --type py 'SSHContext' tests/ rg --type py 'ssh_context' tests/ ``` Length of output: 2033Tools
GitHub Check: codecov/patch
[warning] 969-970: dpdispatcher/contexts/ssh_context.py#L969-L970 Added lines #L969 - L970 were not covered by tests --- [warning] 972-972: dpdispatcher/contexts/ssh_context.py#L972 Added line #L972 was not covered by tests --- [warning] 976-976: dpdispatcher/contexts/ssh_context.py#L976 Added line #L976 was not covered by tests --- [warning] 981-985: dpdispatcher/contexts/ssh_context.py#L981-L985 Added lines #L981 - L985 were not covered by tests --- [warning] 988-988: dpdispatcher/contexts/ssh_context.py#L988 Added line #L988 was not covered by tests
hi @njzjz I did not see your PR when I try to make some change BTW, this PR can fix the problem
Attention: Patch coverage is 4.76190%
with 20 lines
in your changes missing coverage. Please review.
Project coverage is 47.46%. Comparing base (
6251619
) to head (bca9728
).
Files | Patch % | Lines |
---|---|---|
dpdispatcher/contexts/ssh_context.py | 0.00% | 19 Missing :warning: |
dpdispatcher/machines/pbs.py | 50.00% | 1 Missing :warning: |
:exclamation: There is a different number of reports uploaded between BASE (6251619) and HEAD (bca9728). Click for more details.
HEAD has 1 upload less than BASE
| Flag | BASE (6251619) | HEAD (bca9728) | |------|------|------| ||15|14|
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
this PR solves problem #471 and have some improvements
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor
resources_subfields
method.Style