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

Add author configs to pg_dump file #8248

Merged

Conversation

jimchamp
Copy link
Collaborator

@jimchamp jimchamp commented Aug 30, 2023

In support of #8202

Adds Storygraph, Youtube, and Amazon author identifier configurations to the pg_dump file which is used to initially populate DBs in developer environments.

Edit: Additionally, adds a Wikidata identifier to Mark Twain's author record.

Technical

Steps taken when making this update:

  1. Remove local DB container by running docker container rm openlibrary-db-1
  2. Populate DB with initial load by bringing the application back up: docker compose up
  3. Verify that DB has been recreated by visually inspecting the results of select * from thing order by id desc limit 10
  4. Update the author configuration via http://localhost:8080/config/author.yml?m=edit
  5. Confirm that new entries are present in the "Identifiers" dropdown (found on author edit pages)
  6. Add Wikidata ID to Mark Twain's record.
  7. Generate new pg_dump by following the instructions outlined here.
Click to see the configurations that were added - label: Amazon ID name: amazon notes: Should be something like B000AQ0842 url: https://www.amazon.com/-/e/@@@ website: https://www.amazon.com - label: Storygraph name: storygraph notes: eg 50b7fbd9-84ac-450d-b2ed-78c861d4ef00 url: https://app.thestorygraph.com/authors/@@@ website: https://www.thestorygraph.com/ - label: YouTube name: youtube notes: Link to the author's official YouTube channel url: https://www.youtube.com/@@@ website: https://www.youtube.com

Testing

Screenshot

Stakeholders

@cdrini
@davidscotson

@RayBB
Copy link
Collaborator

RayBB commented Sep 1, 2023

@jimchamp if it's not too hard could you make it so the dump includes the wikidata id Q7245 for Mark Twain?

This would make it easier for anyone test my work in #8236 and save me time as well when I reset my db.

@jimchamp jimchamp marked this pull request as draft September 1, 2023 21:31
@jimchamp jimchamp force-pushed the add-configs-to-intial-db-dump branch from aceacca to bf327e0 Compare September 1, 2023 21:37
@jimchamp jimchamp marked this pull request as ready for review September 1, 2023 21:37
@jimchamp
Copy link
Collaborator Author

jimchamp commented Sep 1, 2023

Should be good now, @RayBB. Give it a try if you have a chance.

@RayBB
Copy link
Collaborator

RayBB commented Sep 1, 2023

@jimchamp doesn't seem to have worked. No Q7245 in the dump or when I pull your branch. Could be because you have to login before editing for the save to work (part of the annoyance I face)?

@jimchamp
Copy link
Collaborator Author

jimchamp commented Sep 1, 2023

I probably didn't click the "Set" button.... one moment

@jimchamp jimchamp force-pushed the add-configs-to-intial-db-dump branch from 0166465 to 01e98fd Compare September 1, 2023 22:08
@jimchamp
Copy link
Collaborator Author

jimchamp commented Sep 1, 2023

Should really be good now.

image

The preexisting Wikipedia link threw me off earlier.

@RayBB
Copy link
Collaborator

RayBB commented Sep 1, 2023

Looks good now. Thanks @jimchamp this is a big help :)

Copy link
Collaborator

@cdrini cdrini left a comment

Choose a reason for hiding this comment

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

Code lgtm , assigned to @RayBB since he tested it :)

@cdrini cdrini assigned RayBB and unassigned cdrini Sep 2, 2023
@cdrini cdrini merged commit 8a86aa4 into internetarchive:master Sep 2, 2023
@jimchamp jimchamp deleted the add-configs-to-intial-db-dump branch September 25, 2023 17:44
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