-
Notifications
You must be signed in to change notification settings - Fork 7
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
Give OPDS importers an API class (PP-501) #1442
Conversation
b3bfed8
to
139ec87
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1442 +/- ##
==========================================
+ Coverage 90.38% 90.40% +0.01%
==========================================
Files 233 231 -2
Lines 29713 29718 +5
Branches 6793 6874 +81
==========================================
+ Hits 26857 26867 +10
+ Misses 1823 1822 -1
+ Partials 1033 1029 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
bd11b38
to
6513307
Compare
I started a review of this today and plan to finish it up tomorrow. |
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 looks really good! Just a few really small issues.
tests/api/mockapi/circulation.py
Outdated
@@ -15,7 +21,7 @@ | |||
from tests.mocks.search import ExternalSearchIndexFake | |||
|
|||
|
|||
class MockBaseCirculationAPI(BaseCirculationAPI, ABC): | |||
class MockBaseCirculationAPI(PatronActivityCirculationAPI, ABC): |
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.
Seems like this should get a different name, MockPatronActivityCirculationAPI
, to avoid confusion about what is being mocked.
tests/fixtures/odl.py
Outdated
@staticmethod | ||
def _queue_response(self, status_code, headers={}, content=None): |
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 is decorated as a static method, but accepts and uses self
. If this is intentional, it would be helpful to use a different name for self
and add a comment about what is happening.
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.
I added a comment to clarify.
507c8e7
to
078ae8c
Compare
Rebased on main, and made code review changes. |
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.
Looks good! 🚀
As a follow up to #1442, this removes the CirculationFulfillmentPostProcessor class. All the logic has been moved into the OPDSAPI and OPDS2API classes. CirculationFulfillmentPostProcessor were only used to work around OPDS importers not having an API class. Now that we have a proper API class there, there is no reason to keep them around.
Description
Previously OPDS importers were a special case, they had no API class, there there was a special code path for checkouts and fulfillment taken. Now they are treated like every other license source, with their own
BaseCirculationAPI
.Motivation and Context
This is another step along the path to removing external integrations from license source integrations.
How Has This Been Tested?
Checklist