Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for bringing dev into prod #137

Merged
merged 239 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
fc26366
Merge pull request #77 from OCHA-DAP/main
SimonbJohnson Apr 13, 2024
3e8f8f3
HDX-9755 & HDX-9756 update sqlalchemy schema, redo alembic steps & ad…
ccataalin Apr 24, 2024
0a845e3
remove unused import
ccataalin Apr 24, 2024
26a4454
recreate alembic revision to add patch table
ccataalin Apr 25, 2024
1b09241
HDX-9744 filter requests with invalid identifier
alexandru-m-g Apr 30, 2024
e3d3d21
HDX-9744 adding app_identifier param
alexandru-m-g May 2, 2024
87440f5
HDX-9791 add mixpanel tracking
ccataalin May 2, 2024
ff4c4f9
Merge pull request #82 from OCHA-DAP/main
ccataalin May 7, 2024
35ffb08
HDX-9791 add tests
ccataalin May 8, 2024
7df19ba
HDX-9801 tests for app identifier
danmihaila May 9, 2024
0246710
HDX-9799 Disallow calls to encode identifier with no parameters
IanHopkinson May 9, 2024
d11c9ab
HDX-9799 Remove other tests which now fail because they do not provid…
IanHopkinson May 9, 2024
a812121
HDX-9801 tests for app identifier
danmihaila May 9, 2024
8d9e233
HDX-9799 Debug print to find out why the error response in GitHub Act…
IanHopkinson May 9, 2024
0de85d9
HDX-9799 Fix test in GitHub Actions by matching URL key which depends…
IanHopkinson May 9, 2024
161a20f
Merge branch 'feature/HDX-9791-add-mixpanel-tracking' into feature/hd…
danmihaila May 9, 2024
5e96b29
HDX-9804 Put response data into a data key for operational_presence e…
IanHopkinson May 9, 2024
c3bada2
Merge pull request #84 from OCHA-DAP/feature/hdx-9801
danmihaila May 9, 2024
a70d0fc
Merge pull request #83 from OCHA-DAP/feature/HDX-9791-add-mixpanel-tr…
danmihaila May 9, 2024
04fec96
Merge remote-tracking branch 'origin/HDX-9799_encode_identifier_fix' …
alexandru-m-g May 9, 2024
dd96fb5
HDX-9805 add openapi servers spec
ccataalin May 9, 2024
52cc0ad
Merge branch 'dev' into feature/HDX-9805-specify-openapi-servers
ccataalin May 9, 2024
b8eb6a4
Merge pull request #87 from OCHA-DAP/feature/HDX-9805-specify-openapi…
danmihaila May 9, 2024
dc767a5
Merge branch 'dev' into feature/HDX-9756-update-schema-adapt-endpoints
ccataalin May 9, 2024
857eb27
fix lint errors
ccataalin May 9, 2024
e34e76f
HDX-9798 add page view for /docs + fix tests
danmihaila May 9, 2024
3784a63
Merge pull request #86 from OCHA-DAP/feature/HDX-9756-update-schema-a…
ccataalin May 9, 2024
aff4fdf
HDX-9798 rename test for docs page tracking
danmihaila May 9, 2024
08f020f
HDX-9798 exact 1 call count for mixpanel call for /docs page
danmihaila May 9, 2024
d670620
Merge pull request #88 from OCHA-DAP/feature/hdx-9798
danmihaila May 9, 2024
f0e7bc3
HDX-9804 Update admin endpoint including fix for tests
IanHopkinson May 10, 2024
ce31235
HDX-9804 the encode identifier endpoint needs special treatment becau…
IanHopkinson May 10, 2024
8dabe37
HDX9804 Update the other endpoints and tests
IanHopkinson May 10, 2024
05efe20
HX-9804 - fix linter issues - typically the problem is with importing…
IanHopkinson May 10, 2024
d83e850
Merge branch 'dev' into feature/HDX-9804_response_in_data_key
IanHopkinson May 10, 2024
492bdda
HDX-9804 Readd the new util functions for the encode_identifier endpoint
IanHopkinson May 10, 2024
3d09a8f
Merge pull request #89 from OCHA-DAP/feature/HDX-9804_response_in_dat…
alexandru-m-g May 10, 2024
ec1312b
Merge pull request #90 from OCHA-DAP/dev
SimonbJohnson May 12, 2024
778887d
updating docs
SimonbJohnson May 13, 2024
3e68e84
Checks for packages that are missing an __init__.py file
alexandru-m-g May 14, 2024
62dcf8f
HDX-9818 small mixpanel refactoring
alexandru-m-g May 14, 2024
98e38ba
HDX-9818 replacing old views + disabling all routes except location a…
alexandru-m-g May 14, 2024
baca987
HDX-9818 database init changes for tests
alexandru-m-g May 14, 2024
6388c3e
HDX-9821 adapting the location/admin code to work with new schema
alexandru-m-g May 14, 2024
eb1a463
HDX-9819 Add new test data for revised resource and dataset tables
IanHopkinson May 15, 2024
7a1abf2
HDX-9819 Dataset endpoint tests now passing
IanHopkinson May 15, 2024
c349ee8
HDX-9820 adapted sector view
danmihaila May 15, 2024
b7b80be
HDX-9820 adapted org_type view
danmihaila May 15, 2024
6136c07
HDX-9820 adapted org view
danmihaila May 15, 2024
1a18b63
HDX-9821 reference period query params for location/admins
alexandru-m-g May 15, 2024
0b2867b
HDX-9818 adding the views for conflict events and poverty rate
alexandru-m-g May 15, 2024
a749e8b
HDX-9819 Updated dataset to include the provider link
IanHopkinson May 16, 2024
4cdb01e
HDX-9819 Completed implementation of the resource endpoint for the ne…
IanHopkinson May 16, 2024
e78ae7b
HDX-9819 Fix for the linter
IanHopkinson May 16, 2024
8473816
Merge pull request #91 from OCHA-DAP/feature/HDX-9820-hum-response
alexandru-m-g May 16, 2024
c45ca54
Merge pull request #92 from OCHA-DAP/feature/HDX-9821-location-admin-…
alexandru-m-g May 16, 2024
163c035
HDX-9819 Add code to calculate organization hdx api urls
IanHopkinson May 16, 2024
d3859e2
Merge branch 'feature/HDX-9818-prepare-for-new-schema' into HDX-9819_…
IanHopkinson May 16, 2024
30440db
Merge pull request #93 from OCHA-DAP/HDX-9819_dataset_resource_new_sc…
IanHopkinson May 16, 2024
cfdaa65
Adding back original sample data and check on case insensitive search…
alexandru-m-g May 16, 2024
161a7ee
HDX-9818 put sample data in their own folder
alexandru-m-g May 16, 2024
713e16f
Better typing for util functions
alexandru-m-g May 16, 2024
03e2833
HDX-9829 Initial commit to allow import of work so far on the HDX-981…
IanHopkinson May 17, 2024
c95496a
Merge branch 'feature/HDX-9819_dataset_resource_new_schema' into feat…
IanHopkinson May 17, 2024
e510683
HDX-9829 Get test fixtures to consistency
IanHopkinson May 17, 2024
2896670
Merge pull request #95 from OCHA-DAP/feature/better-typing-for-util-f…
alexandru-m-g May 17, 2024
94b9c67
Merge pull request #94 from OCHA-DAP/docs/update-user-feedback-2
alexandru-m-g May 17, 2024
8366014
HDX-9829 Population tests now all passing
IanHopkinson May 18, 2024
42caee8
HDX-9830 adpating 3w to new schema
alexandru-m-g May 17, 2024
fd2ef0a
HDX-9829 Sort of test for the get_populations route since API docs is…
IanHopkinson May 18, 2024
09ff437
HDX-9829 Working my way from route to service to populations_view_lis…
IanHopkinson May 19, 2024
a9f7ac8
HDX-9830 new funding endpoint and logic
alexandru-m-g May 18, 2024
200b8a1
HDX-9818 refactoring pydantic models with admins
alexandru-m-g May 18, 2024
0c1fe96
HDX-9818 extracting common admin query filter
alexandru-m-g May 19, 2024
535015f
HDX-9836 new conflict data endpoint and logic
alexandru-m-g May 20, 2024
45abe74
HDX-9829 Update of utils with new reference and location related clas…
IanHopkinson May 20, 2024
1863233
HDX-9829 Docs endpoint now working but tests failing
IanHopkinson May 20, 2024
9de62e3
HDX-9829 Get the tests to pass - issue with max_age but also not appr…
IanHopkinson May 20, 2024
abac7e5
HDX-9829 Change population route to population-social from themes
IanHopkinson May 20, 2024
6cc2147
HDX-9829 Tidy up the test fixtures
IanHopkinson May 20, 2024
fec614f
HDX-9829 Add diagnostics to the failing test
IanHopkinson May 20, 2024
cc33702
HDX-9829 Fix linter issues
IanHopkinson May 20, 2024
2a2e400
Merge branch 'feature/HDX-9818-prepare-for-new-schema' into feature/H…
IanHopkinson May 20, 2024
42a2d3e
HDX-9829 Delete the test_route_calls test since it wasn't a proper te…
IanHopkinson May 20, 2024
cf52a08
Merge branch 'feature/HDX-9829_population' of https://github.com/OCHA…
IanHopkinson May 20, 2024
2c135eb
Merge pull request #96 from OCHA-DAP/feature/HDX-9830-3w-and-funding
danmihaila May 20, 2024
9da2e51
Merge pull request #97 from OCHA-DAP/feature/HDX-9836-conflict-events
danmihaila May 20, 2024
a7cd03b
HDX-9831 - initial hum needs
danmihaila May 20, 2024
d6421e1
HDX-9831 - hum needs
danmihaila May 21, 2024
8d9d0aa
HDX-9829 Change gender field to Gender enumeration for the population…
IanHopkinson May 21, 2024
b9e8a9c
HDX-9829 Update sample sql names
IanHopkinson May 21, 2024
0377d9d
Merge branch 'feature/HDX-9818-prepare-for-new-schema' into feature/H…
IanHopkinson May 21, 2024
0567c48
HDX-9829 Fix the failing test
IanHopkinson May 21, 2024
066c405
Merge branch 'feature/HDX-9829_population' of https://github.com/OCHA…
IanHopkinson May 21, 2024
9e85d66
HDX-9829 Fix linter issues
IanHopkinson May 21, 2024
80a5534
HDX-9831 - hum needs + tests
danmihaila May 21, 2024
45b3241
HDX-9829 use correct inheritance for response which fixes tests.
IanHopkinson May 21, 2024
e49f656
HDX-9831 - fix some tests
danmihaila May 21, 2024
88c6f09
HDX-9831 - improve pydantic validation
danmihaila May 21, 2024
aa984bd
HDX-9831 - improve pydantic validation
danmihaila May 21, 2024
e086bf7
HDX-9829 Remove duplicate - EntityWithLocationAdmin
IanHopkinson May 21, 2024
26a1972
Merge pull request #98 from OCHA-DAP/feature/HDX-9829_population
alexandru-m-g May 21, 2024
4babdff
HDX-9831 - cleanup code
danmihaila May 21, 2024
31bf223
Merge branch 'feature/HDX-9818-prepare-for-new-schema' into feature/H…
danmihaila May 21, 2024
89198f6
HDX-9846 - refugees
danmihaila May 21, 2024
81abe01
HDX-9844 national risk endpoint
alexandru-m-g May 21, 2024
db27e83
Merge pull request #99 from OCHA-DAP/feature/HDX-9831-hum-needs
danmihaila May 22, 2024
9acd282
Merge pull request #100 from OCHA-DAP/feature/HDX-9846-refugees
danmihaila May 22, 2024
7b5b6dc
HDX-9846 - fix linter
danmihaila May 22, 2024
981ffc9
Merge pull request #103 from OCHA-DAP/feature/HDX-9831-hum-needs-1
danmihaila May 22, 2024
9c3133d
Merge branch 'feature/HDX-9818-prepare-for-new-schema' into feature/H…
danmihaila May 22, 2024
53c6766
Merge pull request #101 from OCHA-DAP/feature/HDX-9844-national-risk
danmihaila May 22, 2024
fbe2ca4
fix for api call tracking test
alexandru-m-g May 21, 2024
f912661
HDX-9834 remove unneeded endpoints + logic + tests
alexandru-m-g May 21, 2024
6b08db8
updating schema to 0.8.3 in preparation for the food prices endpoints
alexandru-m-g May 21, 2024
0d2d971
Merge pull request #102 from OCHA-DAP/feature/HDX-9834-remove-tests-u…
danmihaila May 22, 2024
5886d84
views adapted to schema 0.8.3
alexandru-m-g May 22, 2024
7c7c7a3
update urls for tests
danmihaila May 22, 2024
ec1ddc1
Merge pull request #104 from OCHA-DAP/feature/HDX-9818-prepare-for-ne…
danmihaila May 22, 2024
67cec9b
HDX-9852 use app_identifier instead of identifier throughout the API
alexandru-m-g May 22, 2024
05e41af
HDX-9847 Work in progress whilst I checkout another branch
IanHopkinson May 23, 2024
6744406
Merge pull request #108 from OCHA-DAP/feature/HDX-9852-app-identifier
danmihaila May 23, 2024
b9df25f
update all views and new sql alchemy schema version
danmihaila May 23, 2024
30d016c
Merge pull request #110 from OCHA-DAP/feature/HDX-9818-dan
danmihaila May 23, 2024
830503d
Merge pull request #109 from OCHA-DAP/feature/HDX-9818-prepare-for-ne…
danmihaila May 23, 2024
d89dc6f
fix failing test_endpoints_vs_encode_identifier
danmihaila May 23, 2024
d8ef9de
HDX-9847 Live endpoint now returning data
IanHopkinson May 23, 2024
5938180
HDX-9847 All tests for food_security now passing
IanHopkinson May 23, 2024
3051422
HAPI-9848 wfp commodity endpoint + logic
alexandru-m-g May 23, 2024
e0cee12
HDX-9849 poverty rate endpoint
danmihaila May 23, 2024
819842c
HDX-9849 poverty rate fix linter
danmihaila May 23, 2024
c6c4800
HDX-9847 Update all_views.py from dev branch
IanHopkinson May 24, 2024
beb8895
HDX-9847 Update endpoints from food_security to food-security
IanHopkinson May 24, 2024
8d52216
HDX-9847 Linter fixes
IanHopkinson May 24, 2024
bb941d2
Merge branch 'dev' into feature/HDX-9847_update_food_security_table
danmihaila May 24, 2024
99dd7c8
Update launch.json
danmihaila May 24, 2024
029ab19
Update launch.json
danmihaila May 24, 2024
667eff5
Update requirements.txt
danmihaila May 24, 2024
119c92a
Update run-tests.yml
danmihaila May 24, 2024
d46d224
Update run-tests.yml
ccataalin May 24, 2024
a8a516f
Merge pull request #114 from OCHA-DAP/ccataalin-patch-1
danmihaila May 24, 2024
66056c9
Delete src directory
danmihaila May 24, 2024
32a9e04
Merge pull request #111 from OCHA-DAP/feature/HDX-9847_update_food_se…
danmihaila May 24, 2024
52d972a
Merge remote-tracking branch 'origin/feature/HDX-9849-poverty-rate' i…
danmihaila May 24, 2024
6d1f9f0
HDX-9849 poverty rate fixes params and tests
danmihaila May 24, 2024
a6087f6
Merge branch 'dev' into feature/HDX-9849-poverty-rate
danmihaila May 24, 2024
7d334bf
Merge pull request #113 from OCHA-DAP/feature/HDX-9849-poverty-rate
danmihaila May 24, 2024
d256bb7
Auto stash before merge of "dev" and "origin/dev"
IanHopkinson May 24, 2024
cc7690c
fix endpoint in tests for food security
danmihaila May 24, 2024
8ed6658
Merge branch 'dev' of https://github.com/OCHA-DAP/hdx-hapi into dev
IanHopkinson May 24, 2024
3843f54
Merge commit '305142285f716f6f6c9adad2b56d9c4edc1fc9a6' into dev
alexandru-m-g May 24, 2024
cb43579
Now that the root cause has been fixed we don't need to overried the …
alexandru-m-g May 24, 2024
1bec639
HDX-9848 using dash instead of underscode for wfp_commodity endpoint
alexandru-m-g May 24, 2024
6ab8c13
HDX-9848 currency endpoint
danmihaila May 24, 2024
1ce3b43
HDX-9848 wfp market endpoint
alexandru-m-g May 24, 2024
a65ac5d
HDX-9848 rename currency_response files
danmihaila May 24, 2024
e810efd
Merge pull request #116 from OCHA-DAP/feature/HDX-9848-wfp-market
alexandru-m-g May 24, 2024
f8793e5
Merge branch 'feature/hdx-9848-currency-rate' into dev
danmihaila May 24, 2024
119c47c
Merge branch 'dev' of https://github.com/OCHA-DAP/hdx-hapi into dev
IanHopkinson May 24, 2024
8acd755
HDX-9853 small fixes / changes
alexandru-m-g May 26, 2024
1ba2801
HDX-9853 food prices endpoint + logic
alexandru-m-g May 26, 2024
bcfb22e
Merge pull request #117 from OCHA-DAP/feature/HDX-9853-food-prices-en…
danmihaila May 27, 2024
4879f7a
org type can be null
alexandru-m-g May 27, 2024
c0db9d6
Merge pull request #118 from OCHA-DAP/dev
SimonbJohnson May 27, 2024
7bac5cb
adding response validation handler to fastapi app
alexandru-m-g May 27, 2024
9cd0e7e
Updating format and content
SimonbJohnson May 27, 2024
c962d0c
Merge branch 'docs/update-user-feedback-2' of https://github.com/OCHA…
SimonbJohnson May 27, 2024
7e07739
Merge branch 'dev' of https://github.com/OCHA-DAP/hdx-hapi into dev
IanHopkinson May 28, 2024
838db7b
HDX-9855 Update tags to match categories in spreadsheet (excluding me…
IanHopkinson May 28, 2024
2f51715
HDX-9855 Add Metadata tag to all the endpoints on /metadata
IanHopkinson May 28, 2024
4c250ca
HDX-9855 Update a couple of the route "summary" text
IanHopkinson May 28, 2024
896ea58
HDX-9855 Update various links to other endpoints
IanHopkinson May 28, 2024
a37098b
HDX-9855 Use standard text to describe geographic query parameters - …
IanHopkinson May 28, 2024
a957e6a
language change, using "app identifier"
alexandru-m-g May 28, 2024
98bba69
HDX-9865 decimal fields should appear as "number" in OpenAPI spec
alexandru-m-g May 28, 2024
6e4009a
HDX-9851 Minimal implementation of reference period query removal
IanHopkinson May 29, 2024
9fbc3a1
HDX-9851 Remove reference and age range queries for Affected People f…
IanHopkinson May 29, 2024
7d18d3f
HDX-9851 Remove remaining reference period and age range queries, fix…
IanHopkinson May 29, 2024
74d20ca
Merge pull request #120 from OCHA-DAP/feature/HDX-9855_update_api_docs
danmihaila May 29, 2024
5b5db2c
Merge pull request #121 from OCHA-DAP/feature/HDX-9865-decimal-openap…
danmihaila May 29, 2024
2a540dd
HDX-9857 several issues fixed, found during smoke tests
danmihaila May 29, 2024
63acab3
Merge remote-tracking branch 'origin/dev' into dev
danmihaila May 29, 2024
ac86368
Merge pull request #119 from OCHA-DAP/docs/update-user-feedback-2
alexandru-m-g May 29, 2024
61d7c20
HDX-9856 use new enums - sql alchemy schema
danmihaila May 29, 2024
1436c71
Merge pull request #123 from OCHA-DAP/feature/hdx-9857-smoke-tests
alexandru-m-g May 29, 2024
af472bb
HDX-9858 Set limit for examples to 100 from 1000
IanHopkinson May 29, 2024
fc0e4f6
Merge pull request #122 from OCHA-DAP/feature/HDX-9851_remove_range_q…
alexandru-m-g May 29, 2024
f1afa28
Merge pull request #124 from OCHA-DAP/faeture/HDX-9858_use_100_limit_…
danmihaila May 29, 2024
66d6aac
Removing src from .gitignore
alexandru-m-g May 29, 2024
a773ef7
HDX-9863 Do the population range thing for the population dataset
IanHopkinson May 30, 2024
80a5803
HDX-9851 commenting out a couple of stray reference period start/end …
IanHopkinson May 30, 2024
7a0b89e
HDX-9863 Do the population range thing for the humanitatrian needs da…
IanHopkinson May 30, 2024
05a12c2
HDX-9863 Do the population range thing for the refugee dataset
IanHopkinson May 30, 2024
254b5bd
HDX-9856 update sql alchemy and enum values in tests
danmihaila May 30, 2024
5e25b7a
HDX-9863 Make upper limit of population range < rather than <=
IanHopkinson May 30, 2024
284fe39
HDX-9863 Fix test for population with new range
IanHopkinson May 30, 2024
7692dd7
Merge pull request #125 from OCHA-DAP/feature/HDX-9863_population_ran…
danmihaila May 30, 2024
1dff086
Merge pull request #126 from OCHA-DAP/feature/update-tests
danmihaila May 30, 2024
50904db
HDX-9872 implement util/version endpoint
danmihaila May 30, 2024
370594e
Merge pull request #127 from OCHA-DAP/feature/hdx-9872
danmihaila May 30, 2024
a68a88e
Update version.py
danmihaila May 30, 2024
fb201b0
show org type description in operational presence
alexandru-m-g May 30, 2024
7a8c711
HDX-9874 Change references to HAPI to HDX HAPI
IanHopkinson May 31, 2024
97f380a
HDX-9874 Update to mkdocs.yml which may need to be reverted
IanHopkinson May 31, 2024
80f23e9
Merge pull request #128 from OCHA-DAP/feature/org-type-description-op
danmihaila May 31, 2024
b3a063f
HDX-9869 Clarify dataset endpoint text
IanHopkinson May 31, 2024
62a042b
HDX-9868 Update overview text in docs UI
IanHopkinson May 31, 2024
49f3f4b
HDX-9868 Linter fix
IanHopkinson May 31, 2024
cbf3681
Merge pull request #129 from OCHA-DAP/docs/HDX-9874_replace_HAPI_with…
danmihaila May 31, 2024
180ae35
HDX-9869 Update the hdx_id description for the resource endpoint
IanHopkinson Jun 1, 2024
d1dd6f1
HDX-9869 Finish updating the resource query parameter descriptions
IanHopkinson Jun 1, 2024
9f39a29
HDX-9871 Miscellaneous small improvements to query parameter text and…
IanHopkinson Jun 2, 2024
96b7ac0
HDX-9871 Added new text to refugees endpoint
IanHopkinson Jun 2, 2024
7c24e62
HDX-9871 Added description to conflict events endpoint
IanHopkinson Jun 2, 2024
cc8e779
Some of the view entities were not typed correctly as enums
alexandru-m-g Jun 2, 2024
9935fda
Updating documentation
SimonbJohnson Jun 2, 2024
4f4365f
HDX-9871 Added description to food-prices and related endpoints
IanHopkinson Jun 3, 2024
59bfd38
HDX-9871 Added description to the food security endpoint
IanHopkinson Jun 3, 2024
21646b9
HDX-9871 Added description to the funding endpoint
IanHopkinson Jun 3, 2024
1ace80e
HDX-9871 Added description to the National Risk endpoint
IanHopkinson Jun 3, 2024
ee01a7e
Merge pull request #130 from OCHA-DAP/bugfix/enum-types
danmihaila Jun 3, 2024
5bf0d5c
HDX-9871 Finish adding first pass of descriptions
IanHopkinson Jun 3, 2024
571732b
HDX-9869 Standardise the {location, admin1, admin2}_ref descriptions
IanHopkinson Jun 3, 2024
d6c96e8
Merge pull request #131 from OCHA-DAP/feature/Docs-update
alexandru-m-g Jun 3, 2024
fc229e7
HDX-9871 Standardise documentation for population status, and populat…
IanHopkinson Jun 3, 2024
fe411af
HDX-9882, HDX-9871 miscellaneous small fixes including reordering of …
IanHopkinson Jun 3, 2024
6759500
Merge pull request #132 from OCHA-DAP/docs/HDX-9869_update_resource_p…
IanHopkinson Jun 4, 2024
6566975
HDX-9881 Passing dataset_hdx_id in on the query side
IanHopkinson Jun 4, 2024
131c619
HDX-9881 Trying to change the response model
IanHopkinson Jun 4, 2024
98c8ed4
HDX-9881 Alex's commit - renaming fields for /dataset endpoint
IanHopkinson Jun 4, 2024
871cdaf
HDX-9881 Update documentation to match new fields
IanHopkinson Jun 4, 2024
a35f021
HDX-9881 Change title to dataset_hdx_title
IanHopkinson Jun 4, 2024
3731480
HDX-9881 Fix a stray test
IanHopkinson Jun 4, 2024
55779d5
HDX-9881 Small documentation update
IanHopkinson Jun 4, 2024
5acad42
HDX-9881 Rename hdx_id->resource_hdx_id, and also dataset_title to da…
IanHopkinson Jun 4, 2024
94cbf76
HDX-9881 Small documentation update
IanHopkinson Jun 4, 2024
71cd738
Merge pull request #133 from OCHA-DAP/feature/HDX-9881_change_dataset…
danmihaila Jun 4, 2024
3cd50a7
Bugfix: WfpMarketView should not appear in this query
alexandru-m-g Jun 4, 2024
4b5e413
Preparing for 0.3.0 release
alexandru-m-g Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ venv/
coverage.xml

*.pg_restore

5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"console": "integratedTerminal",
"justMyCode": true,
}
]
}
],

}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

The Humanitarian API (HAPI) is being developed by a team from the [Centre for Humanitarian Data](https://centre.humdata.org/).
The Humanitarian API (HDX HAPI) is being developed by a team from the [Centre for Humanitarian Data](https://centre.humdata.org/).

HDX developers are using [Visual Code](https://code.visualstudio.com/) as a standard IDE for this project with development taking place inside Docker containers.

Expand All @@ -26,15 +26,15 @@ docker-compose exec -T hapi sh -c "pytest --log-level=INFO --cov=. --cov-report

As an integration test the `docs` endpoint is inspected "manually".

A local copy of HAPI can be run by importing a snapshot of the database using the following shell script invocation in the host machine.
A local copy of HDX HAPI can be run by importing a snapshot of the database using the following shell script invocation in the host machine.

```shell
./restore_database.sh https://github.com/OCHA-DAP/hapi-pipelines/raw/db-export/database/hapi_db.pg_restore hapi
```

The HAPI application can then be launched using the `start` launch configuration in Visual Code, this serves the documentation at `http://localhost:8844/docs` and the API at `http://localhost:8844/api` in the host machine.
The HDX HAPI application can then be launched using the `start` launch configuration in Visual Code, this serves the documentation at `http://localhost:8844/docs` and the API at `http://localhost:8844/api` in the host machine.

The HAPI database can be accessed locally with the following connection details:
The HDX HAPI database can be accessed locally with the following connection details:

```
URL: jdbc:postgresql://localhost:45432/hapi
Expand Down
20 changes: 10 additions & 10 deletions alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
from hdx_hapi.db.models.base import Base
from hapi_schema.db_admin1 import DBAdmin1
from hapi_schema.db_admin2 import DBAdmin2
from hapi_schema.db_location import DBLocation
from hapi_schema.db_age_range import DBAgeRange
from hapi_schema.db_gender import DBGender
from hapi_schema.db_dataset import DBDataset
from hapi_schema.db_resource import DBResource
from hapi_schema.db_org import DBOrg
from hapi_schema.db_org_type import DBOrgType
from hapi_schema.db_sector import DBSector
from hapi_schema.db_food_security import DBFoodSecurity
from hapi_schema.db_gender import DBGender
from hapi_schema.db_humanitarian_needs import DBHumanitarianNeeds
from hapi_schema.db_ipc_phase import DBIpcPhase
from hapi_schema.db_ipc_type import DBIpcType
from hapi_schema.db_location import DBLocation
from hapi_schema.db_national_risk import DBNationalRisk
from hapi_schema.db_population_group import DBPopulationGroup
from hapi_schema.db_population_status import DBPopulationStatus

from hapi_schema.db_operational_presence import DBOperationalPresence
from hapi_schema.db_org import DBOrg
from hapi_schema.db_org_type import DBOrgType
from hapi_schema.db_patch import DBPatch
from hapi_schema.db_population import DBPopulation
from hapi_schema.db_population_group import DBPopulationGroup
from hapi_schema.db_population_status import DBPopulationStatus
from hapi_schema.db_resource import DBResource
from hapi_schema.db_sector import DBSector

target_metadata = Base.metadata
# target_metadata = None
Expand All @@ -56,7 +56,7 @@ def _get_db_uri() -> str:
db_url = db_url_dict.get('sqlalchemy.url') if db_url_dict else None
if not db_url:
db_url = f'postgresql+psycopg2://{create_pg_uri_from_env_without_protocol()}'
# print(f'My db url is {x_url}')
# print(f'My db url is {db_url}')
return db_url


Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""create views

Revision ID: 5ea413542a49
Revises: be60e42db4db
Create Date: 2023-09-07 20:31:02.198042
Revision ID: 2d6db74775b5
Revises: 927d2ce143cc
Create Date: 2024-04-25 15:02:49.678672

"""
from typing import Sequence, Union
Expand All @@ -22,31 +22,44 @@
from hapi_schema.db_location import view_params_location
from hapi_schema.db_national_risk import view_params_national_risk
from hapi_schema.db_operational_presence import view_params_operational_presence
from hapi_schema.db_org_type import view_params_org_type
from hapi_schema.db_org import view_params_org
from hapi_schema.db_org_type import view_params_org_type
from hapi_schema.db_population import view_params_population
from hapi_schema.db_population_group import view_params_population_group
from hapi_schema.db_population_status import view_params_population_status
from hapi_schema.db_population import view_params_population
from hapi_schema.db_resource import view_params_resource
from hapi_schema.db_sector import view_params_sector

from hdx_hapi.db.models.views.util.util import CreateView, DropView


# revision identifiers, used by Alembic.
revision: str = '5ea413542a49'
down_revision: Union[str, None] = 'be60e42db4db'
revision: str = '2d6db74775b5'
down_revision: Union[str, None] = '927d2ce143cc'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


VIEW_LIST = [
view_params_admin1, view_params_admin2, view_params_age_range, view_params_dataset,
view_params_food_security, view_params_gender, view_params_humanitarian_needs,
view_params_ipc_phase, view_params_ipc_type, view_params_location, view_params_national_risk,
view_params_operational_presence, view_params_org_type, view_params_org,
view_params_population_group, view_params_population_status, view_params_population,
view_params_resource, view_params_sector
view_params_admin1,
view_params_admin2,
view_params_age_range,
view_params_dataset,
view_params_food_security,
view_params_gender,
view_params_humanitarian_needs,
view_params_ipc_phase,
view_params_ipc_type,
view_params_location,
view_params_national_risk,
view_params_operational_presence,
view_params_org_type,
view_params_org,
view_params_population_group,
view_params_population_status,
view_params_population,
view_params_resource,
view_params_sector,
]


Expand All @@ -57,5 +70,4 @@ def upgrade() -> None:

def downgrade() -> None:
for v in VIEW_LIST:
op.get_bind().execute(DropView(v.name))

op.get_bind().execute(DropView(v.name))
Loading
Loading