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

As a content editor, I want to batch import authors/creator information, so that I can update multiple records with annotations made externally #792

Closed
16 tasks done
Tracked by #815
quadrismegistus opened this issue Oct 9, 2023 · 10 comments
Assignees

Comments

@quadrismegistus
Copy link
Contributor

quadrismegistus commented Oct 9, 2023

This is the creator csv of information we want to import. These columns should all be able to map to fields in the django database. We'll investigate. https://flatgithub.com/Princeton-CDH/geotaste/blob/main/data/1.3-beta/creators.csv?filename=data%2F1.3-beta%2Fcreators.csv&sha=95b385b2c79462bff622d9c01ed7dc0baf3a9a27

Update 2/1/24: We have this working now in the admin interface on QA. If you go to /admin/people/person you should see an import and export button. Export should export all Persons, member or creator or both, with all fields. Import should, for now, import only the fields relevant to the currently annotated data (nationality and gender of authors).

Testing instructions

  • Confirm import/export buttons are present on Person admin page
  • Confirm csv export works and that fields are present
  • Confirm a 'slug' field is in export -- this field is needed for import
  • Import a csv of 10 new authors' info
    • Confirm a preview of changes is shown
    • Click "confirm import" button works, check that number of records updated is shown
  • Import a csv of all new author info
    • Check that preview of changes is shown
    • Check "confirm import" works and shows number of records updated
    • If more than 1,000 records updated, check that a warning message shows at top of page indicating that a server-side index will be necessary
    • Confirm that new countries not in DB now are (Ancient Greece, Ancient Rome, Czechoslovakia, Iceland, India, Korea, Mexico, Norway, Persia, Philippines, Scotland, Slovenia, Trinidad and Tobago, Wales, Yugoslavia) this is working for book Genre but not Country, I will fix before next testing
    • Confirm that authors previously without nationality and gender now have them when seen from the admin interface
    • Confirm that log entries for updated Persons show a change was made from django import export / admin interface
  • Check for appropriate errors
    • Try re-importing the 10 person csv above but first editing it in excel to replace slug in the header with slugxx or another word; then make sure an error is shown
    • Try re-importing a person CSV after all steps above made. Confirm that all records are skipped because already updated
@jkotin
Copy link

jkotin commented Jan 4, 2024

We have a csv with gender and nationality information for creators, drawn from VIAF and then supplemented by hand. This information should fit nicely in the gender and nationality sections that are already in the database.

@jkotin
Copy link

jkotin commented Feb 10, 2024

Re:

Confirm csv export works and that fields are present

The instructions do not include the fields to verify. They all seem present. Here's a screenshot:

Screenshot 2024-02-09 at 11 14 07 PM

@jkotin
Copy link

jkotin commented Feb 10, 2024

Re:

If more than 1,000 records updated, check that a warning message shows at top of page indicating that a server-side index will be necessary

I didn't see a warning message

@jkotin
Copy link

jkotin commented Feb 10, 2024

Re:

Confirm that authors previously without nationality and gender now have them when seen from the admin interface

I don't think this worked—only about 800 creators have nationalities. I tried a second time—same result. See Elizabeth von Arnim—no nationality present after the import. I'm sorry if I've missed something!

@jkotin
Copy link

jkotin commented Feb 10, 2024

Re:

Try re-importing the 10 person csv above but first editing it in excel to replace slug in the header with slugxx or another word; then make sure an error is shown

This worked—I received an error message!

@jkotin
Copy link

jkotin commented Mar 3, 2024

This all looks good @quadrismegistus and @rlskoeser except for:

If more than 1,000 records updated, check that a warning message shows at top of page indicating that a server-side index will be necessary

Can I close anyway?

@rlskoeser
Copy link
Contributor

@jkotin please wait to close until I can check to see why you didn't see the message.

@mnaydan mnaydan assigned rlskoeser and unassigned quadrismegistus Apr 10, 2024
rlskoeser added a commit that referenced this issue Apr 16, 2024
@jkotin
Copy link

jkotin commented Apr 23, 2024

I still don't see a "warning message." But the import seemed to work. See screenshots.
Screenshot 2024-04-22 at 8 10 27 PM
Screenshot 2024-04-22 at 8 12 10 PM

@rlskoeser
Copy link
Contributor

@jkotin thanks for including the screenshots. The "warning message" is the one in yellow in your second screenshot (thanks for including those!); do you see how it says that only the first 1000 changes were indexed?

Please let me know if this is clear enough (maybe the testing instructions were unclear).

FWIW, I'm not sure how strictly necessary this limit is, and the 1000 is somewhat arbitrary. Ryan was concerned about the indexing taking too long and the import hanging - it seemed more important to show the results of your import.

@jkotin
Copy link

jkotin commented Apr 23, 2024

Great! I was expecting the warning message to say "warning"!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants