microsoft / dowhy
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 367 units with 5,805 lines of code in units (91.0% of code).
    • 5 very long units (590 lines of code)
    • 15 long units (994 lines of code)
    • 66 medium size units (2,047 lines of code)
    • 82 small units (1,191 lines of code)
    • 199 very small units (983 lines of code)
10% | 17% | 35% | 20% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py10% | 17% | 35% | 20% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dowhy/causal_refuters40% | 10% | 39% | 5% | 4%
dowhy6% | 20% | 35% | 21% | 15%
dowhy/causal_estimators9% | 30% | 38% | 9% | 11%
dowhy/causal_identifiers0% | 20% | 28% | 20% | 30%
dowhy/utils0% | 0% | 34% | 33% | 31%
dowhy/interpreters0% | 0% | 59% | 19% | 21%
dowhy/api0% | 0% | 56% | 15% | 27%
dowhy/do_samplers0% | 0% | 9% | 60% | 30%
dowhy/graph_learners0% | 0% | 0% | 82% | 17%
dowhy/data_transformers0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def linear_dataset()
in dowhy/datasets.py
144 48 15
def refute_estimate()
in dowhy/causal_refuters/add_unobserved_common_cause.py
117 19 1
def include_simulated_confounder()
in dowhy/causal_refuters/add_unobserved_common_cause.py
117 23 3
def _estimate_effect()
in dowhy/causal_estimators/distance_matching_estimator.py
106 21 1
def refute_estimate()
in dowhy/causal_refuters/dummy_outcome_refuter.py
106 9 1
def refute_estimate()
in dowhy/causal_refuters/placebo_treatment_refuter.py
89 11 1
def _estimate_effect()
in dowhy/causal_estimators/propensity_score_weighting_estimator.py
88 9 1
def identify_effect()
in dowhy/causal_identifiers/id_identifier.py
82 24 5
def estimate_effect()
in dowhy/causal_model.py
81 15 12
def _estimate_effect()
in dowhy/causal_estimators/two_stage_regression_estimator.py
73 7 1
def __init__()
in dowhy/causal_graph.py
67 17 10
def _estimate_effect()
in dowhy/causal_estimators/propensity_score_stratification_estimator.py
66 19 1
def identify_ate_effect()
in dowhy/causal_identifier.py
66 8 2
def xy_dataset()
in dowhy/datasets.py
61 8 5
def _estimate_effect()
in dowhy/causal_estimators/econml.py
58 15 1
def _estimate_effect()
in dowhy/causal_estimators/propensity_score_matching_estimator.py
54 10 1
def identify_backdoor()
in dowhy/causal_identifier.py
54 15 5
def __init__()
in dowhy/causal_estimator.py
52 20 13
def __init__()
in dowhy/causal_model.py
52 6 13
def simple_iv_dataset()
in dowhy/datasets.py
51 10 5