-
Notifications
You must be signed in to change notification settings - Fork 332
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
[ENG-6673] Check and fix api3_and_osf
tests, excluding ElasticSearch and SHARE related failures
#10844
Merged
cslzchen
merged 3 commits into
CenterForOpenScience:feature/preprints-doi-versioning
from
Vlad0n20:fix/ENG-6673-api-3-test
Dec 17, 2024
Merged
[ENG-6673] Check and fix api3_and_osf
tests, excluding ElasticSearch and SHARE related failures
#10844
cslzchen
merged 3 commits into
CenterForOpenScience:feature/preprints-doi-versioning
from
Vlad0n20:fix/ENG-6673-api-3-test
Dec 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cslzchen
changed the title
[ENG-6673]Fix api_3 test, without elasticsearch and share related
[ENG-6673] Check and fix Dec 12, 2024
api3_and_osf
tests, excluding ElasticSearch and SHARE related failures
cslzchen
requested changes
Dec 12, 2024
cslzchen
reviewed
Dec 13, 2024
Vlad0n20
force-pushed
the
fix/ENG-6673-api-3-test
branch
from
December 17, 2024 14:46
41fe000
to
ef6a82e
Compare
cslzchen
approved these changes
Dec 17, 2024
Comment on lines
-85
to
+89
pending_preprint = preprints_with_pending_dois.get(guids___id=guid) | ||
base_guid, version = guid.split(VersionedGuidMixin.GUID_VERSION_DELIMITER) | ||
pending_preprint = preprints_with_pending_dois.get( | ||
versioned_guids__guid___id=base_guid, | ||
versioned_guids__version=version, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future: let's use .load_referent()
Comment on lines
-3897
to
+3904
return list( | ||
collection.guid_links.values_list( | ||
'_id', flat=True) | ||
) | ||
res = [] | ||
for guid in collection.guid_links.all(): | ||
if guid.is_versioned: | ||
for through_item in guid.versions.all(): | ||
res.append(f'{guid._id}{VersionedGuidMixin.GUID_VERSION_DELIMITER}{through_item.version}') | ||
else: | ||
res.append(guid._id) | ||
return res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks good!
TODO for myself: check with Product & QA on collections
cslzchen
merged commit Dec 17, 2024
4b8894e
into
CenterForOpenScience:feature/preprints-doi-versioning
3 of 6 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Check and fix
api3_and_osf
tests, excluding ElasticSearch and SHARE related failuresChanges
Check and fix
api3_and_osf
tests, excluding ElasticSearch and SHARE related failuresQA Notes
N/A
Documentation
N/A
Side Effects
N/A
Ticket
https://openscience.atlassian.net/browse/ENG-6673