Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better coverage for linting #148

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
exclude = [
"__init__.py",
"base.py", # XXX to fix
"utils.py", # XXX to fix
"conftest.py",
]
exclude = []

[lint]
select = ["A", "B006", "D", "E", "F", "I", "W", "UP"]
Expand Down Expand Up @@ -37,4 +32,10 @@ ignore-decorators = [
]
"skada/deep/tests/test_*.py" = [
"E402", # Module level import not at top of file
]
"skada/utils.py" = [
"D103", # Seems like ruff's linter bug
]
"skada/base.py" = [
"D101", "D102", # xxx(okachaiev): More work on the documentation is required
]
60 changes: 26 additions & 34 deletions skada/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,52 @@

import sklearn

from .version import __version__ # noqa: F401
from . import model_selection
from . import metrics
from .base import BaseAdapter, PerDomain, Shared, SelectSourceTarget
from . import metrics, model_selection
from ._mapping import (
ClassRegularizerOTMappingAdapter,
CORAL,
ClassRegularizerOTMapping,
ClassRegularizerOTMappingAdapter,
CORALAdapter,
CORAL,
EntropicOTMappingAdapter,
EntropicOTMapping,
LinearOTMappingAdapter,
EntropicOTMappingAdapter,
LinearOTMapping,
MMDLSConSMappingAdapter,
LinearOTMappingAdapter,
MMDLSConSMapping,
OTMappingAdapter,
MMDLSConSMappingAdapter,
OTMapping,
OTMappingAdapter,
)
from ._ot import (
JDOTClassifier,
JDOTRegressor,
solve_jdot_classification,
solve_jdot_regression,
)
from ._pipeline import make_da_pipeline
from ._reweight import (
DiscriminatorReweightDensityAdapter,
KLIEP,
KMM,
DiscriminatorReweightDensity,
GaussianReweightDensityAdapter,
DiscriminatorReweightDensityAdapter,
GaussianReweightDensity,
GaussianReweightDensityAdapter,
KLIEPAdapter,
KLIEP,
KMMAdapter,
KMM,
ReweightDensityAdapter,
ReweightDensity,
MMDTarSReweight,
MMDTarSReweightAdapter,
MMDTarSReweight
ReweightDensity,
ReweightDensityAdapter,
)
from ._self_labeling import DASVMClassifier
from ._subspace import (
SubspaceAlignmentAdapter,
SubspaceAlignment,
TransferComponentAnalysisAdapter,
SubspaceAlignmentAdapter,
TransferComponentAnalysis,
TransferComponentAnalysisAdapter,
)
from ._ot import (
solve_jdot_regression,
JDOTRegressor,
solve_jdot_classification,
JDOTClassifier)
from ._self_labeling import DASVMClassifier
from ._pipeline import make_da_pipeline
from .base import BaseAdapter, PerDomain, SelectSourceTarget, Shared
from .utils import source_target_split

from .version import __version__ # noqa: F401

# make sure that the usage of the library is not possible
# without metadata routing being enabled in the configuration
Expand All @@ -61,12 +60,10 @@
__all__ = [
"metrics",
"model_selection",

"BaseAdapter",
"PerDomain",
"Shared",
"SelectSourceTarget",

"ClassRegularizerOTMappingAdapter",
"ClassRegularizerOTMapping",
"CORALAdapter",
Expand All @@ -79,7 +76,6 @@
"MMDLSConSMapping",
"OTMappingAdapter",
"OTMapping",

"DiscriminatorReweightDensityAdapter",
"DiscriminatorReweightDensity",
"GaussianReweightDensityAdapter",
Expand All @@ -92,19 +88,15 @@
"ReweightDensity",
"MMDTarSReweightAdapter",
"MMDTarSReweight",

"SubspaceAlignmentAdapter",
"SubspaceAlignment",
"TransferComponentAnalysisAdapter",
"TransferComponentAnalysis",

"DASVMClassifier",
"solve_jdot_regression",
"JDOTRegressor",
"solve_jdot_classification",
"JDOTClassifier",

"make_da_pipeline",

"source_target_split",
]
Loading
Loading