Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

release_v3.0 #460

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

release_v3.0 #460

wants to merge 17 commits into from

Conversation

ShahriyarR
Copy link
Owner

The major code refactorings and project restructuring.

…ath (#448)

As discussed in #446 it can be valuable to add an commandline option to generate the default config file is this was somehow eliminated by setup.

--generate-config-file flag option was added. Sample run will be something like this:
autoxtrabackup --generate-config-file --verbose
2021-10-03 19:03:07 INFO [autoxtrabackup:278] Default config file is generated in /home/shako/.autoxtrabackup/autoxtrabackup.cnf
2021-10-03 19:03:07 INFO [autoxtrabackup:313] Xtrabackup command history:
2021-10-03 19:03:07 INFO [autoxtrabackup:315] ['command', 'xtrabackup_function', 'start time', 'end time', 'duration', 'exit code']
2021-10-03 19:03:07 INFO [autoxtrabackup:316] Autoxtrabackup completed successfully!
The wrong config option was used and it fails when the tool tries to use backup archive feature.

Now it will raise BackupArchiveNotConfigured error if options were not set and also it will check for archive_max_duration
@ShahriyarR ShahriyarR self-assigned this Apr 12, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 13, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 11.39%.

Quality metrics Before After Change
Complexity 6.21 ⭐ 2.47 ⭐ -3.74 👍
Method Length 58.79 ⭐ 36.09 ⭐ -22.70 👍
Working memory 8.61 🙂 7.08 🙂 -1.53 👍
Quality 69.12% 🙂 80.51% 11.39% 👍
Other metrics Before After Change
Lines 2932 1035 -1897
Changed files Quality Before Quality After Quality Change
changes/make_history.py 36.02% 😞 36.02% 😞 0.00%
docs/conf.py 73.00% 🙂 73.00% 🙂 0.00%
mysql_autoxtrabackup/init.py 100.00% ⭐ 100.00% ⭐ 0.00%
mysql_autoxtrabackup/autoxtrabackup.py 46.83% 😞 84.77% ⭐ 37.94% 👍
mysql_autoxtrabackup/api/main.py 93.44% ⭐ 93.44% ⭐ 0.00%
mysql_autoxtrabackup/api/controller/controller.py 85.77% ⭐ 85.77% ⭐ 0.00%
mysql_autoxtrabackup/process_runner/errors.py 96.04% ⭐ 96.04% ⭐ 0.00%
mysql_autoxtrabackup/process_runner/process_runner.py 70.99% 🙂 74.97% 🙂 3.98% 👍
tests/conftest.py 98.67% ⭐ 87.90% ⭐ -10.77% 👎
tests/test_backup.py 88.77% ⭐ 88.77% ⭐ 0.00%
tests/test_helpers.py 89.46% ⭐ 89.46% ⭐ 0.00%
tests/test_mysql_cli.py 96.05% ⭐ 96.05% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
mysql_autoxtrabackup/autoxtrabackup.py all_procedure 0 ⭐ 238 ⛔ 41 ⛔ 39.67% 😞 Try splitting into smaller methods. Extract out complex expressions
mysql_autoxtrabackup/process_runner/process_runner.py ProcessHandler.summarize_process 7 ⭐ 85 🙂 12 😞 60.59% 🙂 Extract out complex expressions
mysql_autoxtrabackup/autoxtrabackup.py _handle_backup_pid_exception 2 ⭐ 83 🙂 14 😞 62.80% 🙂 Extract out complex expressions
mysql_autoxtrabackup/autoxtrabackup.py _build_callables_map 4 ⭐ 54 ⭐ 12 😞 68.24% 🙂 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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant