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

Feature/adding mset replacement functionality 20210615 #445

Open
wants to merge 65 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b73c2c9
added MsetReplacementEvent model
cschu Jun 15, 2021
c61ae1d
fixed alembic complaint
cschu Jun 15, 2021
723ec8b
added alembic script for revision related to b73c2c91
cschu Jun 15, 2021
e53527b
pleasing flake8
cschu Jun 15, 2021
157ef00
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
cschu Jun 16, 2021
0708ccb
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
cschu Jun 16, 2021
3dbc0f4
fixed MsetReplacement/MetaDataSet key issues (with @lkuchenb)
cschu Jun 24, 2021
df35eba
merged upstream
cschu Jun 24, 2021
1b3a3fc
pleasing flake8
cschu Jun 24, 2021
9f09d96
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
cschu Jun 24, 2021
729ddcc
added initial mset replacement logic
cschu Jun 24, 2021
85ade91
merged upstream
cschu Jun 24, 2021
2bd9b75
pleasing flake8 and mypy
cschu Jun 24, 2021
523208f
addressing @lkuchenb's code review
cschu Jun 25, 2021
9068be3
added user.can_update flag
cschu Jun 25, 2021
2392560
generated alembic script pertaining to 9068be3
cschu Jun 25, 2021
54d3b63
pleasing flake8
cschu Jun 25, 2021
1c9a668
pleasing flake8
cschu Jun 25, 2021
1ffefdb
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
cschu Jun 29, 2021
bf20b41
fixing the fixtures
cschu Jun 29, 2021
67fe823
fixing the fixtures
cschu Jun 29, 2021
9accbed
addressing mypy error
cschu Jun 29, 2021
5db3d83
implemented code review requests (@lkuchenb)
cschu Jun 30, 2021
b92e67e
patched exposed event id
cschu Jun 30, 2021
307353f
actually fixed exposed event id
cschu Jul 1, 2021
f5d2483
added can_update to restricted fields, updated info request integrati…
cschu Jul 1, 2021
7a4c6de
added metadataset->msetreplacementevent relationships
cschu Jul 1, 2021
effc7d7
simplified check for already replaced metadatasets
cschu Jul 1, 2021
db6efbc
added back_populates args
cschu Jul 1, 2021
6c7199b
fixed issue with introducing can_update column for existing users
cschu Jul 1, 2021
621babc
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
cschu Jul 1, 2021
55a11f7
openapi version bump (1.4.0)
cschu Jul 1, 2021
c6a340f
added/registered new api route; renamed information request operation…
cschu Jul 5, 2021
e0dfe33
added update_metadatasets protoype
cschu Jul 6, 2021
ce78f8a
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
cschu Jul 6, 2021
4fecd28
pleasing flake8 and mypy
cschu Jul 6, 2021
115eff6
package bump (pleasing versioning checks)
cschu Jul 6, 2021
4912fdb
merged openapi.yaml with upstream changes
cschu Jul 6, 2021
36cd8ec
Apply suggestions from code review
cschu Jul 6, 2021
ac112b7
works
cschu Jul 6, 2021
4a35bce
weird.
cschu Jul 6, 2021
e0803da
weird.
cschu Jul 6, 2021
6f75123
weird
cschu Jul 6, 2021
d0b3f6b
refactored + working
cschu Jul 7, 2021
e77bf56
added preliminary test for metadataset replacement
cschu Jul 7, 2021
0289f2a
workaround to re-enable bulk-deletion test
cschu Jul 7, 2021
ac2b431
removed redundant label from msetreplacementevents (label is attached…
cschu Jul 14, 2021
3e1bfcd
cleaning
cschu Jul 14, 2021
c6f22a0
added can_update=True to initial user
cschu Jul 14, 2021
9e88373
metadatasetresponses now include replaced/replaces information (#462)
cschu Jul 14, 2021
d882ffe
added more testcases
cschu Jul 28, 2021
d395384
pleasing flake8
cschu Jul 28, 2021
b7cf1ed
pleasing mypy
cschu Jul 28, 2021
e47a56d
pleasing mypy
cschu Jul 28, 2021
b87e481
removed comment
cschu Jul 28, 2021
455ee05
added information about replaced metadatasets to datatable
cschu Jul 28, 2021
27163f5
Apply suggestions from @lkuchenb's code review
cschu Aug 3, 2021
306cf35
implemented suggestions from @lkuchenb's code review
cschu Aug 3, 2021
d353255
merge upstream (github code review)
cschu Aug 3, 2021
455626a
dealt with fallout from renaming msetreplacements-table
cschu Aug 3, 2021
00738a1
fixed bulk deletion test
cschu Aug 4, 2021
ea30854
fixed failing stage_and_submit test
cschu Aug 4, 2021
cbe39eb
pleasing mypy
cschu Aug 4, 2021
dd036cc
fixed issue that prevented new user registration requests to be compl…
cschu Aug 24, 2021
216a08b
Merge branch 'develop' into feature/adding_mset_replacement_functiona…
lkuchenb Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datameta/api/metadatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def replace_metadatasets(request: Request) -> SubmissionResponse:

if missing_msets:
messages, entities = zip(*missing_msets)
raise errors.get_validation_error(messages=list(messages), entities=list(entities))
raise errors.get_validation_error(messages=list(messages), entities=list(entities)) # @lkuchenb: any idea why these list-casts are necessary to please mypy? they're not required in e.g validation.py:63
Copy link
Member

Choose a reason for hiding this comment

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

zip() returns tuples, not lists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that i know :P but why does it not complain in validation.py, line 63, which also uses zip-derived values for the arguments?

Copy link
Member

@lkuchenb lkuchenb Jul 7, 2021

Choose a reason for hiding this comment

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

No idea. But we should probably not be so strict about the argument type in errors.get_validation_error and relax it to Iterable

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
raise errors.get_validation_error(messages=list(messages), entities=list(entities)) # @lkuchenb: any idea why these list-casts are necessary to please mypy? they're not required in e.g validation.py:63
raise errors.get_validation_error(messages=list(messages), entities=list(entities))


already_replaced = [
(f"Metadataset already replaced by {get_identifier(target_mset.replaced_via_event.new_metadataset).get('site')}", target_mset)
Expand Down