-
Notifications
You must be signed in to change notification settings - Fork 12
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
1118 one from many msg extra checks #1134
1118 one from many msg extra checks #1134
Conversation
You need the most recent commit of lib-cove. Installing from the requirements file should get this. |
cove_360/lib/threesixtygiving.py
Outdated
@@ -222,8 +224,11 @@ def produce_message(self): | |||
|
|||
def get_heading_count(self): | |||
if self.grants_count == 1 and self.count == 1: | |||
self.grants_percentage = int(100) |
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.
= 100
should be fine?
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.
Yes
return '1' | ||
return '{:.0%} of'.format(self.count / self.grants_count) | ||
heading_percentage = '{:.0%} of'.format(self.count / self.grants_count) | ||
self.grants_percentage = int(heading_percentage[:-1]) |
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.
This doesn't work, because heading_percentage
contains the string of, so heading_percentage[:-1]
is e.g. 14% o
.
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.
Right! I have fixed that.
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.
The approach looks good to me.
I really like this approach:
|
@robredpath and I have agreed to add the ability to have one-from-many additional checks to all the checks. By doing this, this PR will be able to be merged and be ready when the new validation errors are prepared. (@robredpath @Bjwebb I will let you know when this is the case so you can review it) @Bjwebb do you know why Flake8 is failing with errors that were not failing before? |
When you added |
@robredpath @Bjwebb The PR is more or less ready to review. The |
Sorry, the failing |
@Bjwebb If you think the code is good then it can be merged with the secret data tests failing. |
Set up the ability to add one-from-many additional checks message (issue #1118).
The new messages are being prepared and will be added in a separate PR.