diff --git a/causalpy/pymc_experiments.py b/causalpy/pymc_experiments.py index b1b4a55a..2acd064b 100644 --- a/causalpy/pymc_experiments.py +++ b/causalpy/pymc_experiments.py @@ -46,81 +46,73 @@ warnings.simplefilter("always", DeprecationWarning) -class PrePostNEGD(NewPrePostNEGD): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.PrePostNEGD is deprecated and will be removed in a future release. Please use causalpy.experiments.PrePostNEGD instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class DifferenceInDifferences(NewDifferenceInDifferences): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.DifferenceInDifferences is deprecated and will be removed in a future release. Please use causalpy.experiments.DifferenceInDifferences instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class InterruptedTimeSeries(NewInterruptedTimeSeries): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.InterruptedTimeSeries is deprecated and will be removed in a future release. Please use causalpy.experiments.InterruptedTimeSeries instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class SyntheticControl(NewSyntheticControl): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.SyntheticControl is deprecated and will be removed in a future release. Please use causalpy.experiments.SyntheticControl instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class RegressionKink(NewRegressionKink): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.RegressionKink is deprecated and will be removed in a future release. Please use causalpy.experiments.RegressionKink instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class RegressionDiscontinuity(NewRegressionDiscontinuity): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.RegressionDiscontinuity is deprecated and will be removed in a future release. Please use causalpy.experiments.RegressionDiscontinuity instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class InversePropensityWeighting(NewInversePropensityWeighting): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.InversePropensityWeighting is deprecated and will be removed in a future release. Please use causalpy.experiments.InversePropensityWeighting instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) - - -class InstrumentalVariable(NewInstrumentalVariable): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.pymc_experiments.InstrumentalVariable is deprecated and will be removed in a future release. Please use causalpy.experiments.InstrumentalVariable instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) +def PrePostNEGD(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.PrePostNEGD is deprecated and will be removed in a future release. Please use causalpy.experiments.PrePostNEGD instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewPrePostNEGD(*args, **kwargs) + + +def DifferenceInDifferences(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.DifferenceInDifferences is deprecated and will be removed in a future release. Please use causalpy.experiments.DifferenceInDifferences instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewDifferenceInDifferences(*args, **kwargs) + + +def InterruptedTimeSeries(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.InterruptedTimeSeries is deprecated and will be removed in a future release. Please use causalpy.experiments.InterruptedTimeSeries instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewInterruptedTimeSeries(*args, **kwargs) + + +def SyntheticControl(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.SyntheticControl is deprecated and will be removed in a future release. Please use causalpy.experiments.SyntheticControl instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewSyntheticControl(*args, **kwargs) + + +def RegressionKink(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.RegressionKink is deprecated and will be removed in a future release. Please use causalpy.experiments.RegressionKink instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewRegressionKink(*args, **kwargs) + + +def RegressionDiscontinuity(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.RegressionDiscontinuity is deprecated and will be removed in a future release. Please use causalpy.experiments.RegressionDiscontinuity instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewRegressionDiscontinuity(*args, **kwargs) + + +def InversePropensityWeighting(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.InversePropensityWeighting is deprecated and will be removed in a future release. Please use causalpy.experiments.InversePropensityWeighting instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewInversePropensityWeighting(*args, **kwargs) + + +def InstrumentalVariable(*args, **kwargs): + warnings.warn( + """causalpy.pymc_experiments.InstrumentalVariable is deprecated and will be removed in a future release. Please use causalpy.experiments.InstrumentalVariable instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewInstrumentalVariable(*args, **kwargs) diff --git a/causalpy/skl_experiments.py b/causalpy/skl_experiments.py index caa8d259..26d01d0a 100644 --- a/causalpy/skl_experiments.py +++ b/causalpy/skl_experiments.py @@ -38,41 +38,37 @@ warnings.simplefilter("always", DeprecationWarning) -class SyntheticControl(NewSyntheticControl): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.skl_experiments.SyntheticControl is deprecated and will be removed in a future release. Please use causalpy.experiments.SyntheticControl instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) +def SyntheticControl(*args, **kwargs): + warnings.warn( + """causalpy.skl_experiments.SyntheticControl is deprecated and will be removed in a future release. Please use causalpy.experiments.SyntheticControl instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewSyntheticControl(*args, **kwargs) -class DifferenceInDifferences(NewDifferenceInDifferences): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.skl_experiments.DifferenceInDifferences is deprecated and will be removed in a future release. Please use causalpy.experiments.DifferenceInDifferences instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) +def DifferenceInDifferences(*args, **kwargs): + warnings.warn( + """causalpy.skl_experiments.DifferenceInDifferences is deprecated and will be removed in a future release. Please use causalpy.experiments.DifferenceInDifferences instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewDifferenceInDifferences(*args, **kwargs) -class InterruptedTimeSeries(NewInterruptedTimeSeries): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.skl_experiments.InterruptedTimeSeries is deprecated and will be removed in a future release. Please use causalpy.experiments.InterruptedTimeSeries instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) +def InterruptedTimeSeries(*args, **kwargs): + warnings.warn( + """causalpy.skl_experiments.InterruptedTimeSeries is deprecated and will be removed in a future release. Please use causalpy.experiments.InterruptedTimeSeries instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewInterruptedTimeSeries(*args, **kwargs) -class RegressionDiscontinuity(NewRegressionDiscontinuity): - def __init__(self, *args, **kwargs): - warnings.warn( - """causalpy.skl_experiments.RegressionDiscontinuity is deprecated and will be removed in a future release. Please use causalpy.experiments.RegressionDiscontinuity instead.""", - DeprecationWarning, - stacklevel=2, - ) - super().__init__(*args, **kwargs) +def RegressionDiscontinuity(*args, **kwargs): + warnings.warn( + """causalpy.skl_experiments.RegressionDiscontinuity is deprecated and will be removed in a future release. Please use causalpy.experiments.RegressionDiscontinuity instead.""", + DeprecationWarning, + stacklevel=2, + ) + return NewRegressionDiscontinuity(*args, **kwargs) diff --git a/docs/source/_static/classes.png b/docs/source/_static/classes.png index 9827bbcc..ee277186 100644 Binary files a/docs/source/_static/classes.png and b/docs/source/_static/classes.png differ