onekit 3.1.0__tar.gz → 4.0.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: onekit
3
- Version: 3.1.0
3
+ Version: 4.0.0
4
4
  Summary: All-in-One Python Kit.
5
5
  License: BSD 3-Clause
6
6
  Keywords: onekit
@@ -15,6 +15,7 @@ Provides-Extra: base
15
15
  Provides-Extra: pyspark
16
16
  Requires-Dist: pandas[compression,computation,excel,output-formatting,parquet,performance,plot] (>=2.2.3,<3.0.0) ; extra == "analytics"
17
17
  Requires-Dist: pyspark (==3.5.3) ; extra == "pyspark"
18
+ Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0) ; extra == "base"
18
19
  Requires-Dist: pytz (>=2025.2,<2026.0) ; extra == "base"
19
20
  Requires-Dist: scikit-learn (>=1.6.1,<2.0.0) ; extra == "analytics"
20
21
  Requires-Dist: toolz (>=1.0.0,<2.0.0) ; extra == "base"
@@ -40,7 +41,7 @@ All-in-One Python Kit:
40
41
 
41
42
  - [Examples](https://onekit.readthedocs.io/en/stable/examples.html)
42
43
  - [Documentation](https://onekit.readthedocs.io/en/stable/index.html)
43
- - [Developer Guide](https://onekit.readthedocs.io/en/stable/developers.html)
44
+ - [Dev Guide](https://onekit.readthedocs.io/en/stable/devguide.html)
44
45
  - [API Reference](https://onekit.readthedocs.io/en/stable/autoapi/index.html)
45
46
 
46
47
  ## Installation
@@ -17,7 +17,7 @@ All-in-One Python Kit:
17
17
 
18
18
  - [Examples](https://onekit.readthedocs.io/en/stable/examples.html)
19
19
  - [Documentation](https://onekit.readthedocs.io/en/stable/index.html)
20
- - [Developer Guide](https://onekit.readthedocs.io/en/stable/developers.html)
20
+ - [Dev Guide](https://onekit.readthedocs.io/en/stable/devguide.html)
21
21
  - [API Reference](https://onekit.readthedocs.io/en/stable/autoapi/index.html)
22
22
 
23
23
  ## Installation
@@ -22,12 +22,13 @@ requires-python = ">=3.11"
22
22
  dependencies = []
23
23
 
24
24
  [tool.poetry]
25
- version = "3.1.0"
25
+ version = "4.0.0"
26
26
 
27
27
  [project.optional-dependencies]
28
28
  base = [
29
- "toolz (>=1.0.0,<2.0.0)",
29
+ "python-dateutil (>=2.9.0.post0,<3.0.0)",
30
30
  "pytz (>=2025.2,<2026.0)",
31
+ "toolz (>=1.0.0,<2.0.0)",
31
32
  ]
32
33
  analytics = [
33
34
  "pandas[compression,computation,excel,output-formatting,parquet,performance,plot] (>=2.2.3,<3.0.0)",
@@ -4,14 +4,14 @@ from typing import (
4
4
  Iterable,
5
5
  )
6
6
 
7
- from pyspark.sql import DataFrame as SparkDF
8
-
9
7
  from onekit import pythonkit as pk
10
8
 
11
9
  __all__ = (
12
10
  "ColumnNotFoundError",
13
11
  "InvalidChoiceError",
12
+ "InvalidDateRangeWarning",
14
13
  "OnekitError",
14
+ "OnekitWarning",
15
15
  "RowCountMismatchError",
16
16
  "RowValueMismatchError",
17
17
  "SchemaMismatchError",
@@ -96,6 +96,7 @@ class RowCountMismatchError(OnekitError):
96
96
  super().__init__(self.message)
97
97
 
98
98
 
99
+ # noinspection PyUnresolvedReferences
99
100
  class RowValueMismatchError(OnekitError):
100
101
  """Exception for mismatch of row values.
101
102
 
@@ -107,8 +108,8 @@ class RowValueMismatchError(OnekitError):
107
108
 
108
109
  def __init__(
109
110
  self,
110
- lft_rows: SparkDF,
111
- rgt_rows: SparkDF,
111
+ lft_rows: "SparkDF", # noqa: F821
112
+ rgt_rows: "SparkDF", # noqa: F821
112
113
  num_lft: int,
113
114
  num_rgt: int,
114
115
  ):
@@ -140,3 +141,11 @@ class SchemaMismatchError(OnekitError):
140
141
  num_diff = sum(c == "|" for c in msg.splitlines()[1])
141
142
  self.message = pk.concat_strings(os.linesep, f"{num_diff=}", msg)
142
143
  super().__init__(self.message)
144
+
145
+
146
+ class OnekitWarning(UserWarning):
147
+ """A base class for onekit warnings."""
148
+
149
+
150
+ class InvalidDateRangeWarning(OnekitWarning):
151
+ """Warning for when a date range is provided in reverse order but is corrected."""