repowiseprefecthq/prefect

prefecthq / prefect

pythontypescriptmainb749a67814.2K linessynced 3mo ago

Code health

7.6out of 10Good

Hotspots average 3.9, the place fixes pay off most.

Explore this codebase

Do next · 3

3 things worth doing in the week to Jul 15, the last indexed commit.

Worth planning

  • Start breaking up safe_load_namespace (CCN 32, 118 lines): first lift lines 441-463

    src/prefect/utilities/importtools.py:441

    safe_load_namespace nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 5 commits; changed 1 time in 90 days.

    gain
    up to +1.6 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 32, 118 lines, nests 9 deep
    severity
    high
    worth a check
  • Start breaking up run (CCN 19, 78 lines): first lift lines 520-530

    src/integrations/prefect-redis/prefect_redis/messaging.py:520

    run nests deeply; easier to read and change once split, which also removes a duplicate; changed 2 times in 90 days.

    gain
    up to +1.1 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 19, 78 lines, nests 8 deep
    severity
    high
    worth a check
  • Start breaking up _run_single_deploy (CCN 77, 338 lines): first lift lines 265-285

    src/prefect/cli/deploy/_core.py:265

    _run_single_deploy nests deeply; easier to read and change once split, which also removes a duplicate; changed 2 times in 90 days.

    gain
    up to +0.7 health on this file(inferred)
    finding
    Nested complexity
    size
    CCN 77, 338 lines, nests 4 deep
    severity
    medium
    worth a check

Improve what Repowise can see

  • Add a test coverage report

    Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.

    line coverage
    Unknown, no report

Everything we found

5 areas