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

50 OSIS Parser is ignoring the seg and divineName tags #51

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.79%.

Quality metrics Before After Change
Complexity 1.91 ⭐ 2.14 ⭐ 0.23 👎
Method Length 43.51 ⭐ 43.55 ⭐ 0.04 👎
Working memory 5.77 ⭐ 5.93 ⭐ 0.16 👎
Quality 83.55% 82.76% -0.79% 👎
Other metrics Before After Change
Lines 2168 2192 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/bible/osis/parser.py 72.90% 🙂 71.10% 🙂 -1.80% 👎
tests/conftest.py 96.91% ⭐ 96.91% ⭐ 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/bible/osis/parser.py _handle_child_element 13 🙂 139 😞 12 😞 48.11% 😞 Try splitting into smaller methods. Extract out complex expressions
pythonbible/bible/osis/parser.py _handle_verse_tag 10 🙂 109 🙂 11 😞 56.19% 🙂 Extract out complex expressions
pythonbible/bible/osis/parser.py _get_paragraphs 2 ⭐ 116 🙂 11 😞 62.99% 🙂 Extract out complex expressions
pythonbible/bible/osis/parser.py _get_paragraph_from_element 6 ⭐ 77 🙂 10 😞 66.36% 🙂 Extract out complex expressions
tests/conftest.py book_alternative_names_verbum 0 ⭐ 641 ⛔ 3 ⭐ 66.79% 🙂 Try splitting into smaller methods

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!