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

Adding v2 tests and updating canvas identifier #129

Merged
merged 4 commits into from
Jul 28, 2023

Conversation

glenrobson
Copy link
Collaborator

No description provided.

@glenrobson glenrobson temporarily deployed to development July 27, 2023 21:02 — with GitHub Actions Inactive
iiify/app.py Outdated
@@ -139,6 +139,10 @@ def manifest3(identifier):

@app.route('/iiif/<identifier>/manifest.json')
def manifest(identifier):
return manifest2(identifier)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Default to v3.

iiify/app.py Outdated
return manifest2(identifier)

@app.route('/iiif/2/<identifier>/manifest.json')
def manifest2(identifier):
domain = purify_domain(request.args.get('domain', request.url_root))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hardcode this to iiif.archivelab.org

@glenrobson
Copy link
Collaborator Author

Make v2 use cantaloupe.

@@ -394,12 +396,12 @@ def create_manifest3(identifier, domain=None, page=None):
for file in [f for f in originals if f['format'] in ['VBR MP3', '32Kbps MP3', '56Kbps MP3', '64Kbps MP3', '96Kbps MP3', '128Kbps MP3', 'MPEG-4 Audio', 'Flac', 'AIFF', 'Apple Lossless Audio', 'Ogg Vorbis', 'WAVE', '24bit Flac', 'Shorten']]:
normalised_id = file['name'].rsplit(".", 1)[0]
slugged_id = normalised_id.replace(" ", "-")
c_id = f"https://iiif.archivelab.org/iiif/{identifier}/{slugged_id}/canvas"
c_id = f"https://iiif.archive.org/iiif/{identifier}/{slugged_id}/canvas"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

use URI prefix.

 * Defaulting to 3
 * use URI prefix
 * hardcode iiif.archivelabs for v2
@glenrobson glenrobson temporarily deployed to development July 27, 2023 21:46 — with GitHub Actions Inactive
@glenrobson
Copy link
Collaborator Author

@digitaldogsbody I was having a look a the v2 manifest and although we don't directly link to cantaloupe the manifest points to the local server iiiify server e.g:

"service": {
    "@context": http://iiif.io/api/image/2/context.json,
    "@id": "https://archivelabs-iiif-archivelab-org-presentation-v3.ux-fnf-misc.archive.org/iiif/mms_metcalf_box_002$0",
     "profile": https://iiif.io/api/image/2/profiles/level2.json
}

Which calls your code that redirects to cantaloupe so I don't thing there is anything to do here.

@digitaldogsbody
Copy link
Collaborator

Ok good stuff! We can revisit in the future to update the v2 code to get the cantaloupe address directly rather than having to make the client make an additional request just to get the redirect

@digitaldogsbody
Copy link
Collaborator

Unless of course we want to obscure the canteloupe address in the manifests and serve a redirect also for v3, which would allow the address of the canteloupe deployment to move while keeping the service URI in the manifests static (and with a nice iiif.archive.org URL as well). I vaguely recall discussing this but I don't remember what we decided in the end.

@glenrobson
Copy link
Collaborator Author

I think it's nice to leave the iiif.archive.labs url there for now and update it if we move to iiif.archive.org/iiif/image.

@digitaldogsbody
Copy link
Collaborator

Agreed.

Presumably when the production service goes live with the DNS, the current Canteloupe instance (or whatever production version replaces it) will be reverse-proxied behind iiif.archive.org/iiif/image as well, so we should make a reminder to update the URL served in v3 manifests away from the current https://services-ia-iiif-cantaloupe-experiment.dev.archive.org/iiif/ that is returned.

@glenrobson glenrobson merged commit 1218740 into presentation-v3 Jul 28, 2023
3 checks passed
@glenrobson glenrobson deleted the presentation-v2-fixes branch July 28, 2023 23:07
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.

2 participants