Closed BryanFauble closed 3 months ago
Hello @BryanFauble! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
synapseclient/core/sts_transfer.py
:Line 272:89: E501 line too long (98 > 88 characters) Line 273:89: E501 line too long (100 > 88 characters)
synapseclient/core/upload/multipart_upload_async.py
:Line 2:89: E501 line too long (128 > 88 characters) Line 25:89: E501 line too long (99 > 88 characters) Line 27:89: E501 line too long (107 > 88 characters) Line 41:89: E501 line too long (118 > 88 characters) Line 50:89: E501 line too long (95 > 88 characters) Line 217:89: E501 line too long (108 > 88 characters) Line 555:89: E501 line too long (101 > 88 characters) Line 710:89: E501 line too long (90 > 88 characters) Line 711:89: E501 line too long (96 > 88 characters) Line 713:89: E501 line too long (102 > 88 characters) Line 840:89: E501 line too long (140 > 88 characters) Line 841:89: E501 line too long (98 > 88 characters) Line 845:89: E501 line too long (101 > 88 characters) Line 848:89: E501 line too long (104 > 88 characters) Line 851:89: E501 line too long (106 > 88 characters)
synapseclient/core/upload/upload_functions_async.py
:Line 38:89: E501 line too long (116 > 88 characters) Line 39:89: E501 line too long (116 > 88 characters) Line 86:89: E501 line too long (118 > 88 characters) Line 312:89: E501 line too long (89 > 88 characters) Line 314:89: E501 line too long (102 > 88 characters)
synapseclient/core/utils.py
:Line 88:89: E501 line too long (110 > 88 characters) Line 111:89: E501 line too long (110 > 88 characters)
synapseclient/models/file.py
:Line 492:89: E501 line too long (91 > 88 characters) Line 684:89: E501 line too long (121 > 88 characters) Line 686:89: E501 line too long (103 > 88 characters) Line 708:89: E501 line too long (91 > 88 characters) Line 1142:89: E501 line too long (95 > 88 characters)
synapseclient/models/services/storable_entity.py
:Line 69:89: E501 line too long (101 > 88 characters)
Line 751:89: E501 line too long (120 > 88 characters) Line 830:89: E501 line too long (94 > 88 characters)
Line 490:89: E501 line too long (120 > 88 characters) Line 564:89: E501 line too long (94 > 88 characters)
Issues
5 New issues
71 Accepted issues
Measures
0 Security Hotspots
90.7% Coverage on New Code
18.4% Duplication on New Code
Problem:
Solution:
Benchmarking:![image-2](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/c93ac20b-f599-4d62-936d-6a24a5fbe36d)
Mermaid diagram showing the various parts of the file upload process:![pako eNq1Vktz2zYQ_isYHHqyTOtB2dZMm0PkxJmJG00sXRp2OBCxEjEmAQ4IxlYo_fcuQDIRKUrtpbwQWHz77RNLljRSHOiMbhL1GsVMG0KW80AHkuBTZIliPNyIBMKYSZ4AGQz-IGvYKA2D6rTB5sV6q1kW95-2EHORv5BP3hfyG3m_WB1DWrCnIjFisNAqgjwXctsF2ifl_reAv](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/b3f3eaf7-541f-4b99-9dd0-43a5a1895507)
File upload testing:
Integration tests:
Manual Testing: I uploaded a bunch of scripts to: https://sagebionetworks.jira.com/browse/SYNPY-1441 - That shows how I set up the location for all of these tests and the script I ran to create and then upload a file. The files were all uploaded to this Synapse Project: https://www.synapse.org/#!Synapse:syn54126908/files/ - The backing storage location (External to Synapse) will be deleted, so you are likely to not be able to re-create this unless you substitute in your external storage locations.
[x] STS boto transfer enabled - Uploading to STS enabled location![image1](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/d07f3e97-a93e-4fd6-a03e-6f2f601c2009)
[x] Upload to external S3 storage![image5](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/4864f48f-928b-4031-9501-975d574a0851)
[x] Upload to google bucket storage![image](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/c2873e72-bb6e-4777-b5f3-969a7c1b1235)
[x] Upload via SFTP
[x] Client authenticated S3 bucket![image6](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/84156f46-55e3-4b1b-8ce7-e6706be1bb89)
[x] Test that the code will refresh expired URLs Verified by placing a debug return statement within the upload part logic to always fail the part upload with an HTTP 403 that the parts are refreshed - Also that if another thread already refreshed the part that the HTTP endpoint to generate new URLs is not called again.![image](https://github.com/Sage-Bionetworks/synapsePythonClient/assets/17128019/f545a3d2-16f6-43c7-a4b8-a222c63cb6d3)