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

Support for Hyperlink Templates on Dimensions #200

Merged
merged 2 commits into from Nov 14, 2018

Conversation

twheys
Copy link
Contributor

@twheys twheys commented Nov 13, 2018

Added support for hyperlink templates in dimensions which work with the reacttable widget

@twheys twheys self-assigned this Nov 13, 2018
@twheys twheys requested a review from a team November 13, 2018 15:43
@twheys twheys force-pushed the hyperlink_template_dimensions branch from b6b6860 to cb09711 Compare November 13, 2018 16:00
@coveralls
Copy link

coveralls commented Nov 13, 2018

Coverage Status

Coverage increased (+0.2%) to 90.036% when pulling 9e9f006 on hyperlink_template_dimensions into 692c029 on master.

@twheys twheys force-pushed the hyperlink_template_dimensions branch from cb09711 to 80cf07f Compare November 14, 2018 09:55
@staticmethod
def map_hyperlink_templates(df, dimensions):
"""
WRITEME
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 please add this header comment now rather than later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

def map_hyperlink_templates(df, dimensions):
"""
WRITEME

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this docstring is still to be written

arguments = [format_dimension_key(argument[1:-1])
for argument in pattern.findall(hyperlink_template)]
missing_dimensions = set(arguments) & set(df.index.names)
if not missing_dimensions:
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor but I think this could have a clearer name. Instead of missing_dimensions this could be dimensions_to_hyperlink or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could rename it to unavailable_hyperlink_parameters. This is a set of the dimensions required to fill in the hyperlink template that are not in the result data set.

@twheys twheys merged commit 31b2579 into master Nov 14, 2018
@twheys twheys deleted the hyperlink_template_dimensions branch November 14, 2018 10:30
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.

None yet

4 participants