jsonstat-validator 0.2.0__py3-none-any.whl → 0.2.1__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.
@@ -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 Collection, Dataset, Dimension, JSONStatSchema
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.0"
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 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.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. 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
 
@@ -0,0 +1,8 @@
1
+ jsonstat_validator/__init__.py,sha256=yk3ewhaGDElq8SxGsh4f4wru4aaEFAyesFQkU60OJaE,758
2
+ jsonstat_validator/models.py,sha256=71hDpPG95nr2IMtvDThQAKwjk8JNPB-hRLKL4bPFmzU,29295
3
+ jsonstat_validator/validator.py,sha256=gESY5uRHgw_Bskm2U2IAS2P3GDkHcNVIoBR69BNwWFY,1799
4
+ jsonstat_validator-0.2.1.dist-info/licenses/LICENSE,sha256=cyCvx3tHW8u9ZWGkTMrCKaB2ft4RonlMBVOEHDa2tEk,1091
5
+ jsonstat_validator-0.2.1.dist-info/METADATA,sha256=VshzQoakyR42bmM07ujd_6PlodDFMeyAG2hTikCeCR4,7315
6
+ jsonstat_validator-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ jsonstat_validator-0.2.1.dist-info/top_level.txt,sha256=l6xoMFlWGRRbXMxl4MG-q0FA3In7rYZLBzVF8W7IhdU,19
8
+ jsonstat_validator-0.2.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -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,,