From 2d2f5347a619d6f240da682c64d85b730daa9522 Mon Sep 17 00:00:00 2001 From: Michael Osthege Date: Wed, 15 Apr 2026 17:51:47 +0200 Subject: [PATCH] Remove deprecated kwargs --- calibr8/core.py | 12 ------------ calibr8/test_all.py | 3 --- 2 files changed, 15 deletions(-) diff --git a/calibr8/core.py b/calibr8/core.py index 1f7c041..2640818 100644 --- a/calibr8/core.py +++ b/calibr8/core.py @@ -482,8 +482,6 @@ def loglikelihood( y, x, name: Optional[str] = None, - replicate_id: Optional[str] = None, - dependent_key: Optional[str] = None, theta=None, **dist_kwargs, ): @@ -503,10 +501,6 @@ def loglikelihood( name : str Name for the likelihood variable in a PyMC model (tensor mode). Previously this was `f'{replicate_id}.{dependent_key}'`. - replicate_id : optional, str - Deprecated; pass the `name` kwarg instead. - dependent_key : optional, str - Deprecated; pass the `name` kwarg instead. theta : optional, array-like Parameters for the calibration model to use instead of `theta_fitted`. The vector must have the correct length, but can have numeric and or symbolic entries. @@ -540,12 +534,6 @@ def loglikelihood( pmodel = pm.Model.get_context(error_if_none=False) if pmodel is not None: - if replicate_id and dependent_key: - warnings.warn( - "The `replicate_id` and `dependent_key` parameters are deprecated. Use `name` instead.", - DeprecationWarning, - ) - name = f"{replicate_id}.{dependent_key}" if not name: raise ValueError("A `name` must be specified for the PyMC likelihood.") rv = self.pymc_dist(name, **self.to_pymc(*params), observed=y, **dist_kwargs or {}) diff --git a/calibr8/test_all.py b/calibr8/test_all.py index 3d286b3..373123a 100644 --- a/calibr8/test_all.py +++ b/calibr8/test_all.py @@ -474,9 +474,6 @@ def test_symbolic_loglikelihood_checks_and_warnings(self): x_hat = pm.Uniform("x_hat", shape=5) with pytest.raises(ValueError, match="`name` must be specified"): cmodel.loglikelihood(x=x_hat, y=y_obs) - - with pytest.warns(DeprecationWarning, match="Use `name` instead"): - cmodel.loglikelihood(x=x_hat, y=y_obs, replicate_id="A01", dependent_key="A") pass @pytest.mark.skipif(not HAS_PYMC, reason="requires PyMC")