-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
There was a problem hiding this 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
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")) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line way too long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xlnt
Description
Aggregate the complaints in sir-complains-a-lot by source and message
Fixes
Example:
