Skip to content

Commit

Permalink
change deprecated method setup -> setup_method, as CI fails in PR #29
Browse files Browse the repository at this point in the history
  • Loading branch information
sibirrer committed Jan 28, 2024
1 parent 7472d42 commit 3ae7cd8
Show file tree
Hide file tree
Showing 38 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion test/test_Diagnostics/test_goodness_of_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class TestGoodnessOfFit(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
z_lens = 0.8
z_source = 3.0
Expand Down
2 changes: 1 addition & 1 deletion test/test_LensPosterior/test_anisotropy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class TestAnisotropyConfig(object):
def setup(self):
def setup_method(self):
self.r_eff = 2
self.config_om = AnisotropyConfig(anisotropy_model="OM", r_eff=self.r_eff)
self.config_gom = AnisotropyConfig(anisotropy_model="GOM", r_eff=self.r_eff)
Expand Down
2 changes: 1 addition & 1 deletion test/test_LensPosterior/test_ddt_kin_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class TestDdtKinGaussConstraints(object):
def setup(self):
def setup_method(self):
pass

def test_likelihoodconfiguration_om(self):
Expand Down
2 changes: 1 addition & 1 deletion test/test_LensPosterior/test_ddt_kin_gauss_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class TestDdtKinGaussConstraints(object):
def setup(self):
def setup_method(self):
pass

def test_likelihoodconfiguration_om(self):
Expand Down
2 changes: 1 addition & 1 deletion test/test_LensPosterior/test_kin_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestKinConstraints(object):
def setup(self):
def setup_method(self):
pass

def test_likelihoodconfiguration_om(self):
Expand Down
4 changes: 2 additions & 2 deletions test/test_LensPosterior/test_kin_constraints_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class TestKinConstraintsComposite(object):
def setup(self):
def setup_method(self):
pass

def test_likelihoodconfiguration_om(self):
Expand Down Expand Up @@ -260,7 +260,7 @@ def test_likelihoodconfiguration_gom(self):


class TestKinConstraintsCompositeM2l(object):
def setup(self):
def setup_method(self):
pass

def test_likelihoodconfiguration_om(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


class TestKDELikelihood(object):
def setup(self):
def setup_method(self):
self.cosmo_params = ["h0", "om"]
self.cosmology = "FLCDM"
self.chain = import_Planck_chain(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestLensLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_lens = 0.8
self.z_source = 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestDdtDdGaussianLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_lens = 0.8
self.z_source = 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class TestDdtDdKDELikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_L = 0.8
self.z_S = 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class TestDdtGaussKinLikelihood(object):
def setup(self):
def setup_method(self):
self.z_lens = 0.8
self.z_source = 3.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestDdtDdGaussianLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_lens = 0.8
self.z_source = 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class TestDdtHistKinHist(object):
def setup(self):
def setup_method(self):
self._ddt, self._dd = 2000.0, 1000.0

self._sigma = 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class TestTDLikelihoodLogNorm(object):
def setup(self):
def setup_method(self):
self.z_L = 0.8
self.z_S = 3.0
self.ddt_mu = 3.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class TestDSPLikelihood(object):
""""""

def setup(self):
def setup_method(self):
self.cosmo = FlatLambdaCDM(H0=70, Om0=0.3, Ob0=0.05)
self.zl = 0.5
self.zs1 = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestDdtDdGaussianLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_lens = 0.8
self.z_source = 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestKinLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)

def test_log_likelihood(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class TestMagnificationLikelihood(object):
def setup(self):
def setup_method(self):
pass

def test_log_likelihood(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestMagnificationLikelihood(object):
def setup(self):
def setup_method(self):
pass

def test_log_likelihood(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class TestMagnificationLikelihood(object):
def setup(self):
def setup_method(self):
pass

def test_log_likelihood(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestPantheonPlusData(object):
def setup(self):
def setup_method(self):
pass

def test_import(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestSnePantheon(object):
def setup(self):
def setup_method(self):
np.random.seed(42)
# define redshifts
num = 30 # number of Sne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestCustomSneLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(42)
# define redshifts
num = 30 # number of Sne
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class TestSneLikelihoodFromFile(object):
def setup(self):
def setup_method(self):
self.pantheon_binned_likelihood = SneLikelihoodFromFile(
sample_name="Pantheon_binned"
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_Likelihood/test_cosmo_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class TestCosmoLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_L = 0.8
self.z_S = 3.0
Expand Down
2 changes: 1 addition & 1 deletion test/test_Likelihood/test_hierarchy_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestLensLikelihood(object):
def setup(self):
def setup_method(self):
z_lens = 0.5
z_source = 1.5
self.cosmo = FlatLambdaCDM(H0=70, Om0=0.3, Ob0=0.05)
Expand Down
2 changes: 1 addition & 1 deletion test/test_Likelihood/test_lens_sample_likelihood.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


class TestLensLikelihood(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_L = 0.8
self.z_S = 3.0
Expand Down
4 changes: 2 additions & 2 deletions test/test_Likelihood/test_parameter_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class TestParameterScalingSingleAperture(object):
def setup(self):
def setup_method(self):
ani_param_array = np.linspace(start=0, stop=1, num=10)
param_scaling_array = ani_param_array * 2
self.scaling = ParameterScalingSingleAperture(
Expand Down Expand Up @@ -77,7 +77,7 @@ def test_param_scaling(self):


class TestParameterScalingIFU(object):
def setup(self):
def setup_method(self):
ani_param_array = np.linspace(start=0, stop=1, num=10)
param_scaling_array = ani_param_array * 2
self.scaling = ParameterScalingIFU(
Expand Down
2 changes: 1 addition & 1 deletion test/test_Likelihood/test_transform_cosmography.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestTransformedCoismography(object):
def setup(self):
def setup_method(self):
z_lens = 0.5
z_source = 1.5
self.transform = TransformedCosmography(z_lens=z_lens, z_source=z_source)
Expand Down
2 changes: 1 addition & 1 deletion test/test_Sampling/test_ParamManager/test_cosmo_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestCosmoParamFLCDM(object):
def setup(self):
def setup_method(self):
cosmology_list = ["FLCDM", "FwCDM", "w0waCDM", "oLCDM", "NONE"]
kwargs_fixed = {
"h0": 70,
Expand Down
2 changes: 1 addition & 1 deletion test/test_Sampling/test_ParamManager/test_kin_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class TestKinParam(object):
def setup(self):
def setup_method(self):
self._param = KinParam(
anisotropy_sampling=True,
anisotropy_model="GOM",
Expand Down
4 changes: 2 additions & 2 deletions test/test_Sampling/test_ParamManager/test_lens_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


class TestLensParam(object):
def setup(self):
def setup_method(self):
self._param = LensParam(
lambda_mst_sampling=True,
lambda_mst_distribution="GAUSSIAN",
Expand Down Expand Up @@ -94,7 +94,7 @@ def test_args2kwargs(self):


class TestLensParamGammaInnerM2l(object):
def setup(self):
def setup_method(self):
self._param = LensParam(
gamma_in_sampling=True,
gamma_in_distribution="GAUSSIAN",
Expand Down
2 changes: 1 addition & 1 deletion test/test_Sampling/test_ParamManager/test_param_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestParamManager(object):
def setup(self):
def setup_method(self):
cosmology_list = ["FLCDM", "FwCDM", "w0waCDM", "oLCDM"]
kwargs_lower_cosmo = {
"h0": 10,
Expand Down
2 changes: 1 addition & 1 deletion test/test_Sampling/test_ParamManager/test_source_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestSourceParam(object):
def setup(self):
def setup_method(self):
self._param = SourceParam(
sne_distribution="GAUSSIAN", sne_apparent_m_sampling=True, kwargs_fixed=None
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_Sampling/test_mcmc_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


class TestMCMCSampling(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=41)
self.z_L = 0.8
self.z_S = 3.0
Expand Down
2 changes: 1 addition & 1 deletion test/test_Util/test_distribution_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestProbDensity(object):
def setup(self):
def setup_method(self):
np.random.seed(seed=42)

def gauss(self, x, simga):
Expand Down
2 changes: 1 addition & 1 deletion test/test_Util/test_ifu_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestIFUUtil(object):
def setup(self):
def setup_method(self):
pass

def test_radial_dispersion(self):
Expand Down
2 changes: 1 addition & 1 deletion test/test_Util/test_likelihood_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class TestLikelihoodUtil(object):
def setup(self):
def setup_method(self):
pass

def test_get_truncated_normal(self):
Expand Down

0 comments on commit 3ae7cd8

Please sign in to comment.