jsonstat-validator 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl
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.
- jsonstat_validator/__init__.py +13 -5
- jsonstat_validator/models.py +1 -1
- {jsonstat_validator-0.2.0.dist-info → jsonstat_validator-0.2.2.dist-info}/METADATA +3 -3
- jsonstat_validator-0.2.2.dist-info/RECORD +8 -0
- {jsonstat_validator-0.2.0.dist-info → jsonstat_validator-0.2.2.dist-info}/WHEEL +1 -1
- jsonstat_validator-0.2.0.dist-info/RECORD +0 -8
- {jsonstat_validator-0.2.0.dist-info → jsonstat_validator-0.2.2.dist-info}/licenses/LICENSE +0 -0
- {jsonstat_validator-0.2.0.dist-info → jsonstat_validator-0.2.2.dist-info}/top_level.txt +0 -0
jsonstat_validator/__init__.py
CHANGED
@@ -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
|
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.
|
22
|
+
__version__ = "0.2.2"
|
17
23
|
__all__ = [
|
24
|
+
"Category",
|
25
|
+
"Collection",
|
18
26
|
"Dataset",
|
19
27
|
"Dimension",
|
20
|
-
"
|
28
|
+
"JSONStatBaseModel",
|
21
29
|
"JSONStatSchema",
|
22
30
|
"validate_jsonstat",
|
23
31
|
]
|
jsonstat_validator/models.py
CHANGED
@@ -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
|
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.
|
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.
|
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
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
jsonstat_validator/__init__.py,sha256=dYX6PobfFXuSq2PlHq89EO-dnkjzLep0rMSpSLXng84,806
|
2
|
+
jsonstat_validator/models.py,sha256=71hDpPG95nr2IMtvDThQAKwjk8JNPB-hRLKL4bPFmzU,29295
|
3
|
+
jsonstat_validator/validator.py,sha256=gESY5uRHgw_Bskm2U2IAS2P3GDkHcNVIoBR69BNwWFY,1799
|
4
|
+
jsonstat_validator-0.2.2.dist-info/licenses/LICENSE,sha256=cyCvx3tHW8u9ZWGkTMrCKaB2ft4RonlMBVOEHDa2tEk,1091
|
5
|
+
jsonstat_validator-0.2.2.dist-info/METADATA,sha256=hT_Z9GmQ3H72Q1Ed0yHRCzJCQS7wLCMDhd_wJgwNCpw,7315
|
6
|
+
jsonstat_validator-0.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
jsonstat_validator-0.2.2.dist-info/top_level.txt,sha256=l6xoMFlWGRRbXMxl4MG-q0FA3In7rYZLBzVF8W7IhdU,19
|
8
|
+
jsonstat_validator-0.2.2.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
jsonstat_validator/__init__.py,sha256=-GDRGaLHUY9jGk6WTJxku5lONzor3ccI_5eWTttrvwU,708
|
2
|
-
jsonstat_validator/models.py,sha256=QoPXmdS72Qu4ooG_kZLKVt4YfAEjVA4GUa_F0DTYgAw,29287
|
3
|
-
jsonstat_validator/validator.py,sha256=gESY5uRHgw_Bskm2U2IAS2P3GDkHcNVIoBR69BNwWFY,1799
|
4
|
-
jsonstat_validator-0.2.0.dist-info/licenses/LICENSE,sha256=cyCvx3tHW8u9ZWGkTMrCKaB2ft4RonlMBVOEHDa2tEk,1091
|
5
|
-
jsonstat_validator-0.2.0.dist-info/METADATA,sha256=1G4cfvfxSGwzyGyozVcKwR5ITQVAV5xo_S_8cndfesU,7353
|
6
|
-
jsonstat_validator-0.2.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
7
|
-
jsonstat_validator-0.2.0.dist-info/top_level.txt,sha256=l6xoMFlWGRRbXMxl4MG-q0FA3In7rYZLBzVF8W7IhdU,19
|
8
|
-
jsonstat_validator-0.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|