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 #49

Closed avendesora closed 2 years ago

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 5.30 ⭐ 5.30 ⭐ 0.00
Method Length 58.24 ⭐ 58.24 ⭐ 0.00
Working memory 7.89 🙂 7.89 🙂 0.00
Quality 72.26% 🙂 72.26% 🙂 0.00%
Other metrics Before After Change
Lines 3527 3527 0
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/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/test_parser.py 89.05% ⭐ 89.05% ⭐ 0.00%
tests/test_verses.py 90.83% ⭐ 90.83% ⭐ 0.00%

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/counters/verse_counter.py _get_number_of_verses_in_reference 16 🙂 98 🙂 10 😞 54.40% 🙂 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!