datacontract / datacontract-cli
Code health
Hotspots average 3.9, the place fixes pay off most.
Explore this codebase
- Code health map40hotspots across 617 files
- Ownership191sole-owned files: one author, no second reader
- Architecture6modules, 5 entry points
- Decisions33recorded, of which 0 in force and 33 background
- Refactoring73open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
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)
Small effort
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
Medium effort, worth a checkStart 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
Medium effort, 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
Small effort
Everything we found
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health1,791 open findingsCriticalDeep nesting · datacontract/export/excel_exporter.py53 findings · 8.0 deducted
- Refactoring73 open opportunitiesMediumdetect+1.5 health, S effort · datacontract/breaking/detector.py
- Decisions0 drifting from the codeMediumtests/test_dbt_sync.pyHigh-churn file with no governing decision
- Ownership191 sole-owned filesMediumdatacontract/config/settings.pyOne author, no second reader
- Dead code4LowLayoutWrapperUnreachable function (45 lines)