Skip to content

Conversation

benjaminysmith
Copy link
Contributor

Description

Aggregate the complaints in sir-complains-a-lot by source and message

Fixes

Example:
Screenshot

Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

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

Sir-CAL didn't lint before you picked it up, but I'd prefer not to make it worse :-P

Comment on lines 86 to 87
def aggregated_message_for_source(x): return "{complaint} - (last update: {last_updated})".format(
complaint=x.message, last_updated=x.last_updated.strftime("%Y-%m-%d"))
Copy link
Contributor

Choose a reason for hiding this comment

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

While we're not yet including linting of this package in the repo CI, probably best not to introduce new linting errors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eugh sorry -- I had pylint enabled in vscode but for some reason was not catching line length.

"type": "section",
"text": {
"type": "mrkdwn",
"text": "*{source_name}* {message_for_group}:\n{signals}".format(source_name=source.upper(), message_for_group=message, signals=signal_and_geo_types)
Copy link
Contributor

Choose a reason for hiding this comment

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

line way too long

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better??

Copy link
Contributor

@krivard krivard left a comment

Choose a reason for hiding this comment

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

xlnt

@krivard krivard merged commit 4a36c58 into cmu-delphi:main Nov 16, 2020
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.

Aggregate sir-complains-a-lot complaints by source

2 participants