Skip to content

WIP towards Alma SRU model#404

Draft
matt-bernhardt wants to merge 1 commit into
mainfrom
use-598
Draft

WIP towards Alma SRU model#404
matt-bernhardt wants to merge 1 commit into
mainfrom
use-598

Conversation

@matt-bernhardt
Copy link
Copy Markdown
Member

** Why are these changes being introduced:

For performance reasons, we stripped out holdings information from our initial Primo API call. However, we do want to display these holdings to users where they are available - so we need to add them back as an async API lookup.

** Relevant ticket(s):

** How does this address that need:

This adds an AlmaSru model that will handle these async lookups. This ticket calls for only the model, the rest of the integration will happen in subsequent tickets.

The model provides a lookup method which accepts an identifier argument. It validates that identifier, submits it to the Alma SRU endpoint, receives the result, and parses that response into a human-friendly format.

** Document any side effects to this change:

We consult a variety of external APIs in this application, and each of them follows slightly different patterns. Hopefully this does not exacerbate that range terribly.

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

** Why are these changes being introduced:

For performance reasons, we stripped out holdings information from our
initial Primo API call. However, we do want to display these holdings to
users where they are available - so we need to add them back as an async
API lookup.

** Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/use-598

** How does this address that need:

This adds an AlmaSru model that will handle these async lookups. This
ticket calls for only the model, the rest of the integration will happen
in subsequent tickets.

The model provides a lookup method which accepts an identifier argument.
It validates that identifier, submits it to the Alma SRU endpoint,
receives the result, and parses that response into a human-friendly
format.

** Document any side effects to this change:

We consult a variety of external APIs in this application, and each of
them follows slightly different patterns. Hopefully this does not
exacerbate that range terribly.
@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 27035789955

Coverage at 97.526% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 12 uncovered changes across 1 file (15 of 27 lines covered, 55.56%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
app/models/alma_sru.rb 27 15 55.56%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1455
Covered Lines: 1419
Line Coverage: 97.53%
Coverage Strength: 73.71 hits per line

💛 - Coveralls

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.

3 participants