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

Chore: Uncover some Functions #8

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Chore: Uncover some Functions #8

merged 1 commit into from
Nov 30, 2021

Conversation

yezz123
Copy link
Owner

@yezz123 yezz123 commented Nov 30, 2021

No description provided.

@yezz123 yezz123 self-assigned this Nov 30, 2021
@pull-request-quantifier-deprecated

This PR has 112 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Medium
Size       : +66 -46
Percentile : 42.4%

Total files changed: 11

Change summary by file extension:
.coveragerc : +7 -0
.yml : +40 -23
.yaml : +5 -6
.cfg : +1 -1
.py : +10 -8
Makefile : +3 -8

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detetcted.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 30, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 0.74 ⭐ 0.74 ⭐ 0.00
Method Length 25.07 ⭐ 25.13 ⭐ 0.06 👎
Working memory 6.84 🙂 6.84 🙂 0.00
Quality 86.81% 86.80% -0.01% 👎
Other metrics Before After Change
Lines 150 151 1
Changed files Quality Before Quality After Quality Change
setup.py 63.60% 🙂 63.45% 🙂 -0.15% 👎
fastapi_class/init.py 99.17% ⭐ 99.17% ⭐ 0.00%
fastapi_class/decorators.py 93.78% ⭐ 93.78% ⭐ 0.00%
fastapi_class/routable.py 79.17% ⭐ 79.17% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
fastapi_class/routable.py RoutableMeta.__new__ 4 ⭐ 47 ⭐ 10 😞 72.99% 🙂 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!

@yezz123 yezz123 merged commit f087b3f into main Nov 30, 2021
@yezz123 yezz123 deleted the Conf branch November 30, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant