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

[SYNPY-448] allow changing Synapse name in changeFileMetaData #1065

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

danlu1
Copy link
Contributor

@danlu1 danlu1 commented Feb 10, 2024

Problem:

Python client doesn't allow changing Synapse name for file metadata

Solution:

Add a name argument to change_metadata in file.py and changeFileMetaData function in synapseutils

Testing:

Integration and unit testing are included in this PR

@danlu1 danlu1 requested a review from a team as a code owner February 10, 2024 08:00
@pep8speaks
Copy link

pep8speaks commented Feb 10, 2024

Hello @danlu1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 495:89: E501 line too long (116 > 88 characters)
Line 587:89: E501 line too long (135 > 88 characters)
Line 590:89: E501 line too long (89 > 88 characters)
Line 591:89: E501 line too long (160 > 88 characters)
Line 592:89: E501 line too long (103 > 88 characters)

Line 263:89: E501 line too long (131 > 88 characters)
Line 267:89: E501 line too long (161 > 88 characters)
Line 268:89: E501 line too long (99 > 88 characters)

Line 699:89: E501 line too long (98 > 88 characters)

Comment last updated at 2024-02-12 17:39:17 UTC

@@ -239,6 +239,7 @@ def _copy_cached_file_handles(cache: Cache, copiedFileHandles: dict) -> None:
def changeFileMetaData(
syn: synapseclient.Synapse,
entity: typing.Union[str, Entity],
name: str = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

I am going to make 1 change here to put name at the end of the parameters being passed in - This is because if someone were using this function without explicit kwarguments then this would break their code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Thanks @BryanFauble

@BWMac BWMac self-requested a review February 12, 2024 17:42
Copy link
Contributor

@BryanFauble BryanFauble left a comment

Choose a reason for hiding this comment

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

Thanks for the changed Dan!

@BryanFauble BryanFauble merged commit 7a3399d into develop Feb 12, 2024
29 checks passed
@BryanFauble BryanFauble deleted the SYNPY_488_update_changeFileMetaData branch February 12, 2024 17:48
Copy link

sonarcloud bot commented Feb 12, 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.

None yet

4 participants