-
Notifications
You must be signed in to change notification settings - Fork 1
What is the new subject id branch? Why aren't subject images loading correctly?
What is the Temporary Fix to Pull Original Subjects for ASM pull request?
The issue: ASM originally had two workflows: individual and collaborative, and both workflows contained the same subjects. However, we want the ability to test out the individual workflow on ALICE through our initial testing. The problem with this is that TOVE creates a new unique transcription based on Panoptes subject ids. This means we can't import the same subject from TOVE for the collaborative and individual workflows.
Ex: if we imported subject_id 123
from the ASM collaborative workflow, that would create a Transcription in TOVE with id 123
. However, if we also wanted to import the same subject_id 123
from the ASM individual workflow (with the reduction from that workflow), TOVE would have trouble since the 123
id cannot be used twice in TOVE.
To try to solve this, we've copied over several transcriptions from the collaborative workflow into the individual workflow with new, lower value subject ids. However, they don't match to the correct subject id from Panoptes.
How to fix this: As a temporary fix, we check to see if we're looking at ASM staging. If so, we ask TOVE to give us that same internal_id for the collaborative workflow and use that TOVE ID to fetch the original subject image and extracts.
What does this mean for the new-subject-id
branch?
Whenever I deploy ALICE to staging, I first begin by rebasing the new-subject-id
branch to the latest master. Then I'll checkout into the new-subject-id
branch and deploy staging from there. That way, the hacky fix described earlier will be in the staging version of the site.
The new-subject-id
branch could probably be merged since it only uses the hack if we're viewing ASM, but I've since kept it unmerged as it's a bit of an awkward fix for a single use case. My hope is that we eventually won't need to use ASM staging so much for testing ALICE and we can eventually close the PR and delete the branch.
You're likely seeing this issue because you deployed straight from master
, which, in a perfect world, should work just fine. However, you need the hacky fix in the new-subject-id
branch for subjects in the Anti-Slavery Manuscripts workflows to appear correctly. Give this a shot:
- Fetch the latest
master
and pull it to your local - Checkout to the
new-subject-id
branch and rebase that with the master:git rebase master
(fromnew-subject-id
branch) - Take care of any merge conflicts that may emerge.
-
yarn deploy
(for production deployment) from thenew-subject-id
branch