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

Doapi metadata enrichment #1575

Merged
merged 145 commits into from
Mar 11, 2020
Merged

Doapi metadata enrichment #1575

merged 145 commits into from
Mar 11, 2020

Conversation

rafatower
Copy link
Contributor

This is just to trigger CI

Rafa de la Torre and others added 30 commits January 22, 2020 09:42
URL hardcoded, api_key hardcoded, everything hardcoded, but it works.
…m-download-of-bq-datasets

Rtorre/ch56013/client for stream download of bq datasets
And refactor a little: move all the client details to _BQDatasetClient
and keep all the schema-related info in BQUserDataset.
Note it doesn't support f-strings
…taset-creation

Rtorre/ch56009/client for bq dataset creation
Jesus89 and others added 3 commits March 10, 2020 17:36
…enrichment-id-already-exists

Fix for duplicate/wrong columns when reusing enrichment object
…en-running-catalog-subscriptions

Add type filter to get_subscription_ids
@rafatower rafatower mentioned this pull request Mar 11, 2020

_DATASET_ID_FIELD = 'id'
_DATASET_SLUG_FIELD = 'slug'
_ALLOWED_FILTERS = [CATEGORY_FILTER, COUNTRY_FILTER, GEOGRAPHY_FILTER, PROVIDER_FILTER, VARIABLE_FILTER]
_ALLOWED_FILTERS = [CATEGORY_FILTER, COUNTRY_FILTER, GEOGRAPHY_FILTER, PROVIDER_FILTER]
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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

Copy link
Member

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 the variable 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.

Copy link
Member

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.

Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work!! 💪

I have added some suggestions and a couple of questions.

@Jesus89
Copy link
Member

Jesus89 commented Mar 11, 2020

About DODataset e2e tests. I would move e2e/data/do-api tests to carto-python because this is independent of CARTOframes. This can be done after merging the PR in develop, but it's something that should happen in the short term.

@simon-contreras-deel
Copy link
Contributor

About DODataset e2e tests. I would move e2e/data/do-api tests to carto-python because this is independent of CARTOframes. This can be done after merging the PR in develop, but it's something that should happen in the short term.

Yes, I agree. For now, It is better to have it here than not, but we should do it there. Some problems I found and coming to my mind now, were:

  • problem installing pandas in python 2.7
  • configure carto-python testing user (or use another one)

@rafatower
Copy link
Contributor Author

I would move e2e/data/do-api tests to carto-python

nope, this has long been discussed. If they are end-to-end, they shall be here.

The API has its own tests (service component)

The client has its own tests (it abides to the API)

Here's the missing piece that should save time testing manually (and already did)

Copy link
Member

@Jesus89 Jesus89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. After the changes LGTM! Thanks, @oleurud.

Note: e2e enrichment tests are failing and this will be solved directly to develop. So this doesn't block this PR.

@Jesus89
Copy link
Member

Jesus89 commented Mar 11, 2020

@oleurud there is a plan to deprecate py27 in carto-python. We could tackle the test suite implementation then.

@rafatower usually libraries contain their own integration tests (e2e). That's what we have in CARTO.js or CARTO VL, for example. But, as I said, it's no big deal to keep them here for now.

@Jesus89 Jesus89 merged commit e710be0 into develop Mar 11, 2020
@Jesus89 Jesus89 deleted the doapi-metadata-enrichment branch March 11, 2020 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants