jsonstat-validator 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.
- {jsonstat_validator-0.2.0/jsonstat_validator.egg-info → jsonstat_validator-0.2.1}/PKG-INFO +3 -3
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/README.md +2 -2
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator/__init__.py +10 -4
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator/models.py +1 -1
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1/jsonstat_validator.egg-info}/PKG-INFO +3 -3
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/pyproject.toml +1 -1
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/LICENSE +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/MANIFEST.in +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator/validator.py +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/SOURCES.txt +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/dependency_links.txt +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/requires.txt +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/top_level.txt +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/requirements.txt +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/setup.cfg +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/setup.py +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/tests/test_custom.py +0 -0
- {jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/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.
|
3
|
+
Version: 0.2.1
|
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
|
|
@@ -101,7 +101,8 @@ pytest
|
|
101
101
|
|
102
102
|
### Creating a New Release
|
103
103
|
|
104
|
-
1.
|
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,21 @@ 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
|
+
JSONStatSchema,
|
18
|
+
)
|
14
19
|
from jsonstat_validator.validator import validate_jsonstat
|
15
20
|
|
16
|
-
__version__ = "0.2.
|
21
|
+
__version__ = "0.2.1"
|
17
22
|
__all__ = [
|
18
23
|
"Dataset",
|
19
24
|
"Dimension",
|
20
25
|
"Collection",
|
26
|
+
"Category",
|
21
27
|
"JSONStatSchema",
|
22
28
|
"validate_jsonstat",
|
23
29
|
]
|
@@ -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.1
|
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
|
|
File without changes
|
File without changes
|
File without changes
|
{jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/requires.txt
RENAMED
File without changes
|
{jsonstat_validator-0.2.0 → jsonstat_validator-0.2.1}/jsonstat_validator.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|