jsonstat-validator 0.2.0__tar.gz → 0.2.2__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 (18) hide show
  1. {jsonstat_validator-0.2.0/jsonstat_validator.egg-info → jsonstat_validator-0.2.2}/PKG-INFO +3 -3
  2. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/README.md +2 -2
  3. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator/__init__.py +13 -5
  4. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator/models.py +1 -1
  5. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2/jsonstat_validator.egg-info}/PKG-INFO +3 -3
  6. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/pyproject.toml +1 -1
  7. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/LICENSE +0 -0
  8. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/MANIFEST.in +0 -0
  9. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator/validator.py +0 -0
  10. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator.egg-info/SOURCES.txt +0 -0
  11. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator.egg-info/dependency_links.txt +0 -0
  12. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator.egg-info/requires.txt +0 -0
  13. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/jsonstat_validator.egg-info/top_level.txt +0 -0
  14. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/requirements.txt +0 -0
  15. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/setup.cfg +0 -0
  16. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/setup.py +0 -0
  17. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/tests/test_custom.py +0 -0
  18. {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.2}/tests/test_official_samples.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jsonstat-validator
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: A Python validator for the JSON-stat 2.0 standard format, based on Pydantic.
5
5
  Author-email: Ahmed Hassan <ahmedhassan.ahmed@fao.org>
6
6
  License: # MIT License
@@ -155,7 +155,8 @@ pytest
155
155
 
156
156
  ### Creating a New Release
157
157
 
158
- 1. Create a new release on GitHub with a tag in the format `vX.Y.Z`
158
+ 1. Update the `CHANGELOG.md`.
159
+ 2. Create a new release on GitHub with a tag in the format `vX.Y.Z`
159
160
 
160
161
  The GitHub Actions workflow will automatically:
161
162
 
@@ -163,7 +164,6 @@ The GitHub Actions workflow will automatically:
163
164
  - Build the package
164
165
  - Update version numbers in both `__init__.py` and `pyproject.toml`
165
166
  - Publish the package to PyPI
166
- - Update the CHANGELOG.md with the release date and commit messages
167
167
 
168
168
  ## Contributing
169
169
 
@@ -101,7 +101,8 @@ pytest
101
101
 
102
102
  ### Creating a New Release
103
103
 
104
- 1. Create a new release on GitHub with a tag in the format `vX.Y.Z`
104
+ 1. Update the `CHANGELOG.md`.
105
+ 2. Create a new release on GitHub with a tag in the format `vX.Y.Z`
105
106
 
106
107
  The GitHub Actions workflow will automatically:
107
108
 
@@ -109,7 +110,6 @@ The GitHub Actions workflow will automatically:
109
110
  - Build the package
110
111
  - Update version numbers in both `__init__.py` and `pyproject.toml`
111
112
  - Publish the package to PyPI
112
- - Update the CHANGELOG.md with the release date and commit messages
113
113
 
114
114
  ## Contributing
115
115
 
@@ -1,5 +1,4 @@
1
- """
2
- JSON-stat validator.
1
+ """JSON-stat validator.
3
2
 
4
3
  A validator for the JSON-stat 2.0 format, a simple lightweight JSON format
5
4
  for data dissemination. It is based in a cube model that arises from the
@@ -10,14 +9,23 @@ dimensions are organized in categories.
10
9
  For more information on JSON-stat, see: https://json-stat.org/
11
10
  """
12
11
 
13
- from jsonstat_validator.models import Collection, Dataset, Dimension, JSONStatSchema
12
+ from jsonstat_validator.models import (
13
+ Category,
14
+ Collection,
15
+ Dataset,
16
+ Dimension,
17
+ JSONStatBaseModel,
18
+ JSONStatSchema,
19
+ )
14
20
  from jsonstat_validator.validator import validate_jsonstat
15
21
 
16
- __version__ = "0.2.0"
22
+ __version__ = "0.2.2"
17
23
  __all__ = [
24
+ "Category",
25
+ "Collection",
18
26
  "Dataset",
19
27
  "Dimension",
20
- "Collection",
28
+ "JSONStatBaseModel",
21
29
  "JSONStatSchema",
22
30
  "validate_jsonstat",
23
31
  ]
@@ -184,7 +184,7 @@ class Category(JSONStatBaseModel):
184
184
  def validate_category(self):
185
185
  """Category-wide validation checks."""
186
186
  # Ensure at least one of index or label fields is provided
187
- if not self.index and not self.label:
187
+ if self.index is None and self.label is None:
188
188
  raise ValueError("At least one of `index` or `label` is required.")
189
189
 
190
190
  # Ensure index and label have the same keys if both are dictionaries
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jsonstat-validator
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: A Python validator for the JSON-stat 2.0 standard format, based on Pydantic.
5
5
  Author-email: Ahmed Hassan <ahmedhassan.ahmed@fao.org>
6
6
  License: # MIT License
@@ -155,7 +155,8 @@ pytest
155
155
 
156
156
  ### Creating a New Release
157
157
 
158
- 1. Create a new release on GitHub with a tag in the format `vX.Y.Z`
158
+ 1. Update the `CHANGELOG.md`.
159
+ 2. Create a new release on GitHub with a tag in the format `vX.Y.Z`
159
160
 
160
161
  The GitHub Actions workflow will automatically:
161
162
 
@@ -163,7 +164,6 @@ The GitHub Actions workflow will automatically:
163
164
  - Build the package
164
165
  - Update version numbers in both `__init__.py` and `pyproject.toml`
165
166
  - Publish the package to PyPI
166
- - Update the CHANGELOG.md with the release date and commit messages
167
167
 
168
168
  ## Contributing
169
169
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "jsonstat-validator"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "A Python validator for the JSON-stat 2.0 standard format, based on Pydantic."
9
9
  readme = "README.md"
10
10
  authors = [