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 more tools from the 'pygrep-hooks' pre-commit hook #805

Merged
merged 1 commit into from
Sep 11, 2021

Conversation

s-weigand
Copy link
Member

Just some more tests for common errors ^^

Change summary

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)

@s-weigand s-weigand requested a review from a team as a code owner September 8, 2021 19:12
@s-weigand s-weigand added the Type: Tooling Tools used for the project (CI, CD, docs etc.) label Sep 8, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2021

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran/more-linting

@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #805 (61d2820) into staging (9d49c12) will not change coverage.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           staging    #805   +/-   ##
=======================================
  Coverage     84.5%   84.5%           
=======================================
  Files           75      75           
  Lines         4198    4198           
  Branches       756     756           
=======================================
  Hits          3550    3550           
  Misses         515     515           
  Partials       133     133           
Impacted Files Coverage Δ
glotaran/deprecation/deprecation_utils.py 100.0% <100.0%> (ø)

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 9d49c12...61d2820. Read the comment docs.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 9, 2021

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 3.71 ⭐ 3.71 ⭐ 0.00
Method Length 60.64 ⭐ 60.64 ⭐ 0.00
Working memory 9.10 🙂 9.10 🙂 0.00
Quality 71.06% 🙂 71.06% 🙂 0.00%
Other metrics Before After Change
Lines 707 707 0
Changed files Quality Before Quality After Quality Change
glotaran/deprecation/deprecation_utils.py 71.06% 🙂 71.06% 🙂 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
glotaran/deprecation/deprecation_utils.py check_qualnames_in_tests.deprecate_dict_entry 11 🙂 135 😞 14 😞 47.35% 😞 Try splitting into smaller methods. Extract out complex expressions
glotaran/deprecation/deprecation_utils.py check_qualnames_in_tests.warn_deprecated 2 ⭐ 101 🙂 14 😞 60.26% 🙂 Extract out complex expressions
glotaran/deprecation/deprecation_utils.py check_qualnames_in_tests 6 ⭐ 83 🙂 10 😞 65.48% 🙂 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!

@sonarcloud
Copy link

sonarcloud bot commented Sep 9, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2021

Benchmark is done. Checkout the benchmark result page.
Benchmark differences below 5% might be due to CI noise.

Benchmark diff

Parametrized benchmark signatures:

BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)

All benchmarks:

       before           after         ratio
     [dc00e6da]       [61d2820f]
     <v0.4.0>                   
-      48.6±0.7ms       36.8±0.5ms     0.76  BenchmarkOptimize.time_optimize(False, False, False)
-         270±3ms         45.8±5ms     0.17  BenchmarkOptimize.time_optimize(False, False, True)
-        69.7±1ms       61.3±0.6ms     0.88  BenchmarkOptimize.time_optimize(False, True, False)
       73.2±0.7ms       65.3±0.4ms    ~0.89  BenchmarkOptimize.time_optimize(False, True, True)
         47.7±1ms       47.5±0.3ms     1.00  BenchmarkOptimize.time_optimize(True, False, False)
-         267±3ms        70.1±40ms     0.26  BenchmarkOptimize.time_optimize(True, False, True)
         71.7±1ms       73.7±0.6ms     1.03  BenchmarkOptimize.time_optimize(True, True, False)
       72.4±0.7ms        91.4±20ms    ~1.26  BenchmarkOptimize.time_optimize(True, True, True)
             180M             180M     1.00  IntegrationTwoDatasets.peakmem_create_result
             198M             199M     1.01  IntegrationTwoDatasets.peakmem_optimize
-         223±3ms          185±3ms     0.83  IntegrationTwoDatasets.time_create_result
       4.83±0.03s        1.76±0.1s    ~0.37  IntegrationTwoDatasets.time_optimize

Copy link
Member

@jsnel jsnel left a comment

Choose a reason for hiding this comment

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

LGTM

@jsnel jsnel merged commit 9892b6e into glotaran:staging Sep 11, 2021
@jsnel jsnel deleted the more-linting branch September 11, 2021 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Tooling Tools used for the project (CI, CD, docs etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants