-
Notifications
You must be signed in to change notification settings - Fork 67
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-1302] Replace getPermission with get_acl and add new get_permissions #1037
Conversation
Hello @danlu1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2023-12-29 16:30:09 UTC |
Excellent work! Thank you for incorporating the handful of suggested changes. There are a few more I added around documentation and some code smells that SonarCloud flagged. |
docs/reference/permissions.md
Outdated
@@ -0,0 +1 @@ | |||
::: synapseclient.models.permission |
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.
I committed 1 additional change here - Please review and let me know your thoughts: 315eb98
The reason I added it is because we have a docstring on each of the attributes, and we have them in the class docstring it ends up duplicating the information in the doc pages. See the screenshots below. Unfortunately because they serve 2 different purposes, See this slack thread, they cannot be combined at the moment.
In this settings I have it setup to not show if no docstring, but again, since we are including it the attributes show up twice.
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.
I agree that we don't want to show duplicate information on the doc. I like your idea and found show_docstring_attributes
might also be helpful. Let me test it and circle back.
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.
@BryanFauble Here is the output of using show_docstring_attributes as False.
- If we add show_docstring_attributes as false, nothing except the class description will be shown.
![Screenshot 2023-12-29 at 11 12 11 AM](https://private-user-images.githubusercontent.com/90745557/293414317-2b550ebb-238f-42ed-bc88-a050b1fb4866.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NzcyNTQsIm5iZiI6MTcxOTc3Njk1NCwicGF0aCI6Ii85M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kxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA0ZTc3YjIyNzZiZWMyNjg2NDJmNzVkZDRmODEyNjFiOTA1OWFhMDcxMzUwZWZhYmMwNGMzNTM4NDY3NzBiN2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.S--jygVXAxUUHpitq2vX0cQK9SYbdcXMuR2Imqx09BM)
![Screenshot 2023-12-29 at 11 13 59 AM](https://private-user-images.githubusercontent.com/90745557/293414868-6bfdb46e-082a-40e3-9c4f-1fac8edd2d41.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NzcyNTQsIm5iZiI6MTcxOTc3Njk1NCwicGF0aCI6Ii85MDc0NTU1Ny8yOTM0MTQ4NjgtNmJmZGI0NmUtMDgyYS00MGUzLTljNGYtMWZhYzhlZGQyZDQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE5NDkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdhYzQ2ZDUyNWM3NTdhM2U0OTZiMGMxMzQ0YzFlZWQ2NzVhMzMxNzIyMTQ5ZTc2NWVmZjIyNTQyZGFmM2U0MzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tfaRcZVKCKAw9rFNhIAiWmTn7O5it8BtKFd_I8m_xmo)
I will go with the approach you committed since it will keep the attribute table.
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.
Thanks for completing this.
Give a look over the few commits I added (I took care of some formatting issues I saw since it was an easy fix).
|
Problem:
Solution:
Example:
![Screenshot 2023-12-15 at 9 31 28 AM](https://private-user-images.githubusercontent.com/90745557/292928170-2423f944-9a69-4743-b768-8312c1d4310a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NzcyNTQsIm5iZiI6MTcxOTc3Njk1NCwicGF0aCI6Ii85MDc0NTU1Ny8yOTI5MjgxNzAtMjQyM2Y5NDQtOWE2OS00NzQzLWI3NjgtODMxMmMxZDQzMTBhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE5NDkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIzZWI1YzZlNzBmZDg5YzYzMjA3MDhjZTE0ODJjYmVjZjQ3Mjg0MGZjMTAzY2ZjZDY0ZTllMGE3MWQ0ODExYjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.s5wWWOxMQ4KclMa96Qe7pCYGYskizhXD-Y-Y-IJIi-M)
![Screenshot 2023-12-26 at 2 56 46 PM](https://private-user-images.githubusercontent.com/90745557/292928225-d7388407-4727-49bc-9487-d83c72941e84.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NzcyNTQsIm5iZiI6MTcxOTc3Njk1NCwicGF0aCI6Ii85MDc0NTU1Ny8yOTI5MjgyMjUtZDczODg0MDctNDcyNy00OWJjLTk0ODctZDgzYzcyOTQxZTg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjMwVDE5NDkxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlODhkMzk0OTZkMDU5ZGIzZTU3NTU1NWJhYjkxOGM3NjNiMzYwMTY1OTExOWY1ODVhNjQxYzQ5MTlkYmU1NmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8DbwIUoeujKJDYxza4ZK2w5uZ-mWvr9rY3Y-8c2k2LA)
Testing:
Unit tests and integration tests are included in the PR.