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

Bulk labels #608

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Bulk labels #608

wants to merge 8 commits into from

Conversation

brittnylapierre
Copy link
Member

@brittnylapierre brittnylapierre commented Apr 18, 2023

Currently allows you to upload a CSV file and create a 'iiiftask' once the following is agreed on, I can work on showing the CSV results download.

Here is how I think the procedure should go, let me know if you have any thoughts or would like to change it:

  1. Upload a CSV file containing 'slug' (full) and 'label' columns
  2. A IIIF task is created and queued with the CSV attached to the task with the attachment name 'labels'
  3. The back-end scripts creates a blank items array on the task, opens the csv, iterate through the rows, attempts to set the value, and appends an object to the items array with the following info { slug, succeeded, message }. The script also sets the progress field as it iterates over the rows. When it is done, or if it errors, it sets updates the processStatus.
  4. When the processStatus indicates the script is done working on the task, the task will show up in the completed area on the ui.
  5. Staff can download a CSV summarising the results of the task and giving status messages for succeeded and failed items (CSV is familiar to staff, and is less work to provide and edit than a UI showing the table of results. They also enable search and advanced filtering.)

Example result CSV sheet 1:
Screenshot 2023-04-18 at 8 32 13 AM

Example result CSV sheet 2:
Screenshot 2023-04-18 at 8 32 30 AM

  1. Staff can delete any items under the completed expansion panel, too.

IIIF Task Structure:
/Access-Platform/packages/data/src/iiif/Task.ts

IIIF Task Couch Setup:
/Access-Platform/services/couchdb/iiiftask

@RussellMcOrmond
Copy link
Contributor

Q: If there are multiple types of changes that can be indicated using different column names, is the intention that the items[] array repeat the slug for each column to indicate success/failure of each task indicated by a column in the source CSV?

In this case, wouldn't there need to be an additional array element?

Or is the idea that success/failure should be for the entire row in the source CSV? What if part succeeded but another part failed?

@brittnylapierre
Copy link
Member Author

brittnylapierre commented Apr 18, 2023

Hmm I didn't think about it yet but after thinking about it, I think we could do:

items : [
    { 
         slug: "bl.test",
         results: { // one sub-obj per column
                label : {
                       succeeded: true
                       message: ""
                },
                ... 
          }
    },
    ...
]

Or something like that? Not sure if you prefer arrays or hashes when it comes to these things.

Array option:

items : [
    { 
         slug: "bl.test",
         colTitle: "label"
         result: { 
             succeeded: true
             message: ""
         }
    },
    ...
]

@RussellMcOrmond RussellMcOrmond removed their request for review July 28, 2023 01:22
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.

Edit in Access: Bulk label/description set
2 participants