Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Conversation

mreid-moz
Copy link
Contributor

No description provided.

@mreid-moz mreid-moz requested a review from maurodoglio June 28, 2017 19:00
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 79.016% when pulling c11ef07 on mreid-moz:sanitize_bug1306049 into e125d36 on mozilla:master.

@mreid-moz mreid-moz force-pushed the sanitize_bug1306049 branch from c11ef07 to 13351db Compare June 28, 2017 20:05
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 79.016% when pulling 13351db on mreid-moz:sanitize_bug1306049 into e125d36 on mozilla:master.

for name, path in self.selection_compiled.items())

def _sanitize_dim(self, v):
"""For String conditions, we should pre-sanitize so that users of
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you format this docstring to follow the pep 257 conventions?

:param v: a string value that should be sanitized.
"""
if v is not None:
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 think this condition is needed

raise Exception('The dimension {} doesn\'t exist'.format(dimension))
if isfunction(condition) or isinstance(condition, functools.partial):
clauses[dimension] = condition
elif isinstance(condition, basestring):
Copy link
Contributor

Choose a reason for hiding this comment

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

The value that this condition is checked against is a string, so we can either raise an exception if this is not the case or convert condition to a string. I think the latter solution would make more sense but I don't have a strong opinion about it.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 79.057% when pulling 33e8d0f on mreid-moz:sanitize_bug1306049 into e125d36 on mozilla:master.

@mreid-moz
Copy link
Contributor Author

@maurodoglio RFAL

Copy link
Contributor

@maurodoglio maurodoglio left a comment

Choose a reason for hiding this comment

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

🚢 it!

@mreid-moz mreid-moz force-pushed the sanitize_bug1306049 branch from 33e8d0f to e0269b3 Compare June 30, 2017 00:06
Hide the implementation details about how dimensions are sanitized
for S3 storage. This way you can do things like:

dataset.where(docType="saved-session")

instead of having to know that the hyphen is replaced with an
underscore when data is saved (and used "saved_session").
@mreid-moz mreid-moz force-pushed the sanitize_bug1306049 branch from e0269b3 to d91bc60 Compare June 30, 2017 00:10
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 78.983% when pulling d91bc60 on mreid-moz:sanitize_bug1306049 into b4d68d7 on mozilla:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 78.983% when pulling d91bc60 on mreid-moz:sanitize_bug1306049 into b4d68d7 on mozilla:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 78.983% when pulling 366b9b3 on mreid-moz:sanitize_bug1306049 into b4d68d7 on mozilla:master.

@mreid-moz mreid-moz merged commit ce131ef into mozilla:master Jun 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants