-
Notifications
You must be signed in to change notification settings - Fork 63
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
Doapi metadata enrichment #1575
Merged
Merged
Changes from all commits
Commits
Show all changes
145 commits
Select commit
Hold shift + click to select a range
3989a16
Scaffolding for stream download of datasets/tables from BQ
b6260c2
First implementation of stream download client
b5bbd9d
Fix flake8 styling
8cf9993
Add test for stream download
642b0a0
Merge pull request #1512 from CartoDB/rtorre/ch56013/client-for-strea…
dc02d2f
Bootstrap the PR
dgaubert 1b021d0
Linter
dgaubert d744330
Add client for dataset creation
cf9b703
Follow flake8 stylistic changes
635f599
Draft upload dataset
dgaubert adc6033
Hound
dgaubert 8a08267
Rename method
dgaubert 2f3598c
Linter
dgaubert 08b7b43
Fix bad body content with requests's metadata
dgaubert d2ec7b4
Implement '.upload_file_object()' method
dgaubert 13e3cec
Make it compatible with python3.5
7b18a71
Fix bug: take the attribute and not the function
4022e80
Implement client to create an import job in BQ
dgaubert 9b7681e
Add method to get the status of an import
dgaubert 2ba0aff
Implement method to wait for job completion
dgaubert 0e23372
Linter
dgaubert a9da167
Implement method that creates, uploads, and imports a dataset and wai…
dgaubert 50767b9
Unnecessay else statement
dgaubert d16889b
'Failed' is alse a valid job terminal status
dgaubert 2d8aa0e
Use built-in assertion
dgaubert a634142
Use keywords params
dgaubert 4a3aa9e
Use built-in assertions
dgaubert be5d9f3
Linter
dgaubert 8c58ee5
Merge pull request #1514 from CartoDB/rtorre/ch56009/client-for-bq-da…
9065ebd
Improve the test by checking created dataset
17fdb63
Merge pull request #1515 from CartoDB/client-for-bq-dataset-creation-…
9429ed9
Fix bad condition
dgaubert bd073e7
Merge branch 'enrichment' into dgaubert/ch56011/client-for-bq-dataset…
dgaubert 188939c
Fix TODO in e2e tests
dgaubert 07d27c9
Keep trailing comma
dgaubert afea287
Reuse upload_file_object method
dgaubert 41473fa
Linter
dgaubert 7507b44
Follow style usage conventions
dgaubert 618f1e3
Merge pull request #1513 from CartoDB/dgaubert/ch56011/client-for-bq-…
dgaubert 6e8ccde
Draft client for points enrichment [ch56016]
dgaubert 036bd1a
No need to expose the class
dgaubert a3f01d5
No need to import the class
dgaubert 4779e79
Missing project and dataset
dgaubert 047ec20
Use keyword args and old format way
dgaubert e8eebef
Adapt to latest changes with do-api
dgaubert 15ae8b8
Perform the whole cycle
dgaubert 03f8100
Fix test to check the whole workflow to enrich a dataset
dgaubert 3e7c5bb
Linter
dgaubert 6b40b5a
Wait 1 second between calls
dgaubert 1bc5704
Implement test for polygons enrichment
dgaubert 19a75b3
Merge branch 'develop' into enrichment
dgaubert e258248
Merge branch 'enrichment' into dgaubert/ch56016/client-points-enrichment
dgaubert e5839c5
Move fixtures to their own files
dgaubert e0801ae
Linter
dgaubert dba71d6
Missing sleep while pooling for status
dgaubert 461c626
Merge pull request #1516 from CartoDB/dgaubert/ch56016/client-points-…
dgaubert 7b609a0
Use DO API for public enrichment methods
dgaubert fb0e863
Use credentials
dgaubert a9984e3
Adapt Catalog to DO-Metadata API
juanrmn a0a5059
Linter
dgaubert 6a91eeb
fix linter errors
juanrmn 2ac4716
Remove temporary comment
dgaubert 3aa6edd
Use credentials while testing
dgaubert abf1c78
Fail test if env variable is None
dgaubert d89861f
Skip test optional
dgaubert 029580b
Be able to use credential while testing
dgaubert 64689fe
Merge branch 'develop' of github.com:CartoDB/cartoframes into juanra/…
juanrmn 2a32f35
pytyon 3.5 fixes
juanrmn b8346b8
Custom base_url in credentials
dgaubert 6419f7a
Linter
dgaubert 0f09f7b
bring back enrichment service
dgaubert 02abc26
Typo
dgaubert 2b17b43
Encupsulate enrichment into its service
dgaubert fe9d130
Linter
dgaubert d4a91b1
Mark method as private
dgaubert a17cabd
Improve naming
dgaubert fc737c7
Deleted unneeded test suites
dgaubert 20ac1e0
Do not use mutable data structures for argument defaults.
dgaubert ad22ae4
Linter
dgaubert 83fbc18
adapt geographies_gdf method to DO Metadata API
juanrmn a50a2f6
Be able to send filters and aggregations for enrichment
dgaubert 2e1f136
Better default arguments
dgaubert c10073f
Flip condition
dgaubert aaa4ed4
Merge pull request #1535 from CartoDB/dgaubert/ch58149/finish-enrichm…
dgaubert de4a788
Merge pull request #1530 from CartoDB/enrichment-integration-do-api
dgaubert fed891d
Change endpoint enrichment do api
dgaubert 7d5f02b
user subscriptions bugfix. And tests
juanrmn d2bfab0
python 3.5 fix
juanrmn ee8d557
fix py35 tests...
juanrmn ff716e9
Merge pull request #1531 from CartoDB/juanra/ch57069/metadata-api-int…
oleurud f485600
Merge pull request #1538 from CartoDB/enrichment-endpoint-change
dgaubert b8c317c
Possible solution to WKT/WKB transformation to geojson
22b97ff
Please hound and avoid mutability issue in default params
916cd49
Merge pull request #1542 from CartoDB/enrichment-upload-fix-to-json
8fd4332
set new url setting
juanrmn cf9f385
Use new base path for DO enrichment [ch58421]
dgaubert 2373cad
Better funcion name
dgaubert 9f070a3
Merge pull request #1544 from CartoDB/dgaubert/ch58421/new-url-for-api
dgaubert b5cb8f8
Don't use None as default value for aggregation
dgaubert c176d46
Merge pull request #1546 from CartoDB/dgaubert/ch57208/cartoframes-en…
dgaubert 5f5c059
Raise error when a job has failed
dgaubert 3914afa
Merge pull request #1548 from CartoDB/dgaubert/ch59562/provide-insigh…
dgaubert 371995d
Be more tolerant with aggregation results while testing
dgaubert d01fa6b
Merge pull request #1553 from CartoDB/dgaubert/ch59461/cartoframe-s-e…
dgaubert db863ec
Merge pull request #1543 from CartoDB/juanra/ch58421/update-do-metada…
oleurud 2bd1357
removing db datasets
oleurud aca860b
using carto-python from GH branch
oleurud ed5e9b9
add pyrestcli
oleurud 526c24d
travis using carto-python from branch
oleurud 9c8fd87
rm tmp stuff about carto-python version
oleurud f2a90be
rm bq tests
oleurud 1ea27f3
using new naming DODataset
oleurud d7fd768
order by in download to ensure e2e tests
oleurud 48be07a
Merge pull request #1573 from CartoDB/oleurud/ch61421/integrate-do-cl…
oleurud ac4bd93
rename do_dataset stuff
oleurud c179f6b
Merge branch 'oleurud/ch58426/move-client-from-cf-to-carto-python' of…
oleurud 95804e2
Merge pull request #1574 from CartoDB/enrichment
f0dea4b
e2e do_dataset tests recovered and working
oleurud 5fb6c13
cornflake8
oleurud 6cbc90a
Merge pull request #1572 from CartoDB/oleurud/ch58426/move-client-fro…
f179cf4
Merge remote-tracking branch 'origin/develop' into doapi-metadata-enr…
5bfd3e5
Refactor RepoClient using DODataset
Jesus89 c306ae0
Use default do user in repo_client
Jesus89 3e591a0
Using user credentials to fetch catalog entities datasets/geographies
Jesus89 06b4944
Add repo_client unit tests
Jesus89 f4b4da5
Using list in filter_id to force returning a list
Jesus89 53a9d5a
Update discover_dataset example
Jesus89 05b1ecb
Merge pull request #1576 from CartoDB/jarroyo/ch61524/move-metadata-a…
Jesus89 be513c2
Raise min version of carto to 1.9.1
9985832
Fix for duplicate/wrong columns when reusing enrichment object
ed5b5d9
Fix typo
Jesus89 1024649
Update carto-python to 1.9.1
Jesus89 ae7cab1
Remove None entities in repo_client
Jesus89 3578e23
Add unit test
Jesus89 1d9326c
Merge pull request #1583 from CartoDB/jarroyo/ch61957/catalogerror-wh…
5593421
Add type filter to get_subscription_ids
Jesus89 397bd5d
Merge pull request #1581 from CartoDB/rtorre/ch61906/error-500-field-…
3a4cd9d
Merge pull request #1584 from CartoDB/jarroyo/ch61957/catalogerror-wh…
Jesus89 69dc563
support for staging tests
oleurud 3740c67
refactoring _add_subscription_ids
oleurud f1722ef
enrichment details
oleurud 2c29562
more details from CR
oleurud aa60646
lint
oleurud b453dc4
fix mock reference
oleurud 89280aa
Merge pull request #1586 from CartoDB/doapi-metadata-enrichment-details
oleurud File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ _build | |
# Distribution / packaging | ||
.Python | ||
env/ | ||
.venv/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ install: | |
script: | ||
- tox | ||
after_success: | ||
- coveralls | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
cartoframes/data/observatory/catalog/repository/constants.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
CATEGORY_FILTER = 'category_id' | ||
COUNTRY_FILTER = 'country_id' | ||
DATASET_FILTER = 'dataset_id' | ||
GEOGRAPHY_FILTER = 'geography_id' | ||
PROVIDER_FILTER = 'provider_id' | ||
VARIABLE_FILTER = 'variable_id' | ||
VARIABLE_GROUP_FILTER = 'variable_group_id' | ||
CATEGORY_FILTER = 'category' | ||
COUNTRY_FILTER = 'country' | ||
DATASET_FILTER = 'dataset' | ||
GEOGRAPHY_FILTER = 'geography' | ||
PROVIDER_FILTER = 'provider' | ||
VARIABLE_FILTER = 'variable' | ||
VARIABLE_GROUP_FILTER = 'variable_group' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
VARIABLE_FILTER
removed here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juanrmn a9984e3#diff-513ba1c785c36e0c8c069d9588ca2093
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember the reason. Not sure if we decided that makes no sense... but better to know the @juanrmn opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a time since that, but I think I removed that because
dataset
's does not have thevariable
attribute, so if I'm not wrong, it would have failed with the previous code anyway.Also, to include this filter in the DO API, it would need a quite heavy join between datasets and variables, I think. But please correct me if I'm wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK then. Let's keep it as it is and change it later if necessary.