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

Refactor Open Library to use Github for adding New Identifiers #9234

Open
mekarpeles opened this issue May 7, 2024 · 0 comments
Open

Refactor Open Library to use Github for adding New Identifiers #9234

mekarpeles opened this issue May 7, 2024 · 0 comments
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 2 Important, as time permits. [managed] Theme: Identifiers Issues related to ISBN's or other identifiers in metadata. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]

Comments

@mekarpeles
Copy link
Member

mekarpeles commented May 7, 2024

Currently, the way that new Identifiers are added to Open Library books and authors is through editing https://openlibrary.org/config/edition.yml?m=edit via the infogami database, which requires super librarian or admin permission.

This is blocking lots of new identifier types listed in #8271.

Ideally, we'd use /plugin/openlibrary/editions.page which can be edited by community pull request submissions.

UPDATE:

@web.memoize
def _get_edition_config():
"""Returns the edition config.
The results are cached on the first invocation. Any changes to /config/edition page require restarting the app.
This is is cached because fetching and creating the Thing object was taking about 20ms of time for each book request.
"""
thing = web.ctx.site.get('/config/edition')
classifications = [Storage(t.dict()) for t in thing.classifications if 'name' in t]
identifiers = [Storage(t.dict()) for t in thing.identifiers if 'name' in t]
roles = thing.roles
return Storage(
classifications=classifications, identifiers=identifiers, roles=roles
)

  • Open Library currently loads editions.yml in our app.
  • We want to simply move the current identifiers out of infogami into a yml file in openlibrary repo
  • When we load infogami editions.yml, we will add in the identifiers from the book-identifiers.yml
  • restrict access of edition.yml to only be admins -- librarians will submit PRs moving forward in github
@mekarpeles mekarpeles added Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Theme: Identifiers Issues related to ISBN's or other identifiers in metadata. [managed] Priority: 2 Important, as time permits. [managed] Needs: Lead labels May 7, 2024
@mekarpeles mekarpeles added this to the Sprint 2024-05 milestone May 7, 2024
@mekarpeles mekarpeles added Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] and removed Needs: Lead labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 2 Important, as time permits. [managed] Theme: Identifiers Issues related to ISBN's or other identifiers in metadata. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]
Projects
None yet
Development

No branches or pull requests

1 participant