defeat-beta / defeatbeta-api
Code health
This codebase scores 6.8 out of 10 for code health, which we rate fair. It also scores maintainability 7.5 and static performance 9.2 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 3 of 166 files are git hotspots, and they average 1.1 — which is where the fixes pay off most.
Do next
1 suggested
1 thing worth doing in the week to Jul 14, the last indexed commit.
Worth planning
Start breaking up dcf_data (CCN 54, 301 lines): first lift lines 2016-2033
defeatbeta_api/data/ticker.py:2016
dcf_data nests deeply; easier to read and change once split, which also removes a duplicate; its file is imported by 6 files, changed 8 times in 90 days.
- gain
- up to +0.3 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 54, 301 lines, nests 6 deep
- 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
- Lines of code
- 30.5K
Recent activity
All commitsCommits
- 00296dd9Add bilingual earnings preview PDF templates3mo ago
- 5a76af3edocs: update README — Windows is supported natively since v0.0.604mo ago
- c6509742feat: support Windows platform by upgrading duckdb to 1.5.34mo ago
- 0b96a390fix test case4mo ago
- 5050ad8dfix: parse ISO 8601 data update_time in beta()4mo ago
- 7a68eb2aRewrite revenue breakdown for quarterly and trailing data4mo ago
Decisions
- Memoize transcript metadata list; rely on DuckDB httpfs cache for transcript bodiesproposed · 3mo ago
- Lazy-load transcripts paragraphs via two SQL pathsproposed · 3mo ago
- Memoize news metadata list; rely on DuckDB httpfs cache for article bodiesproposed · 3mo ago
- Lazy-load news paragraphs via two SQL pathsproposed · 3mo ago
- Add Industry ROIC and fix single-stock ROIC consistencyproposed · 3mo ago
- Align peg_ratio metric with industry standard and adjust edge-case handlingproposed · 3mo ago
Everything we found
342 open
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.
- worst item is critical severity. Code health207Change entropy · defeatbeta_api/data/ticker.py64 findings · 9.2 deducted
- worst item is low severity. Refactoring26visit_row+0.8 health, S effort · defeatbeta_api/data/print_visitor.py
- worst item is medium severity. Decisions16defeatbeta_api/data/ticker.py13 awaiting review · 3 hotspots ungoverned
- worst item is medium severity. Ownership84defeatbeta_api/__version__.py100% single-owner concentration, 8 commits in 90d
- worst item is low severity. Dead code9defeatbeta_api/data/cash_flow.pyUnreachable symbol (50 lines)
Composition
Open the graph- python97%
- shell3%
Explore this codebase
- Docs0 pages across 4 modules
- ChatAsk this codebase a question and get an answer with its sources.
- Files166 files with per-file docs, health and history
- ArchitectureDependency graph, layers, and 3 entry points
- Code healthPer-file scores, 159 open findings, coverage and refactoring targets
- Knowledge graphEntities, communities, and the paths between them
- Change couplingFiles that keep changing together, mined from commit history
- CommitsChange-risk ranked history with agent provenance
- ContributorsBus factor, per-file maintainers, and the human/agent split
- StatsSize class, origin, lifetime churn, rhythm and records
- CostsWhat indexing this snapshot cost, by model and by run.