django-sorcery icon indicating copy to clipboard operation
django-sorcery copied to clipboard

Consolidate package config to pyproject.toml

Open shosca opened this issue 3 years ago • 2 comments

shosca avatar Aug 16 '22 12:08 shosca

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 2.62 ⭐ 2.57 ⭐ -0.05 👍
Method Length 58.94 ⭐ 59.66 ⭐ 0.72 👎
Working memory 5.76 ⭐ 5.80 ⭐ 0.04 👎
Quality 78.42% 78.37% -0.05% 👎
Other metrics Before After Change
Lines 11407 11360 -47
Changed files Quality Before Quality After Quality Change
setup.py 88.55% ⭐ 100.00% ⭐ 11.45% 👍
django_sorcery/init.py 98.50% ⭐ 99.50% ⭐ 1.00% 👍
django_sorcery/forms.py 54.25% 🙂 54.71% 🙂 0.46% 👍
django_sorcery/routers.py 72.95% 🙂 72.95% 🙂 0.00%
django_sorcery/shortcuts.py 89.44% ⭐ 89.23% ⭐ -0.21% 👎
django_sorcery/db/init.py 99.00% ⭐ 99.00% ⭐ 0.00%
django_sorcery/db/fields.py 77.76% ⭐ 78.21% ⭐ 0.45% 👍
django_sorcery/db/middleware.py 85.93% ⭐ 85.93% ⭐ 0.00%
django_sorcery/db/models.py 58.36% 🙂 58.36% 🙂 0.00%
django_sorcery/db/profiler.py 82.67% ⭐ 82.98% ⭐ 0.31% 👍
django_sorcery/db/query.py 69.30% 🙂 69.06% 🙂 -0.24% 👎
django_sorcery/db/session.py 82.10% ⭐ 82.10% ⭐ 0.00%
django_sorcery/db/sqlalchemy.py 76.42% ⭐ 76.42% ⭐ 0.00%
django_sorcery/db/url.py 81.19% ⭐ 81.19% ⭐ 0.00%
django_sorcery/db/utils.py 83.59% ⭐ 83.59% ⭐ 0.00%
django_sorcery/db/meta/column.py 74.55% 🙂 74.13% 🙂 -0.42% 👎
django_sorcery/db/meta/model.py 57.97% 🙂 57.71% 🙂 -0.26% 👎
django_sorcery/db/meta/relations.py 48.68% 😞 49.53% 😞 0.85% 👍
django_sorcery/formsets/base.py 62.27% 🙂 61.42% 🙂 -0.85% 👎
django_sorcery/formsets/inline.py 72.57% 🙂 70.88% 🙂 -1.69% 👎
django_sorcery/management/alembic.py 68.41% 🙂 68.44% 🙂 0.03% 👍
django_sorcery/management/base.py 77.04% ⭐ 76.47% ⭐ -0.57% 👎
django_sorcery/management/commands/sorcery_createall.py 88.31% ⭐ 88.31% ⭐ 0.00%
django_sorcery/management/commands/sorcery_dropall.py 88.31% ⭐ 88.31% ⭐ 0.00%
django_sorcery/validators/init.py 98.50% ⭐ % %
django_sorcery/validators/base.py 79.63% ⭐ 79.89% ⭐ 0.26% 👍
django_sorcery/validators/runner.py 75.10% ⭐ 75.10% ⭐ 0.00%
django_sorcery/views/base.py 72.32% 🙂 71.99% 🙂 -0.33% 👎
django_sorcery/views/detail.py 80.26% ⭐ 80.26% ⭐ 0.00%
django_sorcery/views/edit.py 91.55% ⭐ 91.63% ⭐ 0.08% 👍
django_sorcery/views/list.py 80.17% ⭐ 80.14% ⭐ -0.03% 👎
django_sorcery/viewsets/init.py 85.21% ⭐ 92.15% ⭐ 6.94% 👍
django_sorcery/viewsets/base.py 58.07% 🙂 58.10% 🙂 0.03% 👍
django_sorcery/viewsets/mixins.py 89.07% ⭐ 88.92% ⭐ -0.15% 👎
docs/conf.py 66.09% 🙂 66.09% 🙂 0.00%
test_site/manage.py 87.29% ⭐ 87.29% ⭐ 0.00%
test_site/polls/admin.py % % %
test_site/polls/apps.py 100.00% ⭐ 100.00% ⭐ 0.00%
test_site/polls/models.py 75.09% ⭐ 75.09% ⭐ 0.00%
test_site/polls/tests.py % % %
test_site/polls/urls.py 88.45% ⭐ 87.65% ⭐ -0.80% 👎
test_site/polls/views.py 82.74% ⭐ 82.96% ⭐ 0.22% 👍
test_site/test_site/settings.py 73.90% 🙂 73.90% 🙂 0.00%
test_site/test_site/urls.py 90.57% ⭐ 89.75% ⭐ -0.82% 👎
test_site/test_site/wsgi.py 94.51% ⭐ 94.51% ⭐ 0.00%
tests/init.py 91.55% ⭐ 91.55% ⭐ 0.00%
tests/base.py 92.89% ⭐ 92.89% ⭐ 0.00%
tests/models_backpop.py 55.90% 🙂 55.90% 🙂 0.00%
tests/models_multidb.py 77.28% ⭐ 77.28% ⭐ 0.00%
tests/models_terrible_relations.py 73.50% 🙂 73.50% 🙂 0.00%
tests/test_exceptions.py 92.02% ⭐ 92.02% ⭐ 0.00%
tests/test_fields.py 81.71% ⭐ 81.89% ⭐ 0.18% 👍
tests/test_forms.py 82.79% ⭐ 81.91% ⭐ -0.88% 👎
tests/test_pytest_plugin.py 78.20% ⭐ 78.20% ⭐ 0.00%
tests/test_routers.py 82.39% ⭐ 82.39% ⭐ 0.00%
tests/test_shortcuts.py 84.15% ⭐ 84.15% ⭐ 0.00%
tests/test_utils.py 88.80% ⭐ 88.80% ⭐ 0.00%
tests/test_validators.py 93.54% ⭐ 93.54% ⭐ 0.00%
tests/urls.py 62.87% 🙂 60.18% 🙂 -2.69% 👎
tests/db/test_composites.py 82.80% ⭐ 82.80% ⭐ 0.00%
tests/db/test_fields.py 82.71% ⭐ 82.69% ⭐ -0.02% 👎
tests/db/test_middleware.py 93.70% ⭐ 93.70% ⭐ 0.00%
tests/db/test_mixins.py 82.18% ⭐ 82.18% ⭐ 0.00%
tests/db/test_models.py 83.81% ⭐ 83.81% ⭐ 0.00%
tests/db/test_profiler.py 86.45% ⭐ 86.45% ⭐ 0.00%
tests/db/test_query.py 86.67% ⭐ 86.67% ⭐ 0.00%
tests/db/test_session.py 86.18% ⭐ 86.18% ⭐ 0.00%
tests/db/test_sqlalchemy.py 90.66% ⭐ 90.66% ⭐ 0.00%
tests/db/test_transaction.py 94.50% ⭐ 94.50% ⭐ 0.00%
tests/db/test_url.py 89.59% ⭐ 89.59% ⭐ 0.00%
tests/db/test_utils.py 88.97% ⭐ 88.97% ⭐ 0.00%
tests/db/alembic/test_base.py 77.19% ⭐ 77.19% ⭐ 0.00%
tests/db/alembic/test_signals.py 95.61% ⭐ 95.61% ⭐ 0.00%
tests/db/meta/test_column.py 85.03% ⭐ 85.03% ⭐ 0.00%
tests/db/meta/test_composite.py 77.08% ⭐ 77.08% ⭐ 0.00%
tests/db/meta/test_model.py 78.42% ⭐ 78.42% ⭐ 0.00%
tests/db/meta/test_relations.py 77.05% ⭐ 77.05% ⭐ 0.00%
tests/formsets/test_base.py 74.99% 🙂 73.50% 🙂 -1.49% 👎
tests/formsets/test_inline.py 84.04% ⭐ 83.24% ⭐ -0.80% 👎
tests/management/test_base.py 93.12% ⭐ 93.12% ⭐ 0.00%
tests/management/commands/base.py 94.23% ⭐ 94.23% ⭐ 0.00%
tests/management/commands/test_sorcery.py 85.61% ⭐ 85.61% ⭐ 0.00%
tests/management/commands/test_sorcery_current.py 88.34% ⭐ 88.71% ⭐ 0.37% 👍
tests/management/commands/test_sorcery_downgrade.py 89.04% ⭐ 89.22% ⭐ 0.18% 👍
tests/management/commands/test_sorcery_heads.py 92.78% ⭐ 92.29% ⭐ -0.49% 👎
tests/management/commands/test_sorcery_history.py 90.57% ⭐ 90.57% ⭐ 0.00%
tests/management/commands/test_sorcery_revision.py 87.92% ⭐ 87.96% ⭐ 0.04% 👍
tests/management/commands/test_sorcery_stamp.py 92.38% ⭐ 92.77% ⭐ 0.39% 👍
tests/management/commands/test_sorcery_upgrade.py 87.92% ⭐ 87.97% ⭐ 0.05% 👍
tests/minimalapp/models.py 54.78% 🙂 54.78% 🙂 0.00%
tests/otherapp/models.py 81.76% ⭐ 81.76% ⭐ 0.00%
tests/testapp/models.py 69.41% 🙂 69.47% 🙂 0.06% 👍
tests/testapp/views.py 49.49% 😞 49.11% 😞 -0.38% 👎
tests/views/test_base.py 90.07% ⭐ 90.07% ⭐ 0.00%
tests/views/test_detail.py 91.56% ⭐ 91.53% ⭐ -0.03% 👎
tests/views/test_edit.py 79.83% ⭐ 79.83% ⭐ 0.00%
tests/views/test_list.py 86.92% ⭐ 87.57% ⭐ 0.65% 👍
tests/viewsets/test_mixins.py 82.34% ⭐ 82.34% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
django_sorcery/db/meta/model.py model_info.clean_relation_fields 52 ⛔ 211 ⛔ 13 😞 21.90% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
django_sorcery/db/models.py clone 25 😞 267 ⛔ 14 😞 26.69% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
django_sorcery/db/meta/column.py column_info.__init__ 17 🙂 396 ⛔ 12 😞 31.81% 😞 Try splitting into smaller methods. Extract out complex expressions
django_sorcery/forms.py fields_for_model 18 🙂 170 😞 17 ⛔ 34.51% 😞 Try splitting into smaller methods. Extract out complex expressions
django_sorcery/db/meta/relations.py relation_info.__init__ 7 ⭐ 336 ⛔ 17 ⛔ 35.31% 😞 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

sourcery-ai[bot] avatar Aug 16 '22 12:08 sourcery-ai[bot]

Pull Request Test Coverage Report for Build 2868007072

  • 129 of 129 (100.0%) changed or added relevant lines in 29 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2808661076: 0.0%
Covered Lines: 3512
Relevant Lines: 3512

💛 - Coveralls

coveralls avatar Aug 16 '22 12:08 coveralls