Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Update Europeana endpoint #974

Merged
merged 2 commits into from
Feb 8, 2023
Merged

Update Europeana endpoint #974

merged 2 commits into from
Feb 8, 2023

Conversation

stacimc
Copy link
Contributor

@stacimc stacimc commented Jan 27, 2023

Fixes

Fixes WordPress/openverse#1727 by @dravadhis

Description

This PR updates the Europeana DAG to use the new API endpoint under https://api.europeana.eu/ as noted in the docs.

Happily I believe no additional changes were necessary. The API documentation is quite good and I was able to confirm all the fields we're using are present and unchanged, including the cursor based pagination.

Testing Instructions

Tests should all continue to pass.

Try running the Europeana DAG locally and verify the script still works. For more thorough testing I did the following:

  1. Set an INGESTION_LIMIT of 200
  2. Run the DAG until it completes ingestion for a day with a good amount of data. 2022-11-04 had 200+ rows.
  3. Find the tsv for your test day in the MinIO console and download it
  4. Checkout main and repeat steps 1-3 with the old API endpoint. Make sure you run ingestion for the same day. You can trigger a manual DagRun with a conf set to {"date": "2022-11-04"}
  5. Once you have both tsvs downloaded, compare them to make sure they are identical:
$ cmp --silent file1 file2 && echo 'Success' || echo 'Failure: Files are different'

Checklist

  • My pull request has a descriptive title (not a vague title like
    Update index.md).
  • My pull request targets the default branch of the repository (main) or
    a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible
    errors.
  • I ran the DAG documentation generator (if applicable).

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@stacimc stacimc added 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Jan 27, 2023
@stacimc stacimc requested a review from a team as a code owner January 27, 2023 00:44
@stacimc stacimc self-assigned this Jan 27, 2023
@stacimc stacimc requested review from krysal and obulat January 27, 2023 00:44
Copy link
Member

@zackkrida zackkrida left a comment

Choose a reason for hiding this comment

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

Great! The DAG works locally.

Copy link
Contributor

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

Wow, I'm pleased it was such a small change 😄 I tested using your instructions and everything matched 💯

Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

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

Glad that it is just a small change! The docstring also needs an update of the endpoint for preventing any confusion in the future.

@stacimc
Copy link
Contributor Author

stacimc commented Feb 6, 2023

The docstring also needs an update of the endpoint for preventing any confusion in the future.

Good catch, thank you @krysal! I updated the docstring to link to the documentation for the new endpoint.

Copy link
Member

@krysal krysal left a comment

Choose a reason for hiding this comment

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

Thank you!

@stacimc stacimc merged commit 52acf96 into main Feb 8, 2023
@stacimc stacimc deleted the update/europeana-endpoint branch February 8, 2023 00:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Europeana endpoint and accomodate v2 API changes
4 participants