time-split 1.0.1__tar.gz → 1.0.3__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 (40) hide show
  1. {time_split-1.0.1 → time_split-1.0.3}/PKG-INFO +5 -8
  2. {time_split-1.0.1 → time_split-1.0.3}/README.md +1 -6
  3. {time_split-1.0.1 → time_split-1.0.3}/pyproject.toml +21 -23
  4. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/__init__.py +1 -1
  5. time_split-1.0.3/src/time_split/_docstrings.py +40 -0
  6. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/_log_progress.py +0 -3
  7. time_split-1.0.1/src/time_split/_docstrings.py +0 -42
  8. {time_split-1.0.1 → time_split-1.0.3}/LICENSE.md +0 -0
  9. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/__main__.py +0 -0
  10. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/__init__.py +0 -0
  11. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/_datetime_index_like.py +0 -0
  12. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/_limits.py +0 -0
  13. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/_process_available.py +0 -0
  14. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/_schedule.py +0 -0
  15. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/_span.py +0 -0
  16. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_backend/_splitter.py +0 -0
  17. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_frontend/__init__.py +0 -0
  18. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_frontend/_plot.py +0 -0
  19. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_frontend/_progress.py +0 -0
  20. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_frontend/_split.py +0 -0
  21. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_frontend/_to_string.py +0 -0
  22. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_frontend/_weight.py +0 -0
  23. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/_support.py +0 -0
  24. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/app/__init__.py +0 -0
  25. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/app/_create_explorer_link.py +0 -0
  26. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/app/reexport/__init__.py +0 -0
  27. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/cli.py +0 -0
  28. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/__init__.py +0 -0
  29. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/base.py +0 -0
  30. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/pandas/__init__.py +0 -0
  31. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/pandas/_impl.py +0 -0
  32. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/polars/__init__.py +0 -0
  33. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/polars/_impl.py +0 -0
  34. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/sklearn/__init__.py +0 -0
  35. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/integration/sklearn/_impl.py +0 -0
  36. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/py.typed +0 -0
  37. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/settings.py +0 -0
  38. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/support/__init__.py +0 -0
  39. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/support/types.py +0 -0
  40. {time_split-1.0.1 → time_split-1.0.3}/src/time_split/types.py +0 -0
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: time-split
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: Time-based k-fold validation splits for heterogeneous data.
5
5
  License: MIT
6
+ License-File: LICENSE.md
6
7
  Keywords: hyper,parameter,optimization,cross,validation,time,temporal,heterogenous,data
7
8
  Author: Richard Sundqvist
8
9
  Author-email: richard.sundqvist@live.se
@@ -21,6 +22,7 @@ Classifier: Programming Language :: Python :: 3 :: Only
21
22
  Classifier: Programming Language :: Python :: 3.11
22
23
  Classifier: Programming Language :: Python :: 3.12
23
24
  Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
24
26
  Provides-Extra: app
25
27
  Provides-Extra: plotting
26
28
  Requires-Dist: click ; extra == "app"
@@ -66,7 +68,7 @@ strong non-stationary characteristics.
66
68
  a CRON-expression, or a pre-defined list.
