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

Implement source_col param in Isolines service #1326

Merged
merged 2 commits into from
Dec 10, 2019

Conversation

Jesus89
Copy link
Member

@Jesus89 Jesus89 commented Dec 10, 2019

Closes #1303.

NOTE: DS tests are only e2e. There is a task to refactor them into unit tests: #1323.

Copy link
Contributor

@alrocar alrocar left a comment

Choose a reason for hiding this comment

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

A minor

source_columns = source_manager.get_column_names()
source_has_id = 'cartodb_id' in source_columns
if source_col is None:
source_col = CARTO_INDEX_KEY
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is the default value, we could set it in the method signature and avoid this conditional.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't want to add this to the header because of the documentation (reference). The index is set as cartodb_id when there is no cartodb_id column in the dataframe, but this is something I want to keep internally. Does it make sense to you?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, makes sense then.

source_columns = source_manager.get_column_names()
source_has_id = 'cartodb_id' in source_columns
if source_col is None:
source_col = CARTO_INDEX_KEY

iso_function = '_cdb_{function}_exception_safe'.format(function=function)
# TODO: use **options argument?
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ random TODO with no issue referenced. I'd 🔥 or create an issue explaining it so it can be prioritized at some point. (probably 🔥 since we don't know what is this about...)

@alrocar alrocar self-assigned this Dec 10, 2019
@alasarr alasarr merged commit 8037e7f into develop Dec 10, 2019
@Jesus89 Jesus89 deleted the 1303-source-col-isolines branch December 11, 2019 09:42
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.

Add "source_col" param in Isolines
3 participants