-
Notifications
You must be signed in to change notification settings - Fork 379
Add accountant registry #784
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
Add accountant registry #784
Conversation
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D81679360. (Because this pull request was imported automatically, there will not be any future comments.) |
Thank you for these changes and the unit tests. Please see a minor comment. I will approve once tests finish. |
@iden-kalemaj I've fixed both the ValueError on existing account and import sorting. Let's see if the pipeline passes this time |
Fixed formatting |
@evgri243 Strangely, the unittests on Github keep timing out. I tried re-running them a few times. I also tested with a dummy commit that does not have the same issue (link). I will need to check if the issue is somehow being introduced by your unit tests. If you have any ideas here that would be helpful too. |
Hi @evgri243, I believe the timeout issue is due to This test permanently replaces "rdp" in the global registry: As a suggested fix, add cleanup to
|
…tantRegistryTest`, add cleanup for registered accountants.
You may be right actually... Let's try this one. I removed any dependency on existing accountants and execute tests only on dummy accountants. Not sure whether to keep them wrapped into try/finally or experiment with setUp and teadDown methods. I am ready to follow your styling preferences. |
Try/finally works fine. Thank you for the refactoring and the quick turnaround. The tests are passing so I will land this. |
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.
Review automatically exported from Phabricator review in Meta.
This pull request has been merged in 183b1ae. |
Types of changes
Motivation and Context / Related issue
Allows to register 3rd party accountants to be used in methods like
get_noised_multiplier
and generally introduces an extra extension point.Closes #780
How Has This Been Tested (if it applies)
Used in our internal implementation with the accountant from Felipe-Gomez/riskcal.
Checklist