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
60 stars 12 forks source link

initial data for some of the books of the apocrypha #58

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

Quality metrics Before After Change
Complexity 4.49 ⭐ 4.47 ⭐ -0.02 👍
Method Length 56.69 ⭐ 57.98 ⭐ 1.29 👎
Working memory 7.20 🙂 7.37 🙂 0.17 👎
Quality 76.01% 75.96% -0.05% 👎
Other metrics Before After Change
Lines 4441 4612 171
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/formatter.py 74.85% 🙂 74.85% 🙂 0.00%
pythonbible/parser.py 53.97% 🙂 54.09% 🙂 0.12% 👍
pythonbible/regular_expressions.py 48.09% 😞 46.48% 😞 -1.61% 👎
pythonbible/verses.py 86.50% ⭐ 88.16% ⭐ 1.66% 👍
pythonbible/counters/verse_counter.py 73.10% 🙂 73.10% 🙂 0.00%
tests/conftest.py 96.91% ⭐ 96.91% ⭐ 0.00%
tests/test_formatter.py 88.05% ⭐ 88.05% ⭐ 0.00%
tests/test_regular_expressions.py 90.58% ⭐ 90.62% ⭐ 0.04% 👍

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/formatter.py _format_scripture_text_verse_by_verse 13 🙂 112 🙂 15 😞 47.15% 😞 Extract out complex expressions
pythonbible/counters/verse_counter.py _get_number_of_verses_in_reference 16 🙂 98 🙂 10 😞 54.40% 🙂 Extract out complex expressions
pythonbible/formatter.py format_single_reference 10 🙂 101 🙂 12 😞 55.53% 🙂 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!