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

🩹 Fix 'dataset_groups' not shown in model markdown #906

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

s-weigand
Copy link
Member

@s-weigand s-weigand commented Nov 16, 2021

Adds the Dataset Groups subsection to the markdown representation of model (used in the markdown report).

Change summary

  • 🧪 Added failing test case showing the expected output of Model.markdown
  • 🩹 Change Model.markdown to satisfy the test

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)
  • 👌 Closes issue (mandatory for ✨ feature and 🩹 bug fix PR's)
  • 🧪 Adds new tests for the feature (mandatory for ✨ feature and 🩹 bug fix PR's)

Closes issues

closes #885

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 16, 2021

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.97 ⭐ 3.23 ⭐ 0.26 👎
Method Length 68.70 🙂 69.50 🙂 0.80 👎
Working memory 6.63 🙂 6.69 🙂 0.06 👎
Quality 72.39% 🙂 71.75% 🙂 -0.64% 👎
Other metrics Before After Change
Lines 870 952 82
Changed files Quality Before Quality After Quality Change
glotaran/model/model.py 72.40% 🙂 70.82% 🙂 -1.58% 👎
glotaran/model/test/test_model.py 72.38% 🙂 72.58% 🙂 0.20% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
glotaran/model/model.py Model.markdown 13 🙂 168 😞 10 😞 48.74% 😞 Try splitting into smaller methods. Extract out complex expressions
glotaran/model/model.py Model.from_dict 12 🙂 162 😞 10 😞 50.19% 🙂 Try splitting into smaller methods. Extract out complex expressions
glotaran/model/model.py Model._add_dict_items 10 🙂 97 🙂 11 😞 57.81% 🙂 Extract out complex expressions
glotaran/model/test/test_model.py test_fill 0 ⭐ 243 ⛔ 7 🙂 62.26% 🙂 Try splitting into smaller methods
glotaran/model/model.py Model._add_list_items 9 🙂 76 🙂 10 😞 63.66% 🙂 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!

@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran/add-dataset_groups-to-md

@sonarcloud
Copy link

sonarcloud bot commented Nov 16, 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
2.1% 2.1% Duplication

@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

Merging #906 (d313129) into main (ded0711) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #906   +/-   ##
=====================================
  Coverage   84.7%   84.8%           
=====================================
  Files         81      81           
  Lines       4603    4610    +7     
  Branches     849     851    +2     
=====================================
+ Hits        3902    3910    +8     
+ Misses       559     558    -1     
  Partials     142     142           
Impacted Files Coverage Δ
glotaran/model/model.py 85.4% <100.0%> (+0.4%) ⬆️
glotaran/testing/model_generators.py 89.6% <0.0%> (+0.9%) ⬆️

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 ded0711...d313129. Read the comment docs.

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! 👍

@s-weigand s-weigand merged commit b3b8b87 into glotaran:main Nov 17, 2021
@s-weigand s-weigand deleted the add-dataset_groups-to-md branch November 17, 2021 08:14
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.

🐛 'dataset_groups' not shown in model markdown
2 participants