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

NXDRIVE-2860: Code Coverage (Sourcery refactored) #4356

Open
wants to merge 1 commit into
base: wip-NXDRIVE-2860-Code-Coverage
Choose a base branch
from

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Nov 23, 2023

Pull Request #4354 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the wip-NXDRIVE-2860-Code-Coverage branch, then run:

git fetch origin sourcery/wip-NXDRIVE-2860-Code-Coverage
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from gitofanindya November 23, 2023 11:09
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sourcery AI seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sourcery AI seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch 2 times, most recently from a14c340 to a7f5b21 Compare November 23, 2023 11:10
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (6acd95b) 53.18% compared to head (397a794) 52.95%.

Files Patch % Lines
nxdrive/engine/workers.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           wip-NXDRIVE-2860-Code-Coverage    #4356      +/-   ##
==================================================================
- Coverage                           53.18%   52.95%   -0.24%     
==================================================================
  Files                                  94       94              
  Lines                               15683    15682       -1     
==================================================================
- Hits                                 8341     8304      -37     
- Misses                               7342     7378      +36     
Flag Coverage Δ
functional 44.65% <16.66%> (-0.22%) ⬇️
integration 2.06% <0.00%> (+<0.01%) ⬆️
unit 37.42% <16.66%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch 5 times, most recently from 7298f5d to c46c79b Compare December 8, 2023 05:44
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch 7 times, most recently from 0166544 to c2f689b Compare December 13, 2023 11:04
@gitofanindya gitofanindya force-pushed the wip-NXDRIVE-2860-Code-Coverage branch from cc9967f to 5de2ac2 Compare December 13, 2023 11:20
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch from c2f689b to e6bf9dd Compare December 13, 2023 11:20
@gitofanindya gitofanindya force-pushed the wip-NXDRIVE-2860-Code-Coverage branch from 5de2ac2 to 89902b3 Compare December 13, 2023 11:30
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch from e6bf9dd to 22092a6 Compare December 13, 2023 11:31
@gitofanindya gitofanindya force-pushed the wip-NXDRIVE-2860-Code-Coverage branch from 89902b3 to fcd87de Compare December 13, 2023 11:44
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch from 22092a6 to c654de0 Compare December 13, 2023 11:44
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch from c654de0 to 69dd2ac Compare December 27, 2023 04:26
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch 5 times, most recently from 90e89a6 to 91c58c6 Compare January 9, 2024 06:26
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch 5 times, most recently from e3eba68 to 72d7aae Compare January 16, 2024 04:56
@sourcery-ai sourcery-ai bot force-pushed the sourcery/wip-NXDRIVE-2860-Code-Coverage branch from 72d7aae to 397a794 Compare January 16, 2024 06:28
return bool(status[0] == "ok")
return status[0] == "ok"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function is_healthy refactored with the following changes:

Comment on lines -196 to +200
try:
self._execute()
except ThreadInterrupt:
log.debug("Thread INTERRUPT")
except Exception:
log.exception("Thread EXCEPTION")
self._execute()
except ThreadInterrupt:
log.debug("Thread INTERRUPT")
except Exception:
log.exception("Thread EXCEPTION")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Worker.run refactored with the following changes:

input_obj = "doc:" + doc_path
input_obj = f"doc:{doc_path}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TwoUsersTest._set_read_permission refactored with the following changes:

input_obj = "doc:" + doc_path
input_obj = f"doc:{doc_path}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TwoUsersTest.set_readonly refactored with the following changes:

assert remote.get_info("/" + filename).name == filename
assert remote.get_info(f"/{filename}").name == filename
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TestEncoding.test_name_normalization refactored with the following changes:

fs_item_id = FS_ITEM_ID_PREFIX + "fakeId"
fs_item_id = f"{FS_ITEM_ID_PREFIX}fakeId"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TestRemoteFileSystemClient.test_get_fs_info refactored with the following changes:

Comment on lines -700 to -703
partial_descendants = scroll_res["descendants"]
if not partial_descendants:
if partial_descendants := scroll_res["descendants"]:
descendants.extend(partial_descendants)
else:
break
descendants.extend(partial_descendants)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TestRemoteFileSystemClient.test_scroll_descendants refactored with the following changes:

fs_item_id = FS_ITEM_ID_PREFIX + "fakeId"
fs_item_id = f"{FS_ITEM_ID_PREFIX}fakeId"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TestRemoteFileSystemClient.test_exists refactored with the following changes:

fs_item_id = FS_ITEM_ID_PREFIX + "fakeId"
fs_item_id = f"{FS_ITEM_ID_PREFIX}fakeId"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TestRemoteFileSystemClient.test_get_fs_item refactored with the following changes:

total = len(self.make_server_tree())
# Add the workspace folder + the root
total += 2
total = len(self.make_server_tree()) + 2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function TestWatchers.test_remote_scan refactored with the following changes:

This removes the following comments ( why? ):

# Add the workspace folder + the root

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