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

Convert Docs to Sphinx (#44) #47

Closed avendesora closed 2 years ago

avendesora commented 2 years ago

update CodeQL workflow to run on all branches

update testing workflow to run on all branches

test against stable python 3.10 release instead of release candidate

need python '3.10' in quotes or it will think it means 3.1

add testing for python 3.11 alpha

sourcery-ai[bot] commented 2 years ago

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.34%.

Quality metrics Before After Change
Complexity 5.42 ⭐ 5.30 ⭐ -0.12 👍
Method Length 58.30 ⭐ 58.24 ⭐ -0.06 👍
Working memory 7.96 🙂 7.89 🙂 -0.07 👍
Quality 71.92% 🙂 72.26% 🙂 0.34% 👍
Other metrics Before After Change
Lines 3351 3527 176
Changed files Quality Before Quality After Quality Change
docs/source/conf.py 89.80% ⭐
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.86% 🙂 74.85% 🙂 -0.01% 👎
pythonbible/normalized_reference.py 97.84% ⭐ 97.67% ⭐ -0.17% 👎
pythonbible/parser.py 53.81% 🙂 53.97% 🙂 0.16% 👍
pythonbible/regular_expressions.py 48.09% 😞 48.09% 😞 0.00%
pythonbible/validator.py 86.81% ⭐ 86.81% ⭐ 0.00%
pythonbible/verses.py 86.43% ⭐ 86.50% ⭐ 0.07% 👍
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.49% ⭐ 90.47% ⭐ -0.02% 👎
pythonbible/counters/verse_counter.py 73.11% 🙂 73.10% 🙂 -0.01% 👎
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!