67
69
  - [Data selection](https://time-split.readthedocs.io/en/stable/guide/spans.html) based on a timedelta, or the splitting
68
70
  schedule itself.
69
- - Automatically extract and [normalize](https://time-split.readthedocs.io/en/stable/guide/expand_limits.html) data limits for
71
+ - Automatically extract and [normalize](https://time-split.readthedocs.io/en/stable/guide/expand-limits.html) data limits for
70
72
  supported data types.
71
73
  - [Plotting function](https://time-split.readthedocs.io/en/stable/api/time_split.html#time_split.plot) for
72
74
  visualization of folds. Display fold sizes (hour/row count), or
@@ -107,9 +109,6 @@ pip install -U time-split
107
109
  This is the preferred method to install ``time-split``, as it will always install the
108
110
  most recent stable release.
109
111
 
110
- If you don't have [pip] installed, this [Python installation guide] can guide
111
- you through the process.
112
-
113
112
  ## License
114
113
  [MIT](LICENSE.md)
115
114
 
@@ -122,6 +121,4 @@ All contributions, bug reports, bug fixes, documentation improvements, enhanceme
122
121
  started, see the [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
123
122
 
124
123
  [Python Package Index (PyPI)]: https://pypi.org/project/time-split
125
- [pip]: https://pip.pypa.io
126
- [Python installation guide]: http://docs.python-guide.org/en/stable/starting/installation/
127
124
 
@@ -28,7 +28,7 @@ strong non-stationary characteristics.
28
28
  a CRON-expression, or a pre-defined list.
29
29
  - [Data selection](https://time-split.readthedocs.io/en/stable/guide/spans.html) based on a timedelta, or the splitting
30
30
  schedule itself.
31
- - Automatically extract and [normalize](https://time-split.readthedocs.io/en/stable/guide/expand_limits.html) data limits for
31
+ - Automatically extract and [normalize](https://time-split.readthedocs.io/en/stable/guide/expand-limits.html) data limits for
32
32
  supported data types.
33
33
  - [Plotting function](https://time-split.readthedocs.io/en/stable/api/time_split.html#time_split.plot) for
34
34
  visualization of folds. Display fold sizes (hour/row count), or
@@ -69,9 +69,6 @@ pip install -U time-split
69
69
  This is the preferred method to install ``time-split``, as it will always install the
70
70
  most recent stable release.
71
71
 
72
- If you don't have [pip] installed, this [Python installation guide] can guide
73
- you through the process.
74
-
75
72
  ## License
76
73
  [MIT](LICENSE.md)
77
74
 
@@ -84,5 +81,3 @@ All contributions, bug reports, bug fixes, documentation improvements, enhanceme
84
81
  started, see the [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
85
82
 
86
83
  [Python Package Index (PyPI)]: https://pypi.org/project/time-split
87
- [pip]: https://pip.pypa.io
88
- [Python installation guide]: http://docs.python-guide.org/en/stable/starting/installation/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "time-split"
3
- version = "1.0.1"
3
+ version = "1.0.3"
4
4
  description = "Time-based k-fold validation splits for heterogeneous data."
5
5
  authors = [
6
6
  { name = "Richard Sundqvist", email = "richard.sundqvist@live.se" },
@@ -23,6 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.11",
24
24
  "Programming Language :: Python :: 3.12",
25
25
  "Programming Language :: Python :: 3.13",
26
+ "Programming Language :: Python :: 3.14",
26
27
  ]
27
28
  requires-python = ">=3.11"
28
29
 
@@ -50,45 +51,44 @@ poetry-plugin-export = ">=1.8"
50
51
 
51
52
  [tool.poetry.group.manual-extras.dependencies]
52
53
  # Extras that must be available for docs + tests go here. Doc/test-only deps go in their respective groups.
53
- croniter = "^6.0.0"
54
- pyarrow = "^19.0.0"
55
- polars = { version = "^1.21.0", extras = ["pandas"] }
54
+ croniter = "~6.0.0"
55
+ pyarrow = "~22.0.0"
56
+ polars = { version = "~1.34.0", extras = ["pandas"] }
56
57
 
57
58
  [tool.poetry.group.docs]
58
59
  [tool.poetry.group.docs.dependencies]
59
60
  # duplicate object warnings for sphinx>=4
60
61
  # description: https://github.com/astropy/astropy/issues/11723
61
62
  # https://github.com/astropy/astropy/pull/12270
62
- sphinx = "~8.1.3"
63
- sphinx-gallery = "^0.18.0"
64
- pydata-sphinx-theme = "^0.16.1"
65
- myst-parser = "^4.0.0"
66
- nbsphinx = "^0.9.6"
67
- ipython = "^8.31.0"
63
+ sphinx = "~8.1.3" # 8.2 breaks xdoc refs in README.md; maybe https://github.com/sphinx-doc/sphinx/issues/13932?
64
+ sphinx-gallery = "~0.19.0"
65
+ pydata-sphinx-theme = "~0.16.1"
66
+ myst-parser = "~4.0.1"
67
+ ipython = "~9.6.0"
68
68
 
69
69
  [tool.poetry.group.notebooks]
70
70
  optional = true
71
71
  [tool.poetry.group.notebooks.dependencies]
72
- jupyterlab = "^4"
72
+ jupyterlab = "~4.4.10"
73
73
  ipywidgets = "*"
74
74
  jupyterlab-execute-time = "*"
75
75
  tqdm = "*"
76
76
 
77
77
  [tool.poetry.group.test.dependencies]
78
- pytest = "^8.3.4"
79
- xdoctest = "^1.2.0"
80
- coverage = "^7.6.10"
81
- pytest-cov = "^6.0.0"
78
+ pytest = "~8.4.2"
79
+ xdoctest = "~1.3.0"
80
+ coverage = "~7.11.0"
81
+ pytest-cov = "~7.0.0"
82
82
 
83
- scikit-learn = "^1.6.1"
84
- dask = { version = "^2025.1.0", extras = ["dataframe"] }
83
+ scikit-learn = "~1.7.2"
84
+ dask = { version = "~2025.10.0", extras = ["dataframe"] }
85
85
 
86
86
  [tool.poetry.group.devops.dependencies]
87
- invoke = "~2.2.0"
88
- mypy = "~1.17.0"
89
- ruff = "~0.12.3"
87
+ invoke = "~2.2.1"
88
+ mypy = "~1.18.2"
89
+ ruff = "~0.14.2"
90
90
 
91
- safety = "~3.5.1"
91
+ safety = "~3.6.2"
92
92
  codespell = "~2.4.1"
93
93
  bump2version = "~1.0.1"
94
94
 
@@ -140,13 +140,11 @@ ignore = [
140
140
  "ANN401",
141
141
  "TID252", # Prefer absolute imports over relative imports from parent modules
142
142
  "TRY003",
143
- "PD901", # Avoid using the generic variable name `df` for DataFrames
144
143
  "PLC0415", # `import` should be at the top-level of a file
145
144
  "PLR0913", #
146
145
  "SIM108", # Use ternary operator - coverage issue, see https://github.com/nedbat/coveragepy/issues/509
147
146
  "TD003", # Missing issue link
148
147
  "TC006", # Add quotes to type expression in `typing.cast()`
149
- "UP038", # https://github.com/astral-sh/ruff/issues/7871
150
148
  ]
151
149
 
152
150
  [tool.ruff.lint.per-file-ignores]
@@ -11,6 +11,6 @@ __all__ = [
11
11
  "split",
12
12
  ]
13
13
 
14
- __version__ = "1.0.1"
14
+ __version__ = "1.0.3"
15
15
 
16
16
  _logging.getLogger(__name__).addHandler(_logging.NullHandler())
@@ -0,0 +1,40 @@
1
+ from collections.abc import Callable
2
+ from typing import ParamSpec, TypeVar
3
+
4
+ P = ParamSpec("P")
5
+ T = TypeVar("T")
6
+
7
+
8
+ def docs(__func: Callable[P, T], /) -> Callable[P, T]:
9
+ """Add info the docstring of a function."""
10
+ if not __func.__doc__:
11
+ return __func
12
+
13
+ offset = "pandas :ref:`offset alias <pandas:timeseries.offset_aliases>`"
14
+ span = (
15
+ f"Range {{}} `schedule` timestamps. Either a {offset}, an integer (`schedule`-based offsets), "
16
+ f"or `'all'` (requires `available` data)."
17
+ )
18
+ docstrings = {
19
+ "schedule": f"A :attr:`~time_split.types.DatetimeIterable`, {offset}, or `cron <https://pypi.org/project/croniter/>`_ expression.",
20
+ "before": span.format("before"),
21
+ "after": span.format("after"),
22
+ "step": "Select a subset of folds, preferring folds later in the schedule.",
23
+ "n_splits": "Maximum number of folds, preferring folds later in the schedule.",
24
+ "available": "Binds `schedule` to a range.",
25
+ "expand_limits": f'A {offset} used to expand `available` data to its likely `"true"` limits. Pass ``False`` to disable.',
26
+ "filter": "A callable ``(start, mid, end) -> bool`` applied to each fold. Strings are converted using :func:`~rics.misc.get_by_full_name`.",
27
+ "ignore_filters": "Set to ignore filtering parameters (e.g. `step` and `filter`).",
28
+ "USER_GUIDE": (
29
+ "For more information about the `schedule`, `before/after` and `expand_limits`-arguments"
30
+ ", see the :ref:`User guide`."
31
+ ),
32
+ "OFFSET": offset,
33
+ "DatetimeIndexSplitterKwargs": "See :func:`~time_split.split`. The `available` keyword is managed by the integration.",
34
+ "show_removed": "If ``True``, splits removed by `n_splits` or `step` are included in the figure.",
35
+ "log_progress": "Controls logging of fold progress. See :func:`~.log_split_progress` for details.",
36
+ }
37
+
38
+ __func.__doc__ = __func.__doc__.format(**docstrings)
39
+
40
+ return __func
@@ -3,13 +3,10 @@ from collections.abc import Iterable
3
3
  from typing import Any
4
4
 
5
5
  from .. import log_split_progress
6
- from .._docstrings import add_docstrings
7
6
  from ..types import DatetimeSplitBounds, DatetimeSplits, LogSplitProgressKwargs, MetricsType
8
7
 
9
8
  LogProgressArg = str | bool | logging.Logger | logging.LoggerAdapter[Any] | LogSplitProgressKwargs[MetricsType]
10
9
 
11
- add_docstrings(log_progress="Controls logging of fold progress. See :func:`~.log_split_progress` for details.")
12
-
13
10
 
14
11
  def handle_log_progress_arg(
15
12
  log_progress: LogProgressArg[MetricsType], *, splits: DatetimeSplits
@@ -1,42 +0,0 @@
1
- from collections.abc import Callable
2
- from typing import ParamSpec, TypeVar
3
-
4
- P = ParamSpec("P")
5
- T = TypeVar("T")
6
-
7
-
8
- def add_docstrings(**kwargs: str) -> None:
9
- """Add a documented argument to the ``@docs`` decorator."""
10
- _DOCSTRINGS.update(kwargs)
11
-
12
-
13
- def docs(__func: Callable[P, T], /) -> Callable[P, T]:
14
- """Add info the docstring of a function."""
15
- assert __func.__doc__ is not None # noqa: S101
16
- __func.__doc__ = __func.__doc__.format(**_DOCSTRINGS)
17
- return __func
18
-
19
-
20
- _OFFSET = "pandas :ref:`offset alias <pandas:timeseries.offset_aliases>`"
21
- _SPAN = (
22
- f"Range {{arg}} `schedule` timestamps. Either a {_OFFSET}, an integer (`schedule`-based offsets), "
23
- f"or `'all'` (requires `available` data)."
24
- )
25
- _DOCSTRINGS = {
26
- "schedule": f"A :attr:`~time_split.types.DatetimeIterable`, {_OFFSET}, or `cron <https://pypi.org/project/croniter/>`_ expression.",
27
- "before": _SPAN.format(arg="before"),
28
- "after": _SPAN.format(arg="after"),
29
- "step": "Select a subset of folds, preferring folds later in the schedule.",
30
- "n_splits": "Maximum number of folds, preferring folds later in the schedule.",
31
- "available": "Binds `schedule` to a range.",
32
- "expand_limits": f'A {_OFFSET} used to expand `available` data to its likely `"true"` limits. Pass ``False`` to disable.',
33
- "filter": "A callable ``(start, mid, end) -> bool`` applied to each fold. Strings are converted using :func:`~rics.misc.get_by_full_name`.",
34
- "ignore_filters": "Set to ignore filtering parameters (e.g. `step` and `filter`).",
35
- "USER_GUIDE": (
36
- "For more information about the `schedule`, `before/after` and `expand_limits`-arguments"
37
- ", see the :ref:`User guide`."
38
- ),
39
- "OFFSET": _OFFSET,
40
- "DatetimeIndexSplitterKwargs": "See :func:`~time_split.split`. The `available` keyword is managed by the integration.",
41
- "show_removed": "If ``True``, splits removed by `n_splits` or `step` are included in the figure.",
42
- }
File without changes