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

Debugged and fixed maximize_iiif_url. #72

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

mdellabitta
Copy link
Contributor

@mdellabitta mdellabitta commented Dec 19, 2024

Added support for 3 prefixes.


Important

Enhance maximize_iiif_url to support URLs with up to three prefixes and add corresponding tests.

  • Enhancements:
    • maximize_iiif_url in metadata.py now supports URLs with up to three prefixes.
    • Added regex patterns IMAGE_API_UP_THROUGH_IDENTIFIER_W_TRIPLE_PREFIX_REGEX and FULL_IMAGE_API_URL_W_TRIPLE_PREFIX_REGEX.
    • Added helper functions no_prefix, one_prefix, two_prefixes, and three_prefixes to handle different URL structures.
  • Tests:
    • Added test_colorado_imageapi_url in test_metadata.py to test URLs with three prefixes.
    • Updated existing tests to ensure compatibility with new URL handling logic.

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

Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.03% (target: -1.00%) 86.21%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (40243ae) 848 787 92.81%
Head commit (ff77fa5) 880 (+32) 817 (+30) 92.84% (+0.03%)

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 (#72) 58 50 86.21%

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

Copy link
Contributor

@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 ff77fa5 in 1 minute and 20 seconds

More details
  • Looked at 270 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. ingest_wikimedia/metadata.py:276
  • Draft comment:
    Replace logging.warn with logging.warning for consistency and to avoid using a deprecated function.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The logging.warn function is deprecated and should be replaced with logging.warning for consistency and to avoid potential issues in the future.

Workflow ID: wflow_aKWcwsztHNQYSzDZ


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

@mdellabitta mdellabitta merged commit e727f01 into main Dec 19, 2024
10 checks passed
@mdellabitta mdellabitta deleted the fixup-maximize-iiif-url branch December 19, 2024 19:43
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