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-2738: Implement database downgrade #3303

Merged
merged 1 commit into from Dec 3, 2021

Conversation

rom1win
Copy link
Contributor

@rom1win rom1win commented Dec 3, 2021

No description provided.

@nuxeojenkins
Copy link
Contributor

View issue in JIRA: NXDRIVE-2738: Implement database downgrade

@rom1win rom1win force-pushed the wip-NXDRIVE-2738-implement-database-downgrade branch from 1a86de7 to a3e4683 Compare December 3, 2021 16:56
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 3, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.52 ⭐ 7.53 ⭐ 0.01 👎
Method Length 50.43 ⭐ 50.67 ⭐ 0.24 👎
Working memory 8.34 🙂 8.33 🙂 -0.01 👍
Quality 71.24% 🙂 71.19% 🙂 -0.05% 👎
Other metrics Before After Change
Lines 3824 3854 30
Changed files Quality Before Quality After Quality Change
nxdrive/utils.py 73.04% 🙂 73.04% 🙂 0.00%
nxdrive/dao/init.py 86.85% ⭐ 86.02% ⭐ -0.83% 👎
nxdrive/dao/engine.py 68.78% 🙂 68.75% 🙂 -0.03% 👎
nxdrive/dao/manager.py 88.76% ⭐ 87.78% ⭐ -0.98% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
nxdrive/dao/engine.py EngineDAO._migrate_db_old 47 ⛔ 842 ⛔ 17 ⛔ 10.18% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
nxdrive/dao/engine.py EngineDAO.update_remote_state 24 😞 307 ⛔ 33 ⛔ 16.57% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
nxdrive/utils.py concat_all_certificates 14 🙂 202 😞 14 😞 38.41% 😞 Try splitting into smaller methods. Extract out complex expressions
nxdrive/dao/engine.py EngineDAO.synchronize_state 9 🙂 201 😞 12 😞 45.91% 😞 Try splitting into smaller methods. Extract out complex expressions
nxdrive/utils.py test_url 10 🙂 152 😞 11 😞 51.10% 🙂 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 Dec 3, 2021

Codecov Report

Merging #3303 (a3e4683) into master (824ce33) will increase coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3303      +/-   ##
==========================================
+ Coverage   45.07%   45.09%   +0.01%     
==========================================
  Files          92       92              
  Lines       15415    15422       +7     
==========================================
+ Hits         6949     6954       +5     
- Misses       8466     8468       +2     
Flag Coverage Δ
functional 35.68% <83.33%> (+0.01%) ⬆️
integration ?
unit 35.51% <83.33%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
nxdrive/utils.py 87.45% <ø> (ø)
nxdrive/dao/engine.py 60.00% <80.00%> (+0.02%) ⬆️
nxdrive/dao/manager.py 81.52% <80.00%> (-0.51%) ⬇️
nxdrive/__init__.py 100.00% <100.00%> (ø)
nxdrive/dao/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b817526...a3e4683. Read the comment docs.

@rom1win rom1win merged commit ab33407 into master Dec 3, 2021
@rom1win rom1win deleted the wip-NXDRIVE-2738-implement-database-downgrade branch December 3, 2021 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants