scikit-base 0.8.3__tar.gz → 0.9.0__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.
Files changed (70) hide show
  1. {scikit_base-0.8.3/scikit_base.egg-info → scikit_base-0.9.0}/PKG-INFO +2 -2
  2. {scikit_base-0.8.3 → scikit_base-0.9.0}/README.md +1 -1
  3. {scikit_base-0.8.3 → scikit_base-0.9.0}/pyproject.toml +1 -1
  4. {scikit_base-0.8.3 → scikit_base-0.9.0/scikit_base.egg-info}/PKG-INFO +2 -2
  5. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/__init__.py +1 -1
  6. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/lookup/_lookup.py +5 -35
  7. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/lookup/tests/test_lookup.py +5 -4
  8. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/conftest.py +16 -0
  9. {scikit_base-0.8.3 → scikit_base-0.9.0}/LICENSE +0 -0
  10. {scikit_base-0.8.3 → scikit_base-0.9.0}/docs/source/conf.py +0 -0
  11. {scikit_base-0.8.3 → scikit_base-0.9.0}/scikit_base.egg-info/SOURCES.txt +0 -0
  12. {scikit_base-0.8.3 → scikit_base-0.9.0}/scikit_base.egg-info/dependency_links.txt +0 -0
  13. {scikit_base-0.8.3 → scikit_base-0.9.0}/scikit_base.egg-info/requires.txt +0 -0
  14. {scikit_base-0.8.3 → scikit_base-0.9.0}/scikit_base.egg-info/top_level.txt +0 -0
  15. {scikit_base-0.8.3 → scikit_base-0.9.0}/scikit_base.egg-info/zip-safe +0 -0
  16. {scikit_base-0.8.3 → scikit_base-0.9.0}/setup.cfg +0 -0
  17. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/_exceptions.py +0 -0
  18. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/_nopytest_tests.py +0 -0
  19. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/__init__.py +0 -0
  20. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_base.py +0 -0
  21. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_meta.py +0 -0
  22. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_pretty_printing/__init__.py +0 -0
  23. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_pretty_printing/_object_html_repr.py +0 -0
  24. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_pretty_printing/_pprint.py +0 -0
  25. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_pretty_printing/tests/__init__.py +0 -0
  26. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_pretty_printing/tests/test_pprint.py +0 -0
  27. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/base/_tagmanager.py +0 -0
  28. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/lookup/__init__.py +0 -0
  29. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/lookup/tests/__init__.py +0 -0
  30. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/testing/__init__.py +0 -0
  31. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/testing/test_all_objects.py +0 -0
  32. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/testing/utils/__init__.py +0 -0
  33. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/testing/utils/_conditional_fixtures.py +0 -0
  34. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/testing/utils/inspect.py +0 -0
  35. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/__init__.py +0 -0
  36. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/mock_package/__init__.py +0 -0
  37. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/mock_package/test_mock_package.py +0 -0
  38. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/test_base.py +0 -0
  39. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/test_baseestimator.py +0 -0
  40. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/test_exceptions.py +0 -0
  41. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/tests/test_meta.py +0 -0
  42. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/__init__.py +0 -0
  43. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/_check.py +0 -0
  44. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/_iter.py +0 -0
  45. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/_nested_iter.py +0 -0
  46. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/_utils.py +0 -0
  47. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/deep_equals/__init__.py +0 -0
  48. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/deep_equals/_common.py +0 -0
  49. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/deep_equals/_deep_equals.py +0 -0
  50. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/dependencies/__init__.py +0 -0
  51. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/dependencies/_dependencies.py +0 -0
  52. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/dependencies/tests/__init__.py +0 -0
  53. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/dependencies/tests/test_check_dependencies.py +0 -0
  54. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/random_state.py +0 -0
  55. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/stderr_mute.py +0 -0
  56. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/stdout_mute.py +0 -0
  57. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/__init__.py +0 -0
  58. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_check.py +0 -0
  59. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_deep_equals.py +0 -0
  60. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_iter.py +0 -0
  61. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_nested_iter.py +0 -0
  62. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_random_state.py +0 -0
  63. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_std_mute.py +0 -0
  64. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/utils/tests/test_utils.py +0 -0
  65. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/validate/__init__.py +0 -0
  66. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/validate/_named_objects.py +0 -0
  67. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/validate/_types.py +0 -0
  68. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/validate/tests/__init__.py +0 -0
  69. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/validate/tests/test_iterable_named_objects.py +0 -0
  70. {scikit_base-0.8.3 → scikit_base-0.9.0}/skbase/validate/tests/test_type_validations.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scikit-base
3
- Version: 0.8.3
3
+ Version: 0.9.0
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
@@ -114,7 +114,7 @@ Requires-Dist: scikit-learn>=0.24.0; extra == "test"
114
114
  `skbase` provides base classes for creating scikit-learn-like parametric objects,
115
115
  along with tools to make it easier to build your own packages that follow these design patterns.
116
116
 
117
- :rocket: Version 0.8.3 is now available. Check out our
117
+ :rocket: Version 0.9.0 is now available. Check out our
118
118
  [release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
119
119
 
120
120
  | 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 0.8.3 is now available. Check out our
10
+ :rocket: Version 0.9.0 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 = "0.8.3"
3
+ version = "0.9.0"
4
4
  description = "Base classes for sklearn-like parametric objects"
5
5
  authors = [
6
6
  {name = "sktime developers", email = "sktime.toolbox@gmail.com"},
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scikit-base
3
- Version: 0.8.3
3
+ Version: 0.9.0
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
@@ -114,7 +114,7 @@ Requires-Dist: scikit-learn>=0.24.0; extra == "test"
114
114
  `skbase` provides base classes for creating scikit-learn-like parametric objects,
115
115
  along with tools to make it easier to build your own packages that follow these design patterns.
116
116
 
117
- :rocket: Version 0.8.3 is now available. Check out our
117
+ :rocket: Version 0.9.0 is now available. Check out our
118
118
  [release notes](https://skbase.readthedocs.io/en/latest/changelog.html).
119
119
 
120
120
  | Overview | |
@@ -6,4 +6,4 @@
6
6
  The included functionality makes it easy to reuse scikit-learn and
7
7
  sktime design principles in your project.
8
8
  """
9
- __version__: str = "0.8.3"
9
+ __version__: str = "0.9.0"
@@ -203,46 +203,16 @@ def _filter_by_tags(obj, tag_filter=None, as_dataframe=True):
203
203
  if not hasattr(obj, "get_class_tag"):
204
204
  return False
205
205
 
206
- klass_tags = obj.get_class_tags().keys()
207
-
208
- # todo 0.9.0: remove the warning message
209
- # i.e., this message and all warnings referring to it
210
- warn_msg = (
211
- "The meaning of filter_tags arguments in all_objects of type str "
212
- "and iterable of str will change from scikit-base 0.9.0. "
213
- "Currently, str or iterable of str arguments select objects that possess the "
214
- "tag(s) with the specified name, of any value. "
215
- "From 0.9.0 onwards, str or iterable of str "
216
- "will select objects that possess the tag with the specified name, "
217
- "with the value True (boolean). See scikit-base issue #326 for the rationale "
218
- "behind this change. "
219
- "To retain previous behaviour, that is, "
220
- "to select objects that possess the tag with the specified name, of any value, "
221
- "use a dict with the tag name as key, and re.Pattern('*?') as value. "
222
- "That is, from re import Pattern, and pass {tag_name: Pattern('*?')} "
223
- "as filter_tags, and similarly with multiple tag names. "
224
- )
225
-
226
206
  # case: tag_filter is string
227
207
  if isinstance(tag_filter, str):
228
- # todo 0.9.0: reomove this warning
229
- warnings.warn(warn_msg, DeprecationWarning, stacklevel=2)
230
- # todo 0.9.0: replace this line
231
- return tag_filter in klass_tags
232
- # by this line
233
- # tag_filter = {tag_filter: True}
208
+ tag_filter = {tag_filter: True}
234
209
 
235
210
  # case: tag_filter is iterable of str but not dict
236
211
  # If a iterable of strings is provided, check that all are in the returned tag_dict
237
212
  if isinstance(tag_filter, Iterable) and not isinstance(tag_filter, dict):
238
213
  if not all(isinstance(t, str) for t in tag_filter):
239
214
  raise ValueError(f"{type_msg} {tag_filter}")
240
- # todo 0.9.0: reomove this warning
241
- warnings.warn(warn_msg, DeprecationWarning, stacklevel=2)
242
- # todo 0.9.0: replace this line
243
- return all(tag in klass_tags for tag in tag_filter)
244
- # by this line
245
- # tag_filter = {tag: True for tag in tag_filter}
215
+ tag_filter = dict.fromkeys(tag_filter, True)
246
216
 
247
217
  # case: tag_filter is dict
248
218
  # check that all keys are str
@@ -712,8 +682,6 @@ def get_package_metadata(
712
682
  return module_info
713
683
 
714
684
 
715
- # todo 0.9.0: change docstring to reflect handling of filter_tags
716
- # in case of str or iterable of str
717
685
  def all_objects(
718
686
  object_types=None,
719
687
  filter_tags=None,
@@ -760,7 +728,9 @@ def all_objects(
760
728
  Filter used to determine if ``klass`` has tag or expected tag values.
761
729
 
762
730
  - If a str or list of strings is provided, the return will be filtered
763
- to keep classes that have all the tag(s) specified by the strings.
731
+ to keep classes that have all the tag(s) specified by the strings,
732
+ with the tag value being True.
733
+
764
734
  - If a dict is provided, the return will be filtered to keep exactly the classes
765
735
  where tags satisfy all the filter conditions specified by ``filter_tags``.
766
736
  Filter conditions are as follows, for ``tag_name: search_value`` pairs in
@@ -35,6 +35,7 @@ from skbase.tests.conftest import (
35
35
  SKBASE_PUBLIC_CLASSES_BY_MODULE,
36
36
  SKBASE_PUBLIC_FUNCTIONS_BY_MODULE,
37
37
  SKBASE_PUBLIC_MODULES,
38
+ ClassWithABTrue,
38
39
  Parent,
39
40
  )
40
41
  from skbase.tests.mock_package.test_mock_package import (
@@ -374,18 +375,18 @@ def test_filter_by_tags():
374
375
  assert _filter_by_tags(NotABaseObject) is True
375
376
 
376
377
  # Check when tag_filter is a str and present in the class
377
- assert _filter_by_tags(Parent, tag_filter="A") is True
378
+ assert _filter_by_tags(ClassWithABTrue, tag_filter="A") is True
378
379
  # Check when tag_filter is str and not present in the class
379
- assert _filter_by_tags(BaseObject, tag_filter="A") is False
380
+ assert _filter_by_tags(Parent, tag_filter="A") is False
380
381
 
381
382
  # Test functionality when tag present and object doesn't have tag interface
382
383
  assert _filter_by_tags(NotABaseObject, tag_filter="A") is False
383
384
 
384
385
  # Test functionality where tag_filter is Iterable of str
385
386
  # all tags in iterable are in the class
386
- assert _filter_by_tags(Parent, ("A", "B", "C")) is True
387
+ assert _filter_by_tags(ClassWithABTrue, ("A", "B")) is True
387
388
  # Some tags in iterable are in class and others aren't
388
- assert _filter_by_tags(Parent, ("A", "B", "C", "D", "E")) is False
389
+ assert _filter_by_tags(ClassWithABTrue, ("A", "B", "C", "D", "E")) is False
389
390
 
390
391
  # Test functionality where tag_filter is Dict[str, Any]
391
392
  # All keys in dict are in tag_filter and values all match
@@ -314,3 +314,19 @@ class Child(Parent):
314
314
  def some_other_method(self):
315
315
  """To be implemented in the child class."""
316
316
  pass
317
+
318
+
319
+ # Fixture class for testing tag system, child overrides tags
320
+ class ClassWithABTrue(Parent):
321
+ """Child class that sets A, B tags to True."""
322
+
323
+ _tags = {"A": True, "B": True}
324
+ __author__ = ["fkiraly", "RNKuhns"]
325
+
326
+ def some_method(self):
327
+ """Child class' implementation."""
328
+ pass
329
+
330
+ def some_other_method(self):
331
+ """To be implemented in the child class."""
332
+ pass
File without changes
File without changes