DataExcept 0.2.0__tar.gz → 0.2.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.
Files changed (34) hide show
  1. {dataexcept-0.2.0 → dataexcept-0.2.1}/CHANGELOG.md +35 -1
  2. {dataexcept-0.2.0 → dataexcept-0.2.1}/CITATION.cff +1 -1
  3. {dataexcept-0.2.0 → dataexcept-0.2.1}/PKG-INFO +20 -18
  4. {dataexcept-0.2.0 → dataexcept-0.2.1}/README.md +19 -17
  5. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/__main__.py +13 -2
  6. {dataexcept-0.2.0 → dataexcept-0.2.1}/pyproject.toml +1 -1
  7. {dataexcept-0.2.0 → dataexcept-0.2.1}/LICENSE +0 -0
  8. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/__init__.py +0 -0
  9. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/_deprecation.py +0 -0
  10. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/database_exceptions.py +0 -0
  11. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/dataengineering_exceptions.py +0 -0
  12. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/datascience_exceptions/__init__.py +0 -0
  13. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/datascience_exceptions/base.py +0 -0
  14. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/datascience_exceptions/ingestion.py +0 -0
  15. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/datascience_exceptions/operations.py +0 -0
  16. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/datascience_exceptions/training.py +0 -0
  17. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/__init__.py +0 -0
  18. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/authentication.py +0 -0
  19. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/base.py +0 -0
  20. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/configuration.py +0 -0
  21. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/external.py +0 -0
  22. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/lifecycle.py +0 -0
  23. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/notification.py +0 -0
  24. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/parsing.py +0 -0
  25. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/scheduling.py +0 -0
  26. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/exceptions/validation.py +0 -0
  27. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/io_exceptions.py +0 -0
  28. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/job_exceptions.py +0 -0
  29. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/logging_helpers.py +0 -0
  30. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/network_exceptions.py +0 -0
  31. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/pandas_exceptions.py +0 -0
  32. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/pipeline_exceptions.py +0 -0
  33. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/py.typed +0 -0
  34. {dataexcept-0.2.0 → dataexcept-0.2.1}/dataexcept/security_exceptions.py +0 -0
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.1] - 2026-08-24
11
+
12
+ Documentation and CLI fixes. 0.2.0's README is what PyPI renders as the
13
+ project description, and its quick-start example did not run.
14
+
15
+ ### Fixed
16
+
17
+ - `python -m dataexcept --version` reported `__main__.py` as the program name
18
+ instead of `dataexcept`, because argparse defaults `prog` to `sys.argv[0]`.
19
+ - `dataexcept list` imported the deprecated `job_exceptions` shim to build its
20
+ output, so it emitted a `DeprecationWarning` at anyone who merely wanted to
21
+ see what the package offers, and it advertised `ConnectionError` and
22
+ `TimeoutError` alongside their replacements. Deprecated modules are now
23
+ skipped; the listing is 98 names, matching the classes the package defines.
24
+ - README's quick-start example began `from dataexcept import ValidationError,
25
+ ModelTrainingError`, which raises `ImportError` — `ModelTrainingError` is in
26
+ `dataexcept.datascience_exceptions` and is not re-exported at the top level.
27
+ - `docs/advanced_usage.md` taught `from dataexcept.job_exceptions import
28
+ JobError`, the deprecated path.
29
+ - README's comparison table showed exception messages without the
30
+ `[ClassName]` prefix the classes actually emit, its sample `dataexcept list`
31
+ output did not match the real alphabetical listing, its exception count and
32
+ CLI version were stale, and its end-to-end example used `np.log` without
33
+ importing numpy.
34
+
35
+ ### Added
36
+
37
+ - Tests that read the documentation: every `from dataexcept... import ...` in
38
+ README and `docs/` must resolve, no example may import a deprecated module,
39
+ and the README's exception count must match the package. Checked that these
40
+ fail when the original defects are reintroduced.
41
+
10
42
  ## [0.2.0] - 2026-08-24
11
43
 
12
44
  ### Changed
@@ -62,6 +94,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
62
94
  - `examples/example_usage.py` raised `TimeoutError` with keyword arguments the
63
95
  builtin does not accept — a live instance of the shadowing hazard.
64
96
 
97
+
65
98
  ## [0.1.0] - 2026-08-24
66
99
 
67
100
  First public release.
@@ -93,6 +126,7 @@ First public release.
93
126
  - Published to PyPI via OIDC trusted publishing; no long-lived API token is
94
127
  involved in a release.
95
128
 
96
- [Unreleased]: https://github.com/DiogoRibeiro7/DataExcept/compare/v0.2.0...HEAD
129
+ [Unreleased]: https://github.com/DiogoRibeiro7/DataExcept/compare/v0.2.1...HEAD
130
+ [0.2.1]: https://github.com/DiogoRibeiro7/DataExcept/compare/v0.2.0...v0.2.1
97
131
  [0.2.0]: https://github.com/DiogoRibeiro7/DataExcept/compare/v0.1.0...v0.2.0
98
132
  [0.1.0]: https://github.com/DiogoRibeiro7/DataExcept/releases/tag/v0.1.0
@@ -1,7 +1,7 @@
1
1
  cff-version: 1.2.0
2
2
  message: "If you use this software, please cite it using the following metadata."
3
3
  title: "DataExcept"
4
- version: "0.2.0"
4
+ version: "0.2.1"
5
5
  authors:
6
6
  - family-names: "Ribeiro"
7
7
  given-names: "Diogo"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DataExcept
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A Python package providing structured, easily-extendable custom exception types.
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -34,15 +34,15 @@ Description-Content-Type: text/markdown
34
34
 
35
35
  ❌ Without DataExcept | ✅ With DataExcept
36
36
  ------------------------------- | -------------------------------------------------------------------------------------
37
- `ValueError: Invalid value` | `DataValidationError: Invalid value for 'age': -1`
38
- `RuntimeError: Training failed` | `ConvergenceError: Model 'RandomForest' failed to converge after 100 iterations`
39
- `Exception: Prediction error` | `ModelInferenceError: Inference failed for model 'CNN': CUDA out of memory`
40
- `KeyError: column not found` | `MissingColumnError: Missing required column 'customer_id' in DataFrame 'sales_data'`
37
+ `ValueError: Invalid value` | `DataValidationError: [DataValidationError:age] Invalid value for 'age': -1`
38
+ `RuntimeError: Training failed` | `ConvergenceError: [ConvergenceError] Model 'RandomForest' failed to converge after 100 iterations`
39
+ `Exception: Prediction error` | `ModelInferenceError: [ModelInferenceError:CNN] Inference failed for model 'CNN': CUDA out of memory`
40
+ `KeyError: column not found` | `MissingColumnError: [MissingColumnError] Missing required column 'customer_id' in DataFrame 'sales_data'`
41
41
 
42
42
  ## 🎯 Key Features
43
43
 
44
44
  - **🏗️ Hierarchical Structure**: Catch specific errors or broad categories
45
- - **📊 Data Science Focused**: 96 exception classes covering ML pipelines, feature engineering, model training
45
+ - **📊 Data Science Focused**: 98 exception classes covering ML pipelines, feature engineering, model training
46
46
  - **🔧 Production Ready**: Comprehensive logging helpers and error context
47
47
  - **📚 Academic Quality**: Proper documentation, type hints, and citation support
48
48
  - **🐍 Python 3.10+**: Modern Python with full type safety
@@ -67,8 +67,8 @@ poetry install
67
67
  ### Basic Usage
68
68
 
69
69
  ```python
