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

Added facility for fixing NARA media urls that are missing the colon … #612

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

mdellabitta
Copy link
Contributor

@mdellabitta mdellabitta commented Dec 16, 2024

…in the scheme.


Important

Fixes malformed NARA media URLs by correcting missing colon in the scheme in NaraMapping.scala.

  • Behavior:
    • Fixes malformed URLs in NaraMapping.scala by replacing https/ with https:/ to correct missing colon in the scheme.
    • Applied in mediaMaster and extractPreview functions.
  • Tests:
    • Added test cases in NaraMappingTest.scala to verify URL correction for mediaMaster and preview functions.
    • Tests ensure URLs with missing colon are corrected and processed correctly.

This description was created by Ellipsis for 4d9d685. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 4d9d685 in 19 seconds

More details
  • Looked at 119 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src/main/scala/dpla/ingestion3/mappers/providers/NaraMapping.scala:218
  • Draft comment:
    Consider using a more comprehensive URL validation and correction approach if there are other potential issues with URLs beyond the missing colon.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The replaceFirst method is used to fix URLs missing a colon after 'https'. This is a good approach for the specific issue described, but it assumes that the only issue with the URL is the missing colon. If there are other potential issues with URLs, a more comprehensive URL validation and correction approach might be needed.

Workflow ID: wflow_naEmqb32oOTH0KsF


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 50.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (86efa11) 8266 4061 49.13%
Head commit (4d9d685) 16532 (+8266) 8122 (+4061) 49.13% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#612) 2 1 50.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@mdellabitta mdellabitta merged commit 47d5c1c into main Dec 16, 2024
6 checks passed
@mdellabitta mdellabitta deleted the cleanup-broken-nara-urls branch December 16, 2024 21:06
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.

1 participant