repowisedatacontract/datacontract-cli

datacontract / datacontract-cli

pythonmainde6c0d564.5K linessynced on Sep 15, 2026

Code health

6.2out of 10Fair

Hotspots average 3.9, the place fixes pay off most.

Explore this codebase

Do next · 3

3 things worth doing in the week to Sep 14, the last indexed commit, 1 of them now.

Now

  • High

    Start breaking up to_mermaid (CCN 18, 37 lines): first lift lines 17-54

    datacontract/export/mermaid_exporter.py:17

    to_mermaid nests deeply; easier to read and change once split; its file is imported by 3 files, changed 1 time in 90 days.

    gain
    +1.5 health on this file(inferred)
    health recoverable
    +1.5(inferred)
    size
    CCN 18, 37 lines, nests 8 deep
    steps
    1 (1 mechanical)

Worth planning

  • Start breaking up _to_schema_checks (CCN 47, 278 lines): first lift lines 219-530

    datacontract/engines/checks/create_checks.py:219

    _to_schema_checks has many paths; easier to read and change once split, which also removes a duplicate; function changed in 8 commits; its file is imported by 15 files, changed 22 times in 90 days.

    gain
    up to +0.1 health on this file(inferred)
    finding
    Complex method
    size
    CCN 47, 278 lines, nests 3 deep
    severity
    high
    worth a check
  • Start breaking up to_avro_type (CCN 43, 88 lines): first lift lines 180-187

    datacontract/export/avro_exporter.py:180

    to_avro_type has many paths; easier to read and change once split, which also removes a duplicate; function changed in 4 commits; its file is imported by 4 files, changed 4 times in 90 days.

    gain
    up to +2.0 health on this file(inferred)
    finding
    Complex method
    size
    CCN 43, 88 lines
    severity
    high
    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