scikit-base 1.0.2__tar.gz → 1.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scikit_base-1.0.2/scikit_base.egg-info → scikit_base-1.1.1}/PKG-INFO +2 -2
- {scikit_base-1.0.2 → scikit_base-1.1.1}/README.md +1 -1
- {scikit_base-1.0.2 → scikit_base-1.1.1}/pyproject.toml +3 -7
- {scikit_base-1.0.2 → scikit_base-1.1.1/scikit_base.egg-info}/PKG-INFO +2 -2
- {scikit_base-1.0.2 → scikit_base-1.1.1}/scikit_base.egg-info/SOURCES.txt +2 -1
- scikit_base-1.1.1/scikit_base.egg-info/top_level.txt +1 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/__init__.py +1 -1
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_base.py +2 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_tagmanager.py +28 -15
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/testing/test_all_objects.py +8 -4
- scikit_base-1.1.1/skbase/testing/tests/__init__.py +2 -0
- scikit_base-1.1.1/skbase/testing/tests/test_quicktester.py +47 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/_import.py +0 -1
- scikit_base-1.0.2/docs/source/conf.py +0 -304
- scikit_base-1.0.2/scikit_base.egg-info/top_level.txt +0 -5
- {scikit_base-1.0.2 → scikit_base-1.1.1}/LICENSE +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/scikit_base.egg-info/dependency_links.txt +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/scikit_base.egg-info/requires.txt +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/scikit_base.egg-info/zip-safe +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/setup.cfg +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/_exceptions.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/_nopytest_tests.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_clone_base.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_clone_plugins.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_meta.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/_object_html_repr.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/_pprint.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/tests/test_object_html_repr.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/tests/test_pprint.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/lookup/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/lookup/_lookup.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/lookup/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/lookup/tests/test_lookup.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/testing/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/testing/utils/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/testing/utils/_conditional_fixtures.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/testing/utils/inspect.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/conftest.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/mock_package/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/mock_package/test_mock_package.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_base.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_baseestimator.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_deep_equals.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_exceptions.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_lookup.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_lookup_metaclasses.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_meta.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/tests/test_tagaliaser.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/_check.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/_nested_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/_utils.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/deep_equals/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/deep_equals/_common.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/deep_equals/_deep_equals.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/_dependencies.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/tests/test_check_dependencies.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/tests/test_safe_import.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/doctest_run.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/git_diff.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/random_state.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/stderr_mute.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/stdout_mute.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_check.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_deep_equals.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_nested_iter.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_random_state.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_std_mute.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/tests/test_utils.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/_named_objects.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/_type_checks.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/tests/__init__.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/tests/test_iterable_named_objects.py +0 -0
- {scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/tests/test_type_validations.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scikit-base
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Base classes for sklearn-like parametric objects
|
|
5
5
|
Author-email: sktime developers <sktime.toolbox@gmail.com>
|
|
6
6
|
Maintainer: Franz Király
|
|
@@ -115,7 +115,7 @@ Dynamic: license-file
|
|
|
115
115
|
`skbase` provides base classes for creating scikit-learn-like parametric objects,
|
|
116
116
|
along with tools to make it easier to build your own packages that follow these design patterns.
|
|
117
117
|
|
|
118
|
-
:rocket: Version 1.
|
|
118
|
+
:rocket: Version 1.1.1 is now available. Check out our
|
|
119
119
|
[release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
|
|
120
120
|
|
|
121
121
|
| Overview | |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`skbase` provides base classes for creating scikit-learn-like parametric objects,
|
|
8
8
|
along with tools to make it easier to build your own packages that follow these design patterns.
|
|
9
9
|
|
|
10
|
-
:rocket: Version 1.
|
|
10
|
+
:rocket: Version 1.1.1 is now available. Check out our
|
|
11
11
|
[release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
|
|
12
12
|
|
|
13
13
|
| Overview | |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "scikit-base"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.1.1"
|
|
4
4
|
description = "Base classes for sklearn-like parametric objects"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "sktime developers", email = "sktime.toolbox@gmail.com"},
|
|
@@ -144,15 +144,11 @@ exclude_dirs = ["*/tests/*", "*/testing/*"]
|
|
|
144
144
|
zip-safe = true
|
|
145
145
|
|
|
146
146
|
[tool.setuptools.package-data]
|
|
147
|
-
|
|
147
|
+
skbase = [
|
|
148
148
|
"*.csv",
|
|
149
149
|
"*.csv.gz",
|
|
150
|
-
"*.arff",
|
|
151
|
-
"*.arff.gz",
|
|
152
150
|
"*.txt",
|
|
153
|
-
"*.ts",
|
|
154
|
-
"*.tsv",
|
|
155
151
|
]
|
|
156
152
|
|
|
157
153
|
[tool.setuptools.packages.find]
|
|
158
|
-
|
|
154
|
+
include = ["skbase", "skbase.*"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scikit-base
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Base classes for sklearn-like parametric objects
|
|
5
5
|
Author-email: sktime developers <sktime.toolbox@gmail.com>
|
|
6
6
|
Maintainer: Franz Király
|
|
@@ -115,7 +115,7 @@ Dynamic: license-file
|
|
|
115
115
|
`skbase` provides base classes for creating scikit-learn-like parametric objects,
|
|
116
116
|
along with tools to make it easier to build your own packages that follow these design patterns.
|
|
117
117
|
|
|
118
|
-
:rocket: Version 1.
|
|
118
|
+
:rocket: Version 1.1.1 is now available. Check out our
|
|
119
119
|
[release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
|
|
120
120
|
|
|
121
121
|
| Overview | |
|
|
@@ -2,7 +2,6 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.cfg
|
|
5
|
-
docs/source/conf.py
|
|
6
5
|
scikit_base.egg-info/PKG-INFO
|
|
7
6
|
scikit_base.egg-info/SOURCES.txt
|
|
8
7
|
scikit_base.egg-info/dependency_links.txt
|
|
@@ -30,6 +29,8 @@ skbase/lookup/tests/__init__.py
|
|
|
30
29
|
skbase/lookup/tests/test_lookup.py
|
|
31
30
|
skbase/testing/__init__.py
|
|
32
31
|
skbase/testing/test_all_objects.py
|
|
32
|
+
skbase/testing/tests/__init__.py
|
|
33
|
+
skbase/testing/tests/test_quicktester.py
|
|
33
34
|
skbase/testing/utils/__init__.py
|
|
34
35
|
skbase/testing/utils/_conditional_fixtures.py
|
|
35
36
|
skbase/testing/utils/inspect.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
skbase
|
|
@@ -58,6 +58,7 @@ import re
|
|
|
58
58
|
import warnings
|
|
59
59
|
from collections import defaultdict
|
|
60
60
|
from copy import deepcopy
|
|
61
|
+
from functools import lru_cache
|
|
61
62
|
from inspect import isclass
|
|
62
63
|
from typing import List
|
|
63
64
|
|
|
@@ -214,6 +215,7 @@ class BaseObject(_FlagManager):
|
|
|
214
215
|
return None
|
|
215
216
|
|
|
216
217
|
@classmethod
|
|
218
|
+
@lru_cache(maxsize=None)
|
|
217
219
|
def _get_init_signature(cls):
|
|
218
220
|
"""Get class init signature.
|
|
219
221
|
|
|
@@ -9,11 +9,30 @@ __all__ = ["_FlagManager"]
|
|
|
9
9
|
|
|
10
10
|
import inspect
|
|
11
11
|
from copy import deepcopy
|
|
12
|
+
from functools import lru_cache
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class _FlagManager:
|
|
15
16
|
"""Mixin class for flag and configuration settings management."""
|
|
16
17
|
|
|
18
|
+
@staticmethod
|
|
19
|
+
@lru_cache(maxsize=None)
|
|
20
|
+
def _collect_class_flags_cached(cls, flag_attr_name):
|
|
21
|
+
"""Walk the MRO once per (cls, flag_attr_name) and cache the result.
|
|
22
|
+
|
|
23
|
+
Returns the dict directly; callers are responsible for copying it
|
|
24
|
+
before handing it out or mutating it, since this is a shared cached
|
|
25
|
+
object.
|
|
26
|
+
"""
|
|
27
|
+
collected_flags = {}
|
|
28
|
+
for parent_class in reversed(inspect.getmro(cls)):
|
|
29
|
+
if parent_class is object:
|
|
30
|
+
continue
|
|
31
|
+
if flag_attr_name in parent_class.__dict__:
|
|
32
|
+
more_flags = parent_class.__dict__[flag_attr_name]
|
|
33
|
+
collected_flags.update(more_flags)
|
|
34
|
+
return collected_flags
|
|
35
|
+
|
|
17
36
|
@classmethod
|
|
18
37
|
def _get_class_flags(cls, flag_attr_name="_flags"):
|
|
19
38
|
"""Get class flags from estimator class and all its parent classes.
|
|
@@ -30,19 +49,10 @@ class _FlagManager:
|
|
|
30
49
|
class attribute via nested inheritance. NOT overridden by dynamic
|
|
31
50
|
flags set by set_flags or clone_flags.
|
|
32
51
|
"""
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
for parent_class in reversed(inspect.getmro(cls)):
|
|
38
|
-
if parent_class is object:
|
|
39
|
-
continue
|
|
40
|
-
if flag_attr_name in parent_class.__dict__:
|
|
41
|
-
# Check own __dict__ to avoid MRO-inherited duplicates
|
|
42
|
-
more_flags = parent_class.__dict__[flag_attr_name]
|
|
43
|
-
collected_flags.update(more_flags)
|
|
44
|
-
|
|
45
|
-
return deepcopy(collected_flags)
|
|
52
|
+
cached = cls._collect_class_flags_cached(cls, flag_attr_name)
|
|
53
|
+
# shallow copy: cheap, and safe because tag values are immutable
|
|
54
|
+
# (they are primitives types bool, etc.)
|
|
55
|
+
return dict(cached)
|
|
46
56
|
|
|
47
57
|
@classmethod
|
|
48
58
|
def _get_class_flag(
|
|
@@ -101,12 +111,15 @@ class _FlagManager:
|
|
|
101
111
|
class attribute via nested inheritance and then any overrides
|
|
102
112
|
and new flags from [flag_attr_name]_dynamic object attribute.
|
|
103
113
|
"""
|
|
104
|
-
|
|
114
|
+
# shallow copy of the cached class-level dict
|
|
115
|
+
collected_flags = dict(
|
|
116
|
+
self._collect_class_flags_cached(type(self), flag_attr_name)
|
|
117
|
+
)
|
|
105
118
|
|
|
106
119
|
if hasattr(self, f"{flag_attr_name}_dynamic"):
|
|
107
120
|
collected_flags.update(getattr(self, f"{flag_attr_name}_dynamic"))
|
|
108
121
|
|
|
109
|
-
return
|
|
122
|
+
return collected_flags
|
|
110
123
|
|
|
111
124
|
def _get_flag(
|
|
112
125
|
self,
|
|
@@ -342,6 +342,7 @@ class QuickTester:
|
|
|
342
342
|
"""
|
|
343
343
|
from _pytest.outcomes import Skipped
|
|
344
344
|
|
|
345
|
+
from skbase.utils.stderr_mute import StderrMute
|
|
345
346
|
from skbase.utils.stdout_mute import StdoutMute
|
|
346
347
|
|
|
347
348
|
tests_to_run = self._check_none_str_or_list_of_str(
|
|
@@ -464,7 +465,10 @@ class QuickTester:
|
|
|
464
465
|
print_if_verbose(f"{key}")
|
|
465
466
|
|
|
466
467
|
try:
|
|
467
|
-
with
|
|
468
|
+
with (
|
|
469
|
+
StdoutMute(active=verbose < 2),
|
|
470
|
+
StderrMute(active=verbose < 2),
|
|
471
|
+
):
|
|
468
472
|
test_fun(**deepcopy(args))
|
|
469
473
|
results[key] = "PASSED"
|
|
470
474
|
print_if_verbose("PASSED")
|
|
@@ -541,7 +545,7 @@ class QuickTester:
|
|
|
541
545
|
obj = [obj]
|
|
542
546
|
if not isinstance(obj, list):
|
|
543
547
|
raise ValueError(msg)
|
|
544
|
-
if not np.all(isinstance(x, str) for x in obj):
|
|
548
|
+
if not np.all([isinstance(x, str) for x in obj]):
|
|
545
549
|
raise ValueError(msg)
|
|
546
550
|
return obj
|
|
547
551
|
|
|
@@ -715,12 +719,12 @@ class TestAllObjects(BaseFixtureGenerator, QuickTester):
|
|
|
715
719
|
f"found {type(names)}"
|
|
716
720
|
)
|
|
717
721
|
|
|
718
|
-
assert np.all(isinstance(est, object_class) for est in objects), (
|
|
722
|
+
assert np.all([isinstance(est, object_class) for est in objects]), (
|
|
719
723
|
"list elements of first return returned by create_test_instances_and_names "
|
|
720
724
|
"all must be an instance of the class"
|
|
721
725
|
)
|
|
722
726
|
|
|
723
|
-
assert np.all(isinstance(name,
|
|
727
|
+
assert np.all([isinstance(name, str) for name in names]), (
|
|
724
728
|
"list elements of second return returned by create_test_instances_and_names"
|
|
725
729
|
" all must be strings"
|
|
726
730
|
)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""Regression tests for QuickTester input checks and output muting."""
|
|
3
|
+
|
|
4
|
+
import sys
|
|
5
|
+
from typing import List
|
|
6
|
+
|
|
7
|
+
import pytest
|
|
8
|
+
|
|
9
|
+
from skbase.testing import BaseFixtureGenerator, QuickTester
|
|
10
|
+
from skbase.tests.conftest import Parent
|
|
11
|
+
|
|
12
|
+
__author__: List[str] = ["yash-sangwan"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class _NoisyTester(BaseFixtureGenerator, QuickTester):
|
|
16
|
+
"""Minimal test class that writes to both output streams."""
|
|
17
|
+
|
|
18
|
+
def test_writes_to_streams(self, object_class):
|
|
19
|
+
"""Write a marker to stdout and to stderr."""
|
|
20
|
+
sys.stdout.write("stdout-marker")
|
|
21
|
+
sys.stderr.write("stderr-marker")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@pytest.mark.parametrize("bad", [42, ["a", 5], {"a": 1}])
|
|
25
|
+
def test_check_none_str_or_list_of_str_rejects_invalid(bad):
|
|
26
|
+
"""Invalid input raises; a generator passed to np.all would never raise."""
|
|
27
|
+
with pytest.raises(ValueError, match="must be None, str, or list of str"):
|
|
28
|
+
QuickTester._check_none_str_or_list_of_str(bad, var_name="x")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@pytest.mark.parametrize(
|
|
32
|
+
"good, expected", [(None, None), ("a", ["a"]), (["a", "b"], ["a", "b"])]
|
|
33
|
+
)
|
|
34
|
+
def test_check_none_str_or_list_of_str_accepts_valid(good, expected):
|
|
35
|
+
"""Valid input is returned, coerced to list of str."""
|
|
36
|
+
assert QuickTester._check_none_str_or_list_of_str(good, var_name="x") == expected
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
@pytest.mark.parametrize("verbose, muted", [(0, True), (2, False)])
|
|
40
|
+
def test_run_tests_mutes_stdout_and_stderr(capsys, verbose, muted):
|
|
41
|
+
"""Both streams are muted below verbose=2, and both are shown at verbose=2."""
|
|
42
|
+
_NoisyTester().run_tests(
|
|
43
|
+
Parent, tests_to_run="test_writes_to_streams", verbose=verbose
|
|
44
|
+
)
|
|
45
|
+
captured = capsys.readouterr()
|
|
46
|
+
assert ("stdout-marker" not in captured.out) is muted
|
|
47
|
+
assert ("stderr-marker" not in captured.err) is muted
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# -*- coding: utf-8 -*-
|
|
3
|
-
# copyright: skbase developers, BSD-3-Clause License (see LICENSE file)
|
|
4
|
-
"""Configure skbase Sphinx documentation."""
|
|
5
|
-
|
|
6
|
-
# -- Path setup --------------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
# If extensions (or modules to document with autodoc) are in another directory,
|
|
9
|
-
# add these directories to sys.path here. If the directory is relative to the
|
|
10
|
-
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
11
|
-
|
|
12
|
-
import datetime
|
|
13
|
-
import inspect
|
|
14
|
-
import os
|
|
15
|
-
import sys
|
|
16
|
-
|
|
17
|
-
import skbase
|
|
18
|
-
|
|
19
|
-
# -- Path setup --------------------------------------------------------------
|
|
20
|
-
|
|
21
|
-
# When we build the docs on readthedocs, we build the package and want to
|
|
22
|
-
# use the built files in order for sphinx to be able to properly read the
|
|
23
|
-
# Cython files. Hence, we do not add the source code path to the system path.
|
|
24
|
-
env_rtd = os.environ.get("READTHEDOCS")
|
|
25
|
-
# Check if on Read the docs
|
|
26
|
-
if not env_rtd == "True":
|
|
27
|
-
print("Not on ReadTheDocs")
|
|
28
|
-
sys.path.insert(0, os.path.abspath("../.."))
|
|
29
|
-
|
|
30
|
-
# -- Project information -----------------------------------------------------
|
|
31
|
-
|
|
32
|
-
current_year = datetime.datetime.now().year
|
|
33
|
-
project = "skbase"
|
|
34
|
-
copyright = f"{current_year} (BSD-3-Clause License)"
|
|
35
|
-
author = "skbase Developers"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# The full version, including alpha/beta/rc tags
|
|
39
|
-
release = skbase.__version__
|
|
40
|
-
|
|
41
|
-
# -- General configuration ---------------------------------------------------
|
|
42
|
-
|
|
43
|
-
# Add any Sphinx extension module names here, as strings. They can be
|
|
44
|
-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
45
|
-
# ones.
|
|
46
|
-
extensions = [
|
|
47
|
-
"sphinx.ext.autodoc",
|
|
48
|
-
"sphinx.ext.autosummary",
|
|
49
|
-
"numpydoc",
|
|
50
|
-
"sphinx.ext.intersphinx",
|
|
51
|
-
"sphinx.ext.linkcode", # link to GitHub source code via linkcode_resolve()
|
|
52
|
-
"nbsphinx", # integrates example notebooks
|
|
53
|
-
"sphinx_gallery.load_style",
|
|
54
|
-
"myst_parser",
|
|
55
|
-
"sphinx_panels",
|
|
56
|
-
"sphinx_issues",
|
|
57
|
-
"sphinx_design",
|
|
58
|
-
]
|
|
59
|
-
|
|
60
|
-
myst_enable_extensions = ["colon_fence"]
|
|
61
|
-
|
|
62
|
-
# -- Internationalization ------------------------------------------------
|
|
63
|
-
# specifying the natural language populates some key tags
|
|
64
|
-
language = "en"
|
|
65
|
-
|
|
66
|
-
# Use bootstrap CSS from theme.
|
|
67
|
-
panels_add_bootstrap_css = False
|
|
68
|
-
|
|
69
|
-
# Add any paths that contain templates here, relative to this directory.
|
|
70
|
-
templates_path = ["_templates"]
|
|
71
|
-
|
|
72
|
-
# The suffix(es) of source filenames.
|
|
73
|
-
# You can specify multiple suffix as a list of string:
|
|
74
|
-
source_suffix = {
|
|
75
|
-
".rst": "restructuredtext",
|
|
76
|
-
".md": "markdown",
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
# The main toctree document.
|
|
80
|
-
master_doc = "index"
|
|
81
|
-
|
|
82
|
-
# List of patterns, relative to source directory, that match files and
|
|
83
|
-
# directories to ignore when looking for source files.
|
|
84
|
-
# This pattern also affects html_static_path and html_extra_path.
|
|
85
|
-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]
|
|
86
|
-
|
|
87
|
-
# add_module_names = False
|
|
88
|
-
|
|
89
|
-
# The name of the Pygments (syntax highlighting) style to use.
|
|
90
|
-
pygments_style = "sphinx"
|
|
91
|
-
|
|
92
|
-
# Members and inherited-members default to showing methods and attributes from
|
|
93
|
-
# a class or those inherited.
|
|
94
|
-
# Member-order orders the documentation in the order of how the members are
|
|
95
|
-
# defined in the source code.
|
|
96
|
-
autodoc_default_options = {
|
|
97
|
-
"members": True,
|
|
98
|
-
"inherited-members": True,
|
|
99
|
-
"member-order": "bysource",
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
103
|
-
add_function_parentheses = False
|
|
104
|
-
|
|
105
|
-
# Link to GitHub repo for github_issues extension
|
|
106
|
-
issues_github_path = "sktime/skbase"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def linkcode_resolve(domain, info):
|
|
110
|
-
"""Return URL to source code corresponding.
|
|
111
|
-
|
|
112
|
-
Parameters
|
|
113
|
-
----------
|
|
114
|
-
domain : str
|
|
115
|
-
info : dict
|
|
116
|
-
|
|
117
|
-
Returns
|
|
118
|
-
-------
|
|
119
|
-
url : str
|
|
120
|
-
"""
|
|
121
|
-
|
|
122
|
-
def find_source():
|
|
123
|
-
# try to find the file and line number, based on code from numpy:
|
|
124
|
-
# https://github.com/numpy/numpy/blob/main/doc/source/conf.py#L286
|
|
125
|
-
obj = sys.modules[info["module"]]
|
|
126
|
-
for part in info["fullname"].split("."):
|
|
127
|
-
obj = getattr(obj, part)
|
|
128
|
-
|
|
129
|
-
fn = inspect.getsourcefile(obj)
|
|
130
|
-
fn = os.path.relpath(fn, start=os.path.dirname(skbase.__file__))
|
|
131
|
-
source, lineno = inspect.getsourcelines(obj)
|
|
132
|
-
return fn, lineno, lineno + len(source) - 1
|
|
133
|
-
|
|
134
|
-
if domain != "py" or not info["module"]:
|
|
135
|
-
return None
|
|
136
|
-
try:
|
|
137
|
-
filename = "skbase/%s#L%d-L%d" % find_source()
|
|
138
|
-
except Exception:
|
|
139
|
-
filename = info["module"].replace(".", "/") + ".py"
|
|
140
|
-
return f"https://github.com/sktime/skbase/blob/{version_match}/{filename}"
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
# -- Options for HTML output -------------------------------------------------
|
|
144
|
-
|
|
145
|
-
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
146
|
-
# a list of builtin themes.
|
|
147
|
-
|
|
148
|
-
html_theme = "pydata_sphinx_theme"
|
|
149
|
-
|
|
150
|
-
# Define the json_url for our version switcher.
|
|
151
|
-
json_url = "https://skbase.readthedocs.io/en/latest/_static/switcher.json"
|
|
152
|
-
|
|
153
|
-
# This uses code from the py-data-sphinx theme's own conf.py
|
|
154
|
-
# Define the version we use for matching in the version switcher.
|
|
155
|
-
version_match = os.environ.get("READTHEDOCS_VERSION")
|
|
156
|
-
|
|
157
|
-
# If READTHEDOCS_VERSION doesn't exist, we're not on RTD
|
|
158
|
-
# If it is an integer, we're in a PR build and the version isn't correct.
|
|
159
|
-
if not version_match or version_match.isdigit():
|
|
160
|
-
# For local development, infer the version to match from the package.
|
|
161
|
-
if "dev" in release or "rc" in release:
|
|
162
|
-
version_match = "latest"
|
|
163
|
-
# We want to keep the relative reference if we are in dev mode
|
|
164
|
-
# but we want the whole url if we are effectively in a released version
|
|
165
|
-
json_url = "_static/switcher.json"
|
|
166
|
-
else:
|
|
167
|
-
version_match = "v" + release
|
|
168
|
-
|
|
169
|
-
html_theme_options = {
|
|
170
|
-
"logo": {
|
|
171
|
-
"text": "skbase",
|
|
172
|
-
"alt_text": "skbase",
|
|
173
|
-
},
|
|
174
|
-
"icon_links": [
|
|
175
|
-
{
|
|
176
|
-
"name": "GitHub",
|
|
177
|
-
"url": "https://github.com/sktime/skbase",
|
|
178
|
-
"icon": "fab fa-github",
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"name": "Discord",
|
|
182
|
-
"url": "https://discord.com/invite/54ACzaFsn7",
|
|
183
|
-
"icon": "fab fa-discord",
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"name": "LinkedIn",
|
|
187
|
-
"url": "https://www.linkedin.com/company/scikit-time/",
|
|
188
|
-
"icon": "fab fa-linkedin",
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"name": "PyPI",
|
|
192
|
-
"url": "https://pypi.org/project/skbase",
|
|
193
|
-
"icon": "fa-solid fa-box",
|
|
194
|
-
},
|
|
195
|
-
],
|
|
196
|
-
"icon_links_label": "Quick Links",
|
|
197
|
-
"show_nav_level": 1,
|
|
198
|
-
"show_prev_next": False,
|
|
199
|
-
"use_edit_page_button": False,
|
|
200
|
-
"navbar_start": ["navbar-logo", "version-switcher"],
|
|
201
|
-
"navbar_center": ["navbar-nav"],
|
|
202
|
-
"switcher": {
|
|
203
|
-
"json_url": json_url,
|
|
204
|
-
"version_match": version_match,
|
|
205
|
-
},
|
|
206
|
-
"header_links_before_dropdown": 6,
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
html_context = {
|
|
210
|
-
"github_user": "sktime",
|
|
211
|
-
"github_repo": "skbase",
|
|
212
|
-
"github_version": "main",
|
|
213
|
-
"doc_path": "docs/source/",
|
|
214
|
-
"default_mode": "light",
|
|
215
|
-
}
|
|
216
|
-
html_sidebars = {"**": ["sidebar-nav-bs.html", "sidebar-ethical-ads.html"]}
|
|
217
|
-
|
|
218
|
-
# Add any paths that contain custom static files (such as style sheets) here,
|
|
219
|
-
# relative to this directory. They are copied after the builtin static files,
|
|
220
|
-
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
221
|
-
html_static_path = ["_static"]
|
|
222
|
-
|
|
223
|
-
# -- Options for HTMLHelp output ---------------------------------------------
|
|
224
|
-
# Output file base name for HTML help builder.
|
|
225
|
-
htmlhelp_basename = "skbasedoc"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
# -- Options for LaTeX output ------------------------------------------------
|
|
229
|
-
# latex_elements = {
|
|
230
|
-
# The paper size ('letterpaper' or 'a4paper').
|
|
231
|
-
# 'papersize': 'letterpaper',
|
|
232
|
-
# The font size ('10pt', '11pt' or '12pt').
|
|
233
|
-
# 'pointsize': '10pt',
|
|
234
|
-
# Additional stuff for the LaTeX preamble.
|
|
235
|
-
# 'preamble': '',
|
|
236
|
-
# Latex figure (float) alignment
|
|
237
|
-
# 'figure_align': 'htbp',
|
|
238
|
-
# }
|
|
239
|
-
|
|
240
|
-
# Grouping the document tree into LaTeX files. List of tuples
|
|
241
|
-
# (source start file, target name, title,
|
|
242
|
-
# author, documentclass [howto, manual, or own class]).
|
|
243
|
-
latex_documents = [
|
|
244
|
-
(
|
|
245
|
-
master_doc,
|
|
246
|
-
"skbase.tex",
|
|
247
|
-
"skbase Documentation",
|
|
248
|
-
"skbase developers",
|
|
249
|
-
"manual",
|
|
250
|
-
),
|
|
251
|
-
]
|
|
252
|
-
|
|
253
|
-
# -- Extension configuration -------------------------------------------------
|
|
254
|
-
|
|
255
|
-
# -- Options for numpydoc extension ------------------------------------------
|
|
256
|
-
# see http://stackoverflow.com/q/12206334/562769
|
|
257
|
-
numpydoc_show_class_members = True
|
|
258
|
-
# this is needed for some reason...
|
|
259
|
-
# see https://github.com/numpy/numpydoc/issues/69
|
|
260
|
-
numpydoc_class_members_toctree = False
|
|
261
|
-
|
|
262
|
-
numpydoc_validation_checks = {"all", "GL01", "SA01", "EX01"}
|
|
263
|
-
|
|
264
|
-
# -- Options for sphinx-copybutton extension----------------------------------
|
|
265
|
-
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
|
|
266
|
-
copybutton_prompt_is_regexp = True
|
|
267
|
-
|
|
268
|
-
# -- Options for nbsphinx extension ------------------------------------------
|
|
269
|
-
nbsphinx_execute = "never" # always # whether to run notebooks
|
|
270
|
-
nbsphinx_allow_errors = False # False
|
|
271
|
-
nbsphinx_timeout = 600 # seconds, set to -1 to disable timeout
|
|
272
|
-
|
|
273
|
-
# add Binder launch button at the top
|
|
274
|
-
current_file = "{{ env.doc2path( env.docname, base=None) }}"
|
|
275
|
-
|
|
276
|
-
# make sure Binder points to latest stable release, not main
|
|
277
|
-
binder_base = "https://mybinder.org/v2/gh//skbase/"
|
|
278
|
-
binder_url = binder_base + f"{version_match}?filepath={current_file}"
|
|
279
|
-
nbsphinx_prolog = f"""
|
|
280
|
-
.. |binder| image:: https://mybinder.org/badge_logo.svg
|
|
281
|
-
.. _Binder: {binder_url}
|
|
282
|
-
|
|
283
|
-
|Binder|_
|
|
284
|
-
"""
|
|
285
|
-
|
|
286
|
-
# add link to original notebook at the bottom
|
|
287
|
-
notebook_url = f"https://github.com/sktime/skbase/tree/{version_match}/{current_file}"
|
|
288
|
-
nbsphinx_epilog = f"""
|
|
289
|
-
----
|
|
290
|
-
|
|
291
|
-
Generated using nbsphinx_. The Jupyter notebook can be found here_.
|
|
292
|
-
|
|
293
|
-
.. _here: {notebook_url}
|
|
294
|
-
.. _nbsphinx: https://nbsphinx.readthedocs.io/
|
|
295
|
-
"""
|
|
296
|
-
|
|
297
|
-
# -- Options for intersphinx extension ---------------------------------------
|
|
298
|
-
|
|
299
|
-
# Example configuration for intersphinx: refer to the Python standard library.
|
|
300
|
-
intersphinx_mapping = {
|
|
301
|
-
"python": ("https://docs.python.org/{.major}".format(sys.version_info), None),
|
|
302
|
-
"scikit-learn": ("https://scikit-learn.org/stable/", None),
|
|
303
|
-
"sktime": ("https://www.sktime.net/en/stable/", None),
|
|
304
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/base/_pretty_printing/tests/test_object_html_repr.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/utils/dependencies/tests/test_check_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scikit_base-1.0.2 → scikit_base-1.1.1}/skbase/validate/tests/test_iterable_named_objects.py
RENAMED
|
File without changes
|
|
File without changes
|