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

Main -> Develop 20220623 #53

Closed avendesora closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 4.27 ⭐ 4.32 ⭐ 0.05 👎
Method Length 52.14 ⭐ 52.11 ⭐ -0.03 👍
Working memory 7.25 🙂 7.28 🙂 0.03 👎
Quality 75.71% 75.53% -0.18% 👎
Other metrics Before After Change
Lines 5582 5606 24
Changed files Quality Before Quality After Quality Change
docs/source/conf.py 89.80% ⭐ 89.80% ⭐ 0.00%
pythonbible/init.py 81.99% ⭐ 81.99% ⭐ 0.00%
pythonbible/book_groups.py 71.74% 🙂 71.74% 🙂 0.00%
pythonbible/books.py 91.09% ⭐ 91.09% ⭐ 0.00%
pythonbible/converter.py 53.02% 🙂 53.02% 🙂 0.00%
pythonbible/formatter.py 74.85% 🙂 74.85% 🙂 0.00%
pythonbible/normalized_reference.py 97.67% ⭐ 97.67% ⭐ 0.00%
pythonbible/parser.py 53.97% 🙂 53.97% 🙂 0.00%
pythonbible/regular_expressions.py 48.09% 😞 48.09% 😞 0.00%
pythonbible/validator.py 86.81% ⭐ 86.81% ⭐ 0.00%
pythonbible/verses.py 86.50% ⭐ 86.50% ⭐ 0.00%
pythonbible/versions.py 85.13% ⭐ 85.13% ⭐ 0.00%
pythonbible/bible/osis/parser.py 72.90% 🙂 71.10% 🙂 -1.80% 👎
pythonbible/counters/book_counter.py 98.18% ⭐ 98.18% ⭐ 0.00%
pythonbible/counters/chapter_counter.py 90.47% ⭐ 90.47% ⭐ 0.00%
pythonbible/counters/verse_counter.py 73.10% 🙂 73.10% 🙂 0.00%
tests/conftest.py 96.91% ⭐ 96.91% ⭐ 0.00%
tests/test_parser.py 89.05% ⭐ 89.05% ⭐ 0.00%
tests/test_verses.py 90.83% ⭐ 90.83% ⭐ 0.00%
tests/test_zzz_osis_parser.py 85.65% ⭐ 85.95% ⭐ 0.30% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
pythonbible/parser.py _process_sub_reference 14 🙂 218 ⛔ 13 😞 38.70% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/parser.py normalize_reference 18 🙂 183 😞 12 😞 39.71% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/converter.py convert_verse_ids_to_references 11 🙂 179 😞 15 😞 41.63% 😞 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
pythonbible/bible/osis/parser.py _handle_child_element 13 🙂 139 😞 12 😞 48.11% 😞 Try splitting into smaller methods. 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!

Help us improve this quality report!