Skip to content

Aggregate SirCAL messages by source and error #500

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

Merged
merged 3 commits into from
Nov 16, 2020

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