Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix datacite_gin publication doi translation #325

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Conversation

mslw
Copy link
Collaborator

@mslw mslw commented Jul 7, 2023

This is a small tweak to datacite_gin_translator that will:

  • Use a case-insensitive replacement (accepting both "doi:" and "DOI:" prefix in translated metadata)
  • Return the DOI as https://doi.org/... (no www) because this is the format expected by the catalog for nice rendering
  • Adjust tests accordingly

FMPOV this should be enough to close #322 as it answers the original problem -- unless you do want to add more formatting rules to JS.

Ping sfb1451/metadata-catalog#23

Now uses a case-insensitive replacement (accepting both "doi:" and
"DOI:" prefix in translated metadata) and returns the DOI as
https://doi.org/... (no www) because this is the format expected by
the catalog for nice rendering.
@mslw mslw marked this pull request as draft July 7, 2023 12:30
This commit is a manual change to the expected doi value, replacing
`doi:` with `https://doi.org/` in response to the change introduced in
e925c3e. The updated values are consistent e.g. with the doi
formatting in `workflow_generated_meta_super.json`.
@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (f612cb1) 82.32% compared to head (abd9d39) 82.32%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #325   +/-   ##
=======================================
  Coverage   82.32%   82.32%           
=======================================
  Files          32       32           
  Lines        2173     2173           
=======================================
  Hits         1789     1789           
  Misses        384      384           
Flag Coverage Δ
unittests 71.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lad_catalog/translators/datacite_gin_translator.py 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mslw mslw marked this pull request as ready for review July 7, 2023 13:02
Copy link
Member

@jsheunis jsheunis left a comment

Choose a reason for hiding this comment

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

Thanks @mslw! Nice and small changes, and they work as expected.

@jsheunis jsheunis merged commit fa44b1f into datalad:main Jul 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Let JS code parse and resolve DOI urls correctly
3 participants