hapi-schema 0.9.2__tar.gz → 0.9.3__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.
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/PKG-INFO +3 -3
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/changelog.md +6 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/pyproject.toml +2 -2
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/requirements.txt +4 -4
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/_version.py +2 -2
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_idps.py +2 -7
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_returnees.py +2 -5
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.config/coveragerc +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.config/pre-commit-config.yaml +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.config/pytest.ini +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.config/ruff.toml +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.github/workflows/publish.yaml +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.github/workflows/run-python-tests.yaml +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/.gitignore +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/LICENSE +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/README.md +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/contributing.md +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/docker/docker-compose.yml +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/initialize_test_db.sh +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/__init__.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_admin1.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_admin2.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_conflict_event.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_currency.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_dataset.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_food_price.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_food_security.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_funding.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_humanitarian_needs.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_location.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_national_risk.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_operational_presence.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_org.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_org_type.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_patch.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_population.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_poverty_rate.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_refugees.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_resource.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_sector.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_views_as_tables.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_wfp_commodity.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/db_wfp_market.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/__init__.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/base.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/constraints.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/enums.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/hapi_views_code_generator.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/view_as_table_code_generator.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/view_as_table_definitions.toml +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/view_params.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/views.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/conftest.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/__init__.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_admin1.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_admin2.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_conflict_event.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_currency.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_dataset.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_food_price.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_food_security.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_funding.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_humanitarian_needs.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_idps.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_location.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_national_risk.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_operational_presence.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_org.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_org_type.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_patch.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_population.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_poverty_rate.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_refugees.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_resource.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_returnees.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_sector.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_wfp_commodity.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/sample_data/data_wfp_market.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_admin1.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_admin2.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_conflict_event.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_currency.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_dataset.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_food_price.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_food_security.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_funding.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_humanitarian_needs.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_idps.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_location.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_national_risk.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_operational_presence.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_org.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_org_type.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_patch.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_population.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_poverty_rate.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_refugees.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_resource.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_returnees.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_sector.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_views_as_tables.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_wfp_commodity.py +0 -0
- {hapi_schema-0.9.2 → hapi_schema-0.9.3}/tests/test_wfp_market.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: hapi-schema
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.3
|
|
4
4
|
Summary: HAPI database schema specified in SQLAlchemy
|
|
5
5
|
Project-URL: Homepage, https://github.com/OCHA-DAP/hapi-schemas
|
|
6
6
|
Author-email: Simon Johnson <simon.johnson@un.org>
|
|
@@ -26,11 +26,11 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
26
26
|
Requires-Python: >=3.8
|
|
27
27
|
Requires-Dist: sqlalchemy
|
|
28
28
|
Provides-Extra: database
|
|
29
|
-
Requires-Dist: hdx-python-database>=1.3.
|
|
29
|
+
Requires-Dist: hdx-python-database>=1.3.4; extra == 'database'
|
|
30
30
|
Provides-Extra: dev
|
|
31
31
|
Requires-Dist: pre-commit; extra == 'dev'
|
|
32
32
|
Provides-Extra: test
|
|
33
|
-
Requires-Dist: hdx-python-database>=1.3.
|
|
33
|
+
Requires-Dist: hdx-python-database>=1.3.4; extra == 'test'
|
|
34
34
|
Requires-Dist: psycopg[binary]; extra == 'test'
|
|
35
35
|
Requires-Dist: pytest; extra == 'test'
|
|
36
36
|
Requires-Dist: pytest-cov; extra == 'test'
|
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.9.3
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Inconsistent definitions of reference_period_start, reference_period_end
|
|
13
|
+
|
|
8
14
|
## 0.9.2
|
|
9
15
|
|
|
10
16
|
### Changed
|
|
@@ -42,9 +42,9 @@ content-type = "text/markdown"
|
|
|
42
42
|
Homepage = "https://github.com/OCHA-DAP/hapi-schemas"
|
|
43
43
|
|
|
44
44
|
[project.optional-dependencies]
|
|
45
|
-
database = ["hdx-python-database>=1.3.
|
|
45
|
+
database = ["hdx-python-database>=1.3.4"]
|
|
46
46
|
dev = ["pre-commit"]
|
|
47
|
-
test = ["hdx-python-database>=1.3.
|
|
47
|
+
test = ["hdx-python-database>=1.3.4", "psycopg[binary]", "pytest", "pytest-cov"]
|
|
48
48
|
|
|
49
49
|
#########
|
|
50
50
|
# Hatch #
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# uv pip compile pyproject.toml --resolver=backtracking --all-extras -o requirements.txt
|
|
3
3
|
cfgv==3.4.0
|
|
4
4
|
# via pre-commit
|
|
5
|
-
coverage==7.6.
|
|
5
|
+
coverage==7.6.4
|
|
6
6
|
# via pytest-cov
|
|
7
7
|
distlib==0.3.9
|
|
8
8
|
# via virtualenv
|
|
@@ -10,7 +10,7 @@ filelock==3.16.1
|
|
|
10
10
|
# via virtualenv
|
|
11
11
|
greenlet==3.1.1
|
|
12
12
|
# via sqlalchemy
|
|
13
|
-
hdx-python-database==1.3.
|
|
13
|
+
hdx-python-database==1.3.4
|
|
14
14
|
# via hapi-schema (pyproject.toml)
|
|
15
15
|
identify==2.6.1
|
|
16
16
|
# via pre-commit
|
|
@@ -38,7 +38,7 @@ pytest-cov==5.0.0
|
|
|
38
38
|
# via hapi-schema (pyproject.toml)
|
|
39
39
|
pyyaml==6.0.2
|
|
40
40
|
# via pre-commit
|
|
41
|
-
sqlalchemy==2.0.
|
|
41
|
+
sqlalchemy==2.0.36
|
|
42
42
|
# via
|
|
43
43
|
# hapi-schema (pyproject.toml)
|
|
44
44
|
# hdx-python-database
|
|
@@ -46,5 +46,5 @@ typing-extensions==4.12.2
|
|
|
46
46
|
# via
|
|
47
47
|
# psycopg
|
|
48
48
|
# sqlalchemy
|
|
49
|
-
virtualenv==20.
|
|
49
|
+
virtualenv==20.27.0
|
|
50
50
|
# via pre-commit
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
from sqlalchemy import (
|
|
6
|
-
DateTime,
|
|
7
6
|
ForeignKey,
|
|
8
7
|
Integer,
|
|
9
8
|
String,
|
|
@@ -57,13 +56,9 @@ class DBIDPs(Base):
|
|
|
57
56
|
population: Mapped[int] = mapped_column(
|
|
58
57
|
Integer, nullable=False, index=True
|
|
59
58
|
)
|
|
60
|
-
|
|
61
|
-
reference_period_start: Mapped[datetime] = mapped_column(
|
|
62
|
-
DateTime, primary_key=True
|
|
63
|
-
)
|
|
64
|
-
|
|
59
|
+
reference_period_start: Mapped[datetime] = mapped_column(primary_key=True)
|
|
65
60
|
reference_period_end: Mapped[datetime] = mapped_column(
|
|
66
|
-
|
|
61
|
+
nullable=False, index=True
|
|
67
62
|
)
|
|
68
63
|
|
|
69
64
|
resource = relationship(DBResource)
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
|
|
8
8
|
from sqlalchemy import (
|
|
9
|
-
DateTime,
|
|
10
9
|
ForeignKey,
|
|
11
10
|
Integer,
|
|
12
11
|
String,
|
|
@@ -64,11 +63,9 @@ class DBReturnees(Base):
|
|
|
64
63
|
population: Mapped[int] = mapped_column(
|
|
65
64
|
Integer, nullable=False, index=True
|
|
66
65
|
)
|
|
67
|
-
reference_period_start: Mapped[datetime] = mapped_column(
|
|
68
|
-
DateTime, primary_key=True
|
|
69
|
-
)
|
|
66
|
+
reference_period_start: Mapped[datetime] = mapped_column(primary_key=True)
|
|
70
67
|
reference_period_end: Mapped[datetime] = mapped_column(
|
|
71
|
-
|
|
68
|
+
nullable=False, index=True
|
|
72
69
|
)
|
|
73
70
|
|
|
74
71
|
# resource = relationship("DBResource")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/view_as_table_code_generator.py
RENAMED
|
File without changes
|
{hapi_schema-0.9.2 → hapi_schema-0.9.3}/src/hapi_schema/utils/view_as_table_definitions.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|