70
- from dataexcept import ValidationError, ModelTrainingError
71
- from dataexcept.datascience_exceptions import DataLoadingError
70
+ from dataexcept import ValidationError
71
+ from dataexcept.datascience_exceptions import DataLoadingError, ModelTrainingError
72
72
  import pandas as pd
73
73
 
74
74
  # Data validation with context
@@ -214,17 +214,18 @@ except Exception as exc:
214
214
  ### Command Line Interface
215
215
 
216
216
  ```bash
217
- # List all available exception classes
217
+ # List every exception class the package exports (98 of them, alphabetically)
218
218
  $ dataexcept list
219
- JobError
220
- ValidationError
221
- DataScienceError
222
- ModelTrainingError
223
- ... (40+ more)
219
+ ApiError
220
+ AuthenticationError
221
+ AuthorizationError
222
+ BatchProcessingError
223
+ BiasDetectionError
224
+ ...
224
225
 
225
226
  # Check version
226
227
  $ dataexcept --version
227
- dataexcept 0.1.0
228
+ dataexcept 0.2.1
228
229
  ```
229
230
 
230
231
  ## 🎯 Use Cases
@@ -255,6 +256,7 @@ dataexcept 0.1.0
255
256
  """
256
257
  Complete ML pipeline with DataExcept error handling
257
258
  """
