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

Excel export (Sourcery refactored) #115

Merged
merged 1 commit into from
Jan 7, 2023
Merged

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Jan 7, 2023

Pull Request #114 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 excel-export branch, then run:

git fetch origin sourcery/excel-export
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from tpaviot January 7, 2023 07:31
Comment on lines -29 to +31
bg_color = f"#{hash_str[2:8]}"
return f"#{hash_str[2:8]}"
else:
bg_color = "#F0F0F0"
return bg_color
return "#F0F0F0"
Copy link
Author

Choose a reason for hiding this comment

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

Function _get_color_from_string refactored with the following changes:

Comment on lines -70 to +69
if "NotAvailable" in task_name:
# hatch = "//"
# bar_color = "white"
text_to_display = ""
else:
# hatch = None
# bar_color = task_colors[task_name]
text_to_display = task_name

text_to_display = "" if "NotAvailable" in task_name else task_name
Copy link
Author

Choose a reason for hiding this comment

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

Function export_solution_to_excel_file refactored with the following changes:

This removes the following comments ( why? ):

# hatch = None
# bar_color = task_colors[task_name]
# bar_color = "white"
# hatch = "//"

Comment on lines -121 to +123
self.assertTrue("task_1" in "%s" % t1)
self.assertTrue("task_2" in "%s" % t2)
self.assertTrue("W1" in "%s" % worker_1)
self.assertTrue("task_1" in f"{t1}")
self.assertTrue("task_2" in f"{t2}")
self.assertTrue("W1" in f"{worker_1}")
Copy link
Author

Choose a reason for hiding this comment

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

Function TestFeatures.test_print_objects refactored with the following changes:

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Jan 7, 2023

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 0.12 ⭐ 0.12 ⭐ 0.00
Method Length 47.31 ⭐ 47.31 ⭐ 0.00
Working memory 4.85 ⭐ 4.85 ⭐ 0.00
Quality 86.90% 86.90% 0.00%
Other metrics Before After Change
Lines 87 87 0
Changed files Quality Before Quality After Quality Change
test/test_features.py 86.90% ⭐ 86.90% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation

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!

@tpaviot tpaviot merged commit 5919a56 into excel-export Jan 7, 2023
@tpaviot tpaviot deleted the sourcery/excel-export branch January 7, 2023 08:04
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

1 participant