Skip to content

Commit

Permalink
refactor: made whittaker_base a private utility
Browse files Browse the repository at this point in the history
  • Loading branch information
MothNik committed May 20, 2024
1 parent c408040 commit 0699a7c
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion chemotools/baseline/_air_pls.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from sklearn.utils.validation import check_is_fitted

from chemotools.utils.check_inputs import check_input
from chemotools.utils.whittaker_base import WhittakerLikeSolver
from chemotools.utils._whittaker_base import WhittakerLikeSolver

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion chemotools/baseline/_ar_pls.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from sklearn.utils.validation import check_is_fitted, check_scalar

from chemotools.utils.check_inputs import check_input
from chemotools.utils.whittaker_base import WhittakerLikeSolver
from chemotools.utils._whittaker_base import WhittakerLikeSolver

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion chemotools/smooth/_whittaker_smooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from chemotools.utils.check_inputs import check_input, check_weights
from chemotools.utils.types import RealNumeric
from chemotools.utils.whittaker_base import (
from chemotools.utils._whittaker_base import (
WhittakerLikeSolver,
WhittakerSmoothLambda,
WhittakerSmoothMethods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
WhittakerSmoothLambda,
WhittakerSmoothMethods,
)
from chemotools.utils.whittaker_base.main import WhittakerLikeSolver # noqa: F401
from chemotools.utils._whittaker_base.main import WhittakerLikeSolver # noqa: F401
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ class implementation.

### Imports ###

from chemotools.utils.whittaker_base.auto_lambda.logml import ( # noqa: F401
from chemotools.utils._whittaker_base.auto_lambda.logml import ( # noqa: F401
get_log_marginal_likelihood,
get_log_marginal_likelihood_constant_term,
)
from chemotools.utils.whittaker_base.auto_lambda.optimization import ( # noqa: F401
from chemotools.utils._whittaker_base.auto_lambda.optimization import ( # noqa: F401
get_optimized_lambda,
)
from chemotools.utils.whittaker_base.auto_lambda.shared import ( # noqa: F401
from chemotools.utils._whittaker_base.auto_lambda.shared import ( # noqa: F401
_Factorization,
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from chemotools.utils import banded_linalg as bla
from chemotools.utils import models
from chemotools.utils.whittaker_base.auto_lambda.shared import get_smooth_wrss
from chemotools.utils._whittaker_base.auto_lambda.shared import get_smooth_wrss

### Constants ###

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
from chemotools._runtime import PENTAPY_AVAILABLE
from chemotools.utils import models
from chemotools.utils.banded_linalg import LAndUBandCounts
from chemotools.utils.whittaker_base import auto_lambda as auto
from chemotools.utils.whittaker_base import initialisation as init
from chemotools.utils.whittaker_base import solvers
from chemotools.utils.whittaker_base.misc import get_weight_generator
from chemotools.utils._whittaker_base import auto_lambda as auto
from chemotools.utils._whittaker_base import initialisation as init
from chemotools.utils._whittaker_base import solvers
from chemotools.utils._whittaker_base.misc import get_weight_generator

### Class Implementation ###

Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions tests/test_for_utils/test_whittaker_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
import pytest

from chemotools.utils import models
from chemotools.utils.whittaker_base.auto_lambda.shared import get_smooth_wrss
from chemotools.utils.whittaker_base.initialisation import (
from chemotools.utils._whittaker_base.auto_lambda.shared import get_smooth_wrss
from chemotools.utils._whittaker_base.initialisation import (
get_checked_lambda,
get_penalty_log_pseudo_det,
)
from chemotools.utils.whittaker_base.main import WhittakerLikeSolver
from chemotools.utils.whittaker_base.misc import get_weight_generator
from chemotools.utils.whittaker_base.solvers import solve_normal_equations
from chemotools.utils._whittaker_base.main import WhittakerLikeSolver
from chemotools.utils._whittaker_base.misc import get_weight_generator
from chemotools.utils._whittaker_base.solvers import solve_normal_equations
from tests.fixtures import noise_level_whittaker_auto_lambda # noqa: F401
from tests.fixtures import spectrum_whittaker_auto_lambda # noqa: F401
from tests.test_for_utils.utils_funcs import (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_for_utils/utils_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from scipy.sparse import linalg as spla

from chemotools.utils.finite_differences import calc_forward_diff_kernel
from chemotools.utils.whittaker_base import WhittakerLikeSolver
from chemotools.utils._whittaker_base import WhittakerLikeSolver

### Utility Functions ###

Expand Down

0 comments on commit 0699a7c

Please sign in to comment.