259
+ import numpy as np
258
260
  import pandas as pd
259
261
  from sklearn.ensemble import RandomForestClassifier
260
262
  from dataexcept import ValidationError
@@ -369,12 +371,12 @@ through [SECURITY.md](SECURITY.md), not the public issue tracker.
369
371
  If you use DataExcept in your research, please cite it:
370
372
 
371
373
  ```bibtex
372
- @software{ribeiro_dataexcept_2025,
374
+ @software{ribeiro_dataexcept_2026,
373
375
  author = {Ribeiro, Diogo},
374
376
  title = {DataExcept: Structured Exception Handling for Data Science},
375
377
  url = {https://github.com/DiogoRibeiro7/DataExcept},
376
- version = {0.1.0},
377
- year = {2025},
378
+ version = {0.2.1},
379
+ year = {2026},
378
380
  publisher = {GitHub}
379
381
  }
380
382
  ```
@@ -8,15 +8,15 @@
8
8
 
9
9
  ❌ Without DataExcept | ✅ With DataExcept
10
10
  ------------------------------- | -------------------------------------------------------------------------------------
11
- `ValueError: Invalid value` | `DataValidationError: Invalid value for 'age': -1`
12
- `RuntimeError: Training failed` | `ConvergenceError: Model 'RandomForest' failed to converge after 100 iterations`
13
- `Exception: Prediction error` | `ModelInferenceError: Inference failed for model 'CNN': CUDA out of memory`
14
- `KeyError: column not found` | `MissingColumnError: Missing required column 'customer_id' in DataFrame 'sales_data'`
11
+ `ValueError: Invalid value` | `DataValidationError: [DataValidationError:age] Invalid value for 'age': -1`
12
+ `RuntimeError: Training failed` | `ConvergenceError: [ConvergenceError] Model 'RandomForest' failed to converge after 100 iterations`
13
+ `Exception: Prediction error` | `ModelInferenceError: [ModelInferenceError:CNN] Inference failed for model 'CNN': CUDA out of memory`
14
+ `KeyError: column not found` | `MissingColumnError: [MissingColumnError] Missing required column 'customer_id' in DataFrame 'sales_data'`
15
15
 
16
16
  ## 🎯 Key Features
17
17
 
18
18
  - **🏗️ Hierarchical Structure**: Catch specific errors or broad categories
19
- - **📊 Data Science Focused**: 96 exception classes covering ML pipelines, feature engineering, model training
19
+ - **📊 Data Science Focused**: 98 exception classes covering ML pipelines, feature engineering, model training
20
20
  - **🔧 Production Ready**: Comprehensive logging helpers and error context
21
21
  - **📚 Academic Quality**: Proper documentation, type hints, and citation support
22
22
  - **🐍 Python 3.10+**: Modern Python with full type safety
@@ -41,8 +41,8 @@ poetry install
41
41
  ### Basic Usage
42
42
 
43
43
  ```python
44
- from dataexcept import ValidationError, ModelTrainingError
45
- from dataexcept.datascience_exceptions import DataLoadingError
44
+ from dataexcept import ValidationError
45
+ from dataexcept.datascience_exceptions import DataLoadingError, ModelTrainingError
46
46
  import pandas as pd
47
47
 
48
48
  # Data validation with context
@@ -188,17 +188,18 @@ except Exception as exc:
188
188
  ### Command Line Interface
189
189
 
190
190
  ```bash
