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

#56 Canvas helper to add hw from iiif image info #62

Merged
merged 5 commits into from
Oct 6, 2022
Merged

#56 Canvas helper to add hw from iiif image info #62

merged 5 commits into from
Oct 6, 2022

Conversation

rlskoeser
Copy link
Contributor

@rlskoeser rlskoeser commented May 27, 2022

implements set_hwd_from_iiif helper as described in #56

I created a placeholder set_hwd for testing purposes; maybe this should not be merged until the other helper is implemented

  • any other cases to handle with the image url passed in?
  • wasn't sure what was desired for error handling; should we just document possible exceptions?
  • I had to add requests to tox dependencies to get tests to work locally, shouldn't it pull from setup.py?

NOTE: this work depends on #70 . Once that is merged, this can be updated and the placeholder set_hwd method removed.

@rlskoeser rlskoeser changed the title Canvas helper to add hw from iiif image info #56 Canvas helper to add hw from iiif image info May 27, 2022
@digitaldogsbody digitaldogsbody requested a review from a team May 27, 2022 15:17
@digitaldogsbody
Copy link
Member

digitaldogsbody commented May 27, 2022

I created a placeholder set_hwd for testing purposes; maybe this should not be merged until the other helper is implemented

Agree, since the dummy implementation will need to be removed and it would be nicer to wait and remove that before merge.

any other cases to handle with the image url passed in?

Not that I can immediately think of

wasn't sure what was desired for error handling; should we just document possible exceptions?

I think that raising the errors to the main library is fine - we can document that the helper may raise and leave handling that up to the end user. I think this is better than silently failing and essentially requiring them to check for success after calling the function.

I had to add requests to tox dependencies to get tests to work locally, shouldn't it pull from setup.py?

Afraid I'm not sure about this. @helrond, @p-galligan - any ideas?

@glenrobson glenrobson linked an issue May 27, 2022 that may be closed by this pull request
14 tasks
@rlskoeser rlskoeser marked this pull request as draft May 27, 2022 15:32
@rlskoeser
Copy link
Contributor Author

rlskoeser commented May 27, 2022

I'll set this to draft until the other helper has been merged; depends on #54

Copy link
Contributor

@giacomomarchioro giacomomarchioro left a comment

Choose a reason for hiding this comment

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

Impressive work, I think we should also think if it is the case of allowing to add directly a service using the add_image method.

Returns:
anno_page (iiif-prezi3.skeleton.AnnotationPage): the AnnotationPage with
an Annotation and ResourceItem attached.
"""
body = ResourceItem(id=image_url, type='Image')
annotation = Annotation(id=anno_id, body=body, target=image_url, motivation='painting', type='Annotation')
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a comment, the type of the main IIIF object should be set by default from the JSON schema, so theoretically there should be no need for specifying it for Annotation and AnnotationPage, Canavses etc. etc.

@rlskoeser
Copy link
Contributor Author

Earlier today the PR diff was showing a lot of changes I didn't make — I thought I had updated my fork and rebased my branch properly, not sure why it was flagging so many other changes. I just updated again and now the diff is accurate. Sorry about that.

@digitaldogsbody
Copy link
Member

digitaldogsbody commented Jun 3, 2022

Earlier today the PR diff was showing a lot of changes I didn't make — I thought I had updated my fork and rebased my branch properly, not sure why it was flagging so many other changes. I just updated again and now the diff is accurate. Sorry about that.

I think it merged rather than rebasing on top of the changes, because the commit list was showing a lot of commits from main branch.

Thanks for the great work - I'm happy to merge based on the two approvals when Giacomo's SetHWD is merged and follow the action instructions for getting the GH Pages setup working, but the PR needs to be taken out of draft status first :)

Edit: I confused this with the Documentation PR, whoops!

@rlskoeser rlskoeser marked this pull request as ready for review June 3, 2022 23:33
@digitaldogsbody digitaldogsbody changed the base branch from main to pr-updates October 6, 2022 13:56
@digitaldogsbody digitaldogsbody merged commit 2ac40e4 into iiif-prezi:pr-updates Oct 6, 2022
@digitaldogsbody digitaldogsbody added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Oct 6, 2022
@rlskoeser rlskoeser deleted the 56-set-hwd-from-iiif branch October 6, 2022 15:45
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.

Set HWD from IIIF
3 participants