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 skip_client_lookup option when indexing all datacite dois #1181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jrhoads
Copy link
Contributor

@jrhoads jrhoads commented Apr 19, 2024

Purpose

This pull request refactors the import by client method in the DataciteDoi model.

What changed?

A new method lookup_client_and_get_dois has been added, which handles the client lookup and GET operations for DOIs. The logic for aborting the operation has been moved upwards in the import_by_client method for early exit when client_id is blank. An option is introduced to skip client lookup, which is used during indexing.

How to test?

Test the DataciteDoi import operations with and without the skip_client_lookup option and observe the logs for accurate logging information and see if DOIs are imported successfully by client ID.

Why make this change?

The change makes the code cleaner, easier to understand and adds more control over the import operation.


Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

@jrhoads
Copy link
Contributor Author

jrhoads commented Apr 19, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jrhoads and the rest of your teammates on Graphite Graphite

@jrhoads jrhoads marked this pull request as ready for review April 19, 2024 13:52
@jrhoads jrhoads force-pushed the 04-19-add_skip_client_lookup_option_when_indexing_all_datacite_dois branch from 58b4952 to bc1b661 Compare April 30, 2024 13:56
@jrhoads jrhoads requested a review from a team April 30, 2024 15:12
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.

None yet

1 participant