191
- # List all available exception classes
191
+ # List every exception class the package exports (98 of them, alphabetically)
192
192
  $ dataexcept list
193
- JobError
194
- ValidationError
195
- DataScienceError
196
- ModelTrainingError
197
- ... (40+ more)
193
+ ApiError
194
+ AuthenticationError
195
+ AuthorizationError
196
+ BatchProcessingError
197
+ BiasDetectionError
198
+ ...
198
199
 
199
200
  # Check version
200
201
  $ dataexcept --version
201
- dataexcept 0.1.0
202
+ dataexcept 0.2.1
202
203
  ```
203
204
 
204
205
  ## 🎯 Use Cases
@@ -229,6 +230,7 @@ dataexcept 0.1.0
229
230
  """
230
231
  Complete ML pipeline with DataExcept error handling
231
232
  """
233
+ import numpy as np
232
234
  import pandas as pd
233
235
  from sklearn.ensemble import RandomForestClassifier
234
236
  from dataexcept import ValidationError
@@ -343,12 +345,12 @@ through [SECURITY.md](SECURITY.md), not the public issue tracker.
343
345
  If you use DataExcept in your research, please cite it:
344
346
 
345
347
  ```bibtex
346
- @software{ribeiro_dataexcept_2025,
348
+ @software{ribeiro_dataexcept_2026,
347
349
  author = {Ribeiro, Diogo},
348
350
  title = {DataExcept: Structured Exception Handling for Data Science},
349
351
  url = {https://github.com/DiogoRibeiro7/DataExcept},
350
- version = {0.1.0},
351
- year = {2025},
352
+ version = {0.2.1},
353
+ year = {2026},
352
354
  publisher = {GitHub}
353
355
  }
354
356
  ```
@@ -12,9 +12,14 @@ from typing import Iterable
12
12
  from . import __path__ as _PKG_PATH
13
13
  from . import __version__
14
14
 
15
+ #: Deprecated compatibility shims. Listing these would advertise names that are
16
+ #: scheduled for removal, and importing them emits a DeprecationWarning at
17
+ #: anyone who merely wanted to see what the package offers.
18
+ _DEPRECATED_MODULES = frozenset({"dataexcept.job_exceptions"})
19
+
15
20
 
16
21
  def _iter_exception_modules() -> Iterable[ModuleType]:
17
- """Yield every submodule that explicitly defines ``__all__``."""
22
+ """Yield every non-deprecated submodule that explicitly defines ``__all__``."""
18
23
  allowed_suffixes = ("exceptions", "_exceptions")
19
24
 
20
25
  for module_info in pkgutil.walk_packages(
@@ -22,6 +27,8 @@ def _iter_exception_modules() -> Iterable[ModuleType]:
22
27
  ):
23
28
  if not module_info.name.endswith(allowed_suffixes):
24
29
  continue
30
+ if module_info.name in _DEPRECATED_MODULES:
31
+ continue
25
32
  try:
26
33
  module = import_module(module_info.name)
27
34
  except ImportError as exc: # pragma: no cover - defensive guard
@@ -53,7 +60,11 @@ def _list_exceptions() -> None:
53
60
 
54
61
  def main(argv: list[str] | None = None) -> None:
55
62
  """Entry point for the ``dataexcept`` command."""
56
- parser = argparse.ArgumentParser(description="Utilities for DataExcept")
63
+ parser = argparse.ArgumentParser(
64
+ # Without this, `python -m dataexcept --version` reports "__main__.py".
65
+ prog="dataexcept",
66
+ description="Utilities for DataExcept",
67
+ )
57
68
  parser.add_argument(
58
69
  "--version",
59
70
  action="version",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "DataExcept"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "A Python package providing structured, easily-extendable custom exception types."
5
5
  readme = "README.md"
6
6
  license = "MIT"
File without changes