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

add automatic image type detection #4363

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Conversation

andrew-nowak
Copy link
Member

@andrew-nowak andrew-nowak commented Nov 4, 2024

What does this change?

Detect the image type (according to the Guardian vocabulary) from the Digital Source Type (IPTC vocab) when applicable.

How should a reviewer test this change?

How can success be measured?

Who should look at this?

Tested? Documented?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment
  • relevant documentation added or amended (if needed)

Copy link

github-actions bot commented Nov 4, 2024

@andrew-nowak andrew-nowak marked this pull request as ready for review November 11, 2024 17:38
@andrew-nowak andrew-nowak requested review from a team as code owners November 11, 2024 17:38
Copy link
Contributor

@twrichards twrichards left a comment

Choose a reason for hiding this comment

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

code looks wonderful to me, I haven't got any suitable images to test it with, but it's deployed to TEST as I think @paperboyo would like to give it a spin

case DigitalSourceType("compositeSynthetic") => Illustration
// unknown
case other =>
logger.warn(s"Unexpected Iptc4xmpExt:DigitalSourceType value: $other. Consider adding a case for this value to DigitalSourceType.scala")
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

Comment on lines +85 to +90
/* TODO in scala 2.13:
name match {
case s"http://cv.iptc.org/newscodes/digitalsourcetype/$value" =>
Some(value)
case _ => None
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

😍

@prout-bot
Copy link

Seen on usage, image-loader, metadata-editor, cropper, kahuna (merged by @andrew-nowak 7 minutes and 40 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on auth, thrall (merged by @andrew-nowak 7 minutes and 54 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on media-api (merged by @andrew-nowak 8 minutes ago) Please check your changes!

@prout-bot
Copy link

Seen on collections, media-api (merged by @andrew-nowak 8 minutes ago) Please check your changes!

@prout-bot
Copy link

Seen on leases (merged by @andrew-nowak 9 minutes and 50 seconds ago) Please check your changes!

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

Successfully merging this pull request may close these issues.

3 participants