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

Add cmap option to specify the colormap of plot (Sourcery refactored) #1798

Closed
wants to merge 5 commits into from

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Sep 17, 2021

Pull Request #1788 refactored by Sourcery.

Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.

To incorporate these changes, you can either:

  1. Merge this Pull Request instead of the original, or

  2. Ask your contributor to locally incorporate these commits and push them to
    the original Pull Request

    Incorporate changes via command line
    git fetch https://github.com/tardis-sn/tardis pull/1788/head
    git merge --ff-only FETCH_HEAD
    git push

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:

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from yuyizheng1112 September 17, 2021 15:52
@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

@sourcery-ai
Copy link
Author

sourcery-ai bot commented Sep 17, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.85 ⭐ 3.47 ⭐ -0.38 👍
Method Length 83.54 🙂 81.22 🙂 -2.32 👍
Working memory 9.83 🙂 9.83 🙂 0.00
Quality 63.30% 🙂 63.71% 🙂 0.41% 👍
Other metrics Before After Change
Lines 1613 1624 11
Changed files Quality Before Quality After Quality Change
tardis/visualization/widgets/custom_abundance.py 63.30% 🙂 63.71% 🙂 0.41% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
tardis/visualization/widgets/custom_abundance.py CustomAbundanceWidgetData.from_csvy 12 🙂 413 ⛔ 18 ⛔ 28.54% 😞 Try splitting into smaller methods. Extract out complex expressions
tardis/visualization/widgets/custom_abundance.py CustomAbundanceWidget.on_btn_add_shell 11 🙂 383 ⛔ 11 😞 38.78% 😞 Try splitting into smaller methods. Extract out complex expressions
tardis/visualization/widgets/custom_abundance.py CustomAbundanceWidget.create_widgets 1 ⭐ 537 ⛔ 13 😞 43.87% 😞 Try splitting into smaller methods. Extract out complex expressions
tardis/visualization/widgets/custom_abundance.py CustomAbundanceWidget.generate_abundance_density_plot 1 ⭐ 191 😞 16 ⛔ 49.11% 😞 Try splitting into smaller methods. Extract out complex expressions
tardis/visualization/widgets/custom_abundance.py DensityEditor.create_widgets 0 ⭐ 302 ⛔ 12 😞 49.51% 😞 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 Sep 17, 2021

Codecov Report

Merging #1798 (370c5f2) into master (fa42fbc) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1798      +/-   ##
==========================================
+ Coverage   58.38%   58.43%   +0.04%     
==========================================
  Files          66       66              
  Lines        6705     6702       -3     
==========================================
+ Hits         3915     3916       +1     
+ Misses       2790     2786       -4     
Impacted Files Coverage Δ
...s/tardis/visualization/widgets/custom_abundance.py 14.67% <0.00%> (+0.24%) ⬆️

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 fa42fbc...370c5f2. Read the comment docs.

@wkerzendorf wkerzendorf closed this Oct 7, 2021
@epassaro epassaro deleted the sourcery/pull-1788 branch May 26, 2022 20:13
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.

3 participants