avendesora / pythonbible

A python library for validating, parsing, normalizing scripture references and retrieving scripture texts (for open source and public domain versions)
https://docs.python.bible
MIT License
58 stars 11 forks source link

updating develop to have the latest from main #32

Closed avendesora closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 3.87 ⭐ 3.67 ⭐ -0.20 👍
Method Length 44.63 ⭐ 47.74 ⭐ 3.11 👎
Working memory 10.28 😞 13.32 😞 3.04 👎
Quality 74.01% 🙂 73.71% 🙂 -0.30% 👎
Other metrics Before After Change
Lines 3896 4970 1074
Changed files Quality Before Quality After Quality Change
pythonbible/init.py 83.42% ⭐ 82.94% ⭐ -0.48% 👎
pythonbible/book_groups.py 49.49% 😞
pythonbible/converter.py 48.35% 😞 51.92% 🙂 3.57% 👍
pythonbible/formatter.py 66.93% 🙂 73.69% 🙂 6.76% 👍
pythonbible/normalized_reference.py 98.67% ⭐ 97.84% ⭐ -0.83% 👎
pythonbible/parser.py 48.46% 😞 51.11% 🙂 2.65% 👍
pythonbible/regular_expressions.py 37.05% 😞 44.84% 😞 7.79% 👍
pythonbible/roman_numeral_util.py 78.83% ⭐ 77.62% ⭐ -1.21% 👎
pythonbible/verses.py 79.86% ⭐ 81.74% ⭐ 1.88% 👍
pythonbible/bible/osis/parser.py 69.26% 🙂 69.19% 🙂 -0.07% 👎
tests/conftest.py 91.75% ⭐ 90.29% ⭐ -1.46% 👎
tests/test_converter.py 91.34% ⭐ 90.68% ⭐ -0.66% 👎
tests/test_formatter.py 84.58% ⭐ 86.95% ⭐ 2.37% 👍
tests/test_parser.py 86.30% ⭐ 81.81% ⭐ -4.49% 👎
tests/test_regular_expressions.py 81.97% ⭐ 84.69% ⭐ 2.72% 👍
tests/test_zzz_osis_parser.py 84.50% ⭐ 84.50% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
tests/conftest.py book_alternative_names 0 ⭐ 566 ⛔ 361 ⛔ 33.59% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/parser.py _process_sub_reference 14 🙂 229 ⛔ 14 😞 36.60% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/parser.py normalize_reference 18 🙂 190 😞 13 😞 37.56% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/converter.py convert_verse_ids_to_references 11 🙂 181 😞 15 😞 41.45% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/formatter.py format_scripture_text_verse_by_verse 13 🙂 112 🙂 15 😞 47.15% 😞 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.