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

[ENG-6732] Rework version creation for model and factory #10853

Conversation

cslzchen
Copy link
Collaborator

@cslzchen cslzchen commented Dec 14, 2024

Purpose

Rework version creation for model and factory

Changes

  • Update version creation in model to support rejected versions
  • Fix "pending" version check, which should be "pending and unpublished"
  • Fix last version number
  • Combine/group data-to-update dictionary
  • Rewrote version creation in factories, which doesn't need follow how _create() works
  • Fix tests

QA Notes

N/A

Documentation

N/A

Side Effects

N/A

Ticket

https://openscience.atlassian.net/browse/ENG-6732

@cslzchen cslzchen marked this pull request as ready for review December 16, 2024 02:26
instance.add_affiliated_institution(institution, auth.user, ignore_user_affiliation=True)

# Set other fields
# TODO: we should copy all fields
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: will defer this to work in https://openscience.atlassian.net/browse/ENG-6701 where this factory will be tested and further updated.

@cslzchen cslzchen force-pushed the feature/version-creation-rework branch from 3273e81 to d7ad314 Compare December 16, 2024 02:50
osf_tests/factories.py Outdated Show resolved Hide resolved
@cslzchen cslzchen merged commit 1bee842 into CenterForOpenScience:feature/preprints-doi-versioning Dec 16, 2024
2 of 6 checks passed
@cslzchen cslzchen changed the title [ENG-6372] Rework version creation for model and factory [ENG-6732] Rework version creation for model and factory Dec 16, 2024
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