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

NXPY-239: Fix tests cases on Python #275

Closed
wants to merge 1 commit into from

Conversation

gitofanindya
Copy link
Collaborator

NXPY-239: Fix tests cases on Python

@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.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 14, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.05%.

Quality metrics Before After Change
Complexity 1.92 ⭐ 1.98 ⭐ 0.06 👎
Method Length 49.30 ⭐ 49.99 ⭐ 0.69 👎
Working memory 4.84 ⭐ 4.84 ⭐ 0.00
Quality 77.96% 77.91% -0.05% 👎
Other metrics Before After Change
Lines 3205 3316 111
Changed files Quality Before Quality After Quality Change
nuxeo/client.py 64.45% 🙂 64.45% 🙂 0.00%
nuxeo/documents.py 82.69% ⭐ 79.58% ⭐ -3.11% 👎
nuxeo/exceptions.py 92.49% ⭐ 93.15% ⭐ 0.66% 👍
nuxeo/models.py 92.31% ⭐ 92.31% ⭐ 0.00%
nuxeo/utils.py 66.48% 🙂 66.44% 🙂 -0.04% 👎
tests/conftest.py 85.39% ⭐ 85.37% ⭐ -0.02% 👎
tests/constants.py 96.67% ⭐ 96.17% ⭐ -0.50% 👎
tests/test_batchupload.py 66.76% 🙂 66.70% 🙂 -0.06% 👎
tests/test_log_response.py 93.67% ⭐ 93.50% ⭐ -0.17% 👎
tests/test_repository.py 83.76% ⭐ 83.59% ⭐ -0.17% 👎
tests/test_upload_s3.py 72.19% 🙂 72.02% 🙂 -0.17% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
nuxeo/client.py NuxeoClient.request 14 🙂 312 ⛔ 16 ⛔ 30.61% 😞 Try splitting into smaller methods. Extract out complex expressions
nuxeo/utils.py version_compare 16 🙂 227 ⛔ 10 😞 41.69% 😞 Try splitting into smaller methods. Extract out complex expressions
tests/test_batchupload.py test_upload_several_callbacks 5 ⭐ 314 ⛔ 47.12% 😞 Try splitting into smaller methods
tests/test_batchupload.py test_idempotent_requests 5 ⭐ 300 ⛔ 47.77% 😞 Try splitting into smaller methods
nuxeo/utils.py log_response 10 🙂 163 😞 12 😞 48.26% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Base: 96.58% // Head: 95.27% // Decreases project coverage by -1.30% ⚠️

Coverage data is based on head (2315933) compared to base (ac10600).
Patch coverage: 72.13% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #275      +/-   ##
==========================================
- Coverage   96.58%   95.27%   -1.31%     
==========================================
  Files          29       26       -3     
  Lines        1787     1652     -135     
==========================================
- Hits         1726     1574     -152     
- Misses         61       78      +17     
Flag Coverage Δ
unit 95.27% <72.13%> (-1.31%) ⬇️

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

Impacted Files Coverage Δ
nuxeo/client.py 98.87% <ø> (-0.57%) ⬇️
nuxeo/models.py 100.00% <ø> (ø)
nuxeo/exceptions.py 93.93% <66.66%> (-6.07%) ⬇️
nuxeo/documents.py 86.89% <74.41%> (-5.85%) ⬇️
nuxeo/utils.py
nuxeo/__init__.py
nuxeo/constants.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gitofanindya gitofanindya deleted the wip-NXPY-239-Fix-tests-cases-on-Python branch October 14, 2022 11:44
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

2 participants