www.fgks.org   »   [go: up one dir, main page]

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

Fix: deduplicate subjects on works and list items on editions #8663

Commits on Dec 21, 2023

  1. Fix: deduplicate subjects on works and list items on editions

    This PR de-duplicates, using `casefold()`, the `subjects` field on
    `Work` items, and field values of list items that are added to `Edition`
    items on import via `load()`.
    
    This does not affect edits made via the UI as they go through
    `process_work()` from `openlibrary/plugins/upstream/addbook.py`, which
    de-duplicates via a slightly differest strategy. Rather than merging
    two lists (existing subjects on a matched item, new ones from an import
    item), it takes form data with every subject and dedupes that list.
    
    Though I had hoped to unify the de-duping logic, I think that is beyond
    the scope of this particular issue.
    
    For more, see:
    internetarchive#8661
    scottbarnes committed Dec 21, 2023
    Configuration menu
    Copy the full SHA
    0586712 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa1845e View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2023

  1. Configuration menu
    Copy the full SHA
    363fe1c View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2023

  1. PR review fixes

    - fix comparison
    - remove pointless sorting
    - ensure tests catch case where 1 existing duplicate is removed and 1
      new item is added, resulting in a final list the same length as the
      original.
    scottbarnes committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    8b9bffb View commit details
    Browse the repository at this point in the history