Skip to content
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

Remove Library.all_collections property. #2191

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

tdilauro
Copy link
Contributor

Description

Removes Library.all_collections (and its functionality), replaces its usage with Library.collections, and removes a test assertion specific to this method.

Motivation and Context

While working on PP-1875, I ran into this attribute, which provides a generator that yields both the collections associated with a library and the parents of those collections, where present.

It came in on this commit on this PR.

Here's some context from the PR description:

When I tried setting up an Overdrive Advantage collection, I expected that I would be able to add the Overdrive Advantage collection to a library and have that library’s feeds also contain the books from the parent consortium collection. Without this change, I’d have to separately add the consortium collection to the library.

The downside is that now there’s no way to get a feed that has the Overdrive Advantage books without the consortium’s books.

So, based on how we currently configure our collections that have parents -- specifically, we configure the library association for both OD main accounts and Advantage accounts, as appropriate -- I don't think we need the functionality it provides.

How Has This Been Tested?

Checklist

  • N/A - I have updated the documentation accordingly.
  • All new and existing tests passed.

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.05%. Comparing base (8d10cab) to head (48d5c9c).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2191      +/-   ##
==========================================
- Coverage   91.05%   91.05%   -0.01%     
==========================================
  Files         363      363              
  Lines       41218    41213       -5     
  Branches     8847     8845       -2     
==========================================
- Hits        37530    37525       -5     
  Misses       2417     2417              
  Partials     1271     1271              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jonathangreen jonathangreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@tdilauro tdilauro merged commit 307a727 into main Nov 26, 2024
21 checks passed
@tdilauro tdilauro deleted the chore/remove-all-collections-method branch November 26, 2024 00:47
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.

2 participants