repowisepgmpy/pgmpy

Code health of pgmpy/pgmpy

Repowise scores pgmpy/pgmpy at 6.2 out of 10 for code health, which reads as fair, alongside maintainability 8.0 and static performance 9.9 on the same scale. There are 1,130 open findings across the three pillars, and the lowest-scoring file is _base.py at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

65 critical, 264 high, 298 medium, 378 low.

Hotspots

46 files are flagged as hotspots. The top 5:

  • pgmpy/base/DAG.py: 4 commits in the last 90 days from 33 contributors with 3 recent bug fixes
  • pgmpy/estimators/ExpertKnowledge.py: 3 commits in the last 90 days from 8 contributors with 1 recent bug fix
  • pgmpy/causal_discovery/PC.py: 6 commits in the last 90 days from 8 contributors with 2 recent bug fixes
  • pgmpy/causal_discovery/_base.py: 7 commits in the last 90 days from 9 contributors with 4 recent bug fixes
  • pgmpy/estimators/GES.py: 4 commits in the last 90 days from 13 contributors with 4 recent bug fixes

Lowest-scoring files

  • pgmpy/causal_discovery/_base.py: 1.0 out of 10 with 4 bug fixes in the last 180 days
  • pgmpy/factors/discrete/DiscreteFactor.py: 1.0 out of 10 with 3 bug fixes in the last 180 days
  • pgmpy/datasets/_base.py: 1.7 out of 10 with 3 bug fixes in the last 180 days
  • pgmpy/inference/CausalInference.py: 1.8 out of 10 with 2 bug fixes in the last 180 days
  • pgmpy/base/_base.py: 2.0 out of 10 with 2 bug fixes in the last 180 days

Checked against bug fixes

Of the 20 files Repowise scores lowest, 19 had a bug fix in the last 180 days. Across all 672 scored files, 34.4% had a bug fix in that window.

Dead code and refactoring

Repowise found 316 unused exports. 62 refactoring targets across 62 files would raise the score.

More on pgmpy: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language