scikit-base 0.4.6__py3-none-any.whl → 0.5.1__py3-none-any.whl

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.
Files changed (60) hide show
  1. docs/source/conf.py +299 -299
  2. {scikit_base-0.4.6.dist-info → scikit_base-0.5.1.dist-info}/LICENSE +29 -29
  3. {scikit_base-0.4.6.dist-info → scikit_base-0.5.1.dist-info}/METADATA +160 -159
  4. scikit_base-0.5.1.dist-info/RECORD +58 -0
  5. {scikit_base-0.4.6.dist-info → scikit_base-0.5.1.dist-info}/WHEEL +1 -1
  6. scikit_base-0.5.1.dist-info/top_level.txt +5 -0
  7. {scikit_base-0.4.6.dist-info → scikit_base-0.5.1.dist-info}/zip-safe +1 -1
  8. skbase/__init__.py +14 -14
  9. skbase/_exceptions.py +31 -31
  10. skbase/_nopytest_tests.py +35 -35
  11. skbase/base/__init__.py +20 -20
  12. skbase/base/_base.py +1249 -1249
  13. skbase/base/_meta.py +883 -871
  14. skbase/base/_pretty_printing/__init__.py +11 -11
  15. skbase/base/_pretty_printing/_object_html_repr.py +392 -392
  16. skbase/base/_pretty_printing/_pprint.py +412 -412
  17. skbase/base/_tagmanager.py +217 -217
  18. skbase/lookup/__init__.py +31 -31
  19. skbase/lookup/_lookup.py +1009 -1009
  20. skbase/lookup/tests/__init__.py +2 -2
  21. skbase/lookup/tests/test_lookup.py +991 -991
  22. skbase/testing/__init__.py +12 -12
  23. skbase/testing/test_all_objects.py +852 -856
  24. skbase/testing/utils/__init__.py +5 -5
  25. skbase/testing/utils/_conditional_fixtures.py +209 -209
  26. skbase/testing/utils/_dependencies.py +15 -15
  27. skbase/testing/utils/deep_equals.py +15 -15
  28. skbase/testing/utils/inspect.py +30 -30
  29. skbase/testing/utils/tests/__init__.py +2 -2
  30. skbase/testing/utils/tests/test_check_dependencies.py +49 -49
  31. skbase/testing/utils/tests/test_deep_equals.py +66 -66
  32. skbase/tests/__init__.py +2 -2
  33. skbase/tests/conftest.py +273 -273
  34. skbase/tests/mock_package/__init__.py +5 -5
  35. skbase/tests/mock_package/test_mock_package.py +74 -74
  36. skbase/tests/test_base.py +1202 -1202
  37. skbase/tests/test_baseestimator.py +130 -130
  38. skbase/tests/test_exceptions.py +23 -23
  39. skbase/tests/test_meta.py +170 -131
  40. skbase/utils/__init__.py +21 -21
  41. skbase/utils/_check.py +53 -53
  42. skbase/utils/_iter.py +238 -238
  43. skbase/utils/_nested_iter.py +180 -180
  44. skbase/utils/_utils.py +91 -91
  45. skbase/utils/deep_equals.py +358 -358
  46. skbase/utils/dependencies/__init__.py +11 -11
  47. skbase/utils/dependencies/_dependencies.py +253 -253
  48. skbase/utils/tests/__init__.py +4 -4
  49. skbase/utils/tests/test_check.py +24 -24
  50. skbase/utils/tests/test_iter.py +127 -127
  51. skbase/utils/tests/test_nested_iter.py +84 -84
  52. skbase/utils/tests/test_utils.py +37 -37
  53. skbase/validate/__init__.py +22 -22
  54. skbase/validate/_named_objects.py +403 -403
  55. skbase/validate/_types.py +345 -345
  56. skbase/validate/tests/__init__.py +2 -2
  57. skbase/validate/tests/test_iterable_named_objects.py +200 -200
  58. skbase/validate/tests/test_type_validations.py +370 -370
  59. scikit_base-0.4.6.dist-info/RECORD +0 -58
  60. scikit_base-0.4.6.dist-info/top_level.txt +0 -2
@@ -1,74 +1,74 @@
1
- # -*- coding: utf-8 -*-
2
- """Mock package for testing skbase functionality."""
3
- from copy import deepcopy
4
- from typing import List
5
-
6
- from skbase.base import BaseObject
7
-
8
- __all__: List[str] = [
9
- "CompositionDummy",
10
- "InheritsFromBaseObject",
11
- "AnotherClass",
12
- "NotABaseObject",
13
- ]
14
- __author__: List[str] = ["fkiraly", "RNKuhns"]
15
-
16
-
17
- class CompositionDummy(BaseObject):
18
- """Potentially composite object, for testing."""
19
-
20
- def __init__(self, foo, bar=84):
21
- self.foo = foo
22
- self.foo_ = deepcopy(foo)
23
- self.bar = bar
24
-
25
- super(CompositionDummy, self).__init__()
26
-
27
- @classmethod
28
- def get_test_params(cls, parameter_set="default"):
29
- """Return testing parameter settings for the estimator.
30
-
31
- Parameters
32
- ----------
33
- parameter_set : str, default="default"
34
- Name of the set of test parameters to return, for use in tests. If no
35
- special parameters are defined for a value, will return `"default"` set.
36
-
37
- Returns
38
- -------
39
- params : dict or list of dict, default = {}
40
- Parameters to create testing instances of the class
41
- Each dict are parameters to construct an "interesting" test instance, i.e.,
42
- `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
43
- `create_test_instance` uses the first (or only) dictionary in `params`
44
- """
45
- params1 = {"foo": 42}
46
- params2 = {"foo": CompositionDummy(126)}
47
- return [params1, params2]
48
-
49
-
50
- class InheritsFromBaseObject(BaseObject):
51
- """A class inheriting from BaseObject."""
52
-
53
-
54
- class AnotherClass(BaseObject):
55
- """Another class inheritting from BaseObject."""
56
-
57
-
58
- class NotABaseObject:
59
- """A class that is not a BaseObject."""
60
-
61
- def __init__(self, a=7):
62
- self.a = a
63
-
64
-
65
- class _NonPublicClass(BaseObject):
66
- """A nonpublic class inheritting from BaseObject."""
67
-
68
-
69
- MOCK_PACKAGE_OBJECTS = [
70
- AnotherClass,
71
- CompositionDummy,
72
- InheritsFromBaseObject,
73
- _NonPublicClass,
74
- ]
1
+ # -*- coding: utf-8 -*-
2
+ """Mock package for testing skbase functionality."""
3
+ from copy import deepcopy
4
+ from typing import List
5
+
6
+ from skbase.base import BaseObject
7
+
8
+ __all__: List[str] = [
9
+ "CompositionDummy",
10
+ "InheritsFromBaseObject",
11
+ "AnotherClass",
12
+ "NotABaseObject",
13
+ ]
14
+ __author__: List[str] = ["fkiraly", "RNKuhns"]
15
+
16
+
17
+ class CompositionDummy(BaseObject):
18
+ """Potentially composite object, for testing."""
19
+
20
+ def __init__(self, foo, bar=84):
21
+ self.foo = foo
22
+ self.foo_ = deepcopy(foo)
23
+ self.bar = bar
24
+
25
+ super(CompositionDummy, self).__init__()
26
+
27
+ @classmethod
28
+ def get_test_params(cls, parameter_set="default"):
29
+ """Return testing parameter settings for the estimator.
30
+
31
+ Parameters
32
+ ----------
33
+ parameter_set : str, default="default"
34
+ Name of the set of test parameters to return, for use in tests. If no
35
+ special parameters are defined for a value, will return `"default"` set.
36
+
37
+ Returns
38
+ -------
39
+ params : dict or list of dict, default = {}
40
+ Parameters to create testing instances of the class
41
+ Each dict are parameters to construct an "interesting" test instance, i.e.,
42
+ `MyClass(**params)` or `MyClass(**params[i])` creates a valid test instance.
43
+ `create_test_instance` uses the first (or only) dictionary in `params`
44
+ """
45
+ params1 = {"foo": 42}
46
+ params2 = {"foo": CompositionDummy(126)}
47
+ return [params1, params2]
48
+
49
+
50
+ class InheritsFromBaseObject(BaseObject):
51
+ """A class inheriting from BaseObject."""
52
+
53
+
54
+ class AnotherClass(BaseObject):
55
+ """Another class inheritting from BaseObject."""
56
+
57
+
58
+ class NotABaseObject:
59
+ """A class that is not a BaseObject."""
60
+
61
+ def __init__(self, a=7):
62
+ self.a = a
63
+
64
+
65
+ class _NonPublicClass(BaseObject):
66
+ """A nonpublic class inheritting from BaseObject."""
67
+
68
+
69
+ MOCK_PACKAGE_OBJECTS = [
70
+ AnotherClass,
71
+ CompositionDummy,
72
+ InheritsFromBaseObject,
73
+ _NonPublicClass,
74
+ ]