From 874f76e45a070cc9f1021f93513020c7b55df061 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 6 May 2026 16:24:59 -0700 Subject: [PATCH 1/5] add missing proxy key var --- .../python/tutorial_scripts/proxy_storage_location.py | 1 + docs/tutorials/python/tutorial_scripts/storage_location.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py index bcb85b23c..6fa50564c 100644 --- a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py @@ -23,6 +23,7 @@ # --8<-- [start:create_proxy_storage_location] # Replace with your proxy server URL and shared secret key MY_PROXY_URL = "https://my-proxy-server.example.com" +MY_PROXY_SECRET_KEY = "MY_PROXY_SECRET_KEY" # Replace with the path to a local file to register via the proxy FILE_PATH = "/path/to/your/file.csv" diff --git a/docs/tutorials/python/tutorial_scripts/storage_location.py b/docs/tutorials/python/tutorial_scripts/storage_location.py index a32acbfa0..52f261e10 100644 --- a/docs/tutorials/python/tutorial_scripts/storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/storage_location.py @@ -137,12 +137,12 @@ # Step 8: Create a Proxy storage location # Use this when a proxy server controls access to the underlying storage. # --8<-- [start:create_proxy_storage_location] - MY_PROXY_URL = "https://my-proxy-server.example.com" +MY_PROXY_SECRET_KEY = "MY_PROXY_SECRET_KEY" proxy_storage = StorageLocation( storage_type=StorageLocationType.PROXY, proxy_url=MY_PROXY_URL, - secret_key=my_proxy_secret_key, + secret_key=MY_PROXY_SECRET_KEY, benefactor_id=my_project.id, description="Proxy-controlled storage", ).store() From 245498997717bcc7217384ae88dc57d99453aafe Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 6 May 2026 16:35:21 -0700 Subject: [PATCH 2/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../python/tutorial_scripts/proxy_storage_location.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py index 6fa50564c..7b9d1dbec 100644 --- a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py @@ -21,9 +21,12 @@ # --8<-- [end:setup] # --8<-- [start:create_proxy_storage_location] -# Replace with your proxy server URL and shared secret key +# Replace with your proxy server URL and provide the shared secret key via the +# MY_PROXY_SECRET_KEY environment variable. MY_PROXY_URL = "https://my-proxy-server.example.com" -MY_PROXY_SECRET_KEY = "MY_PROXY_SECRET_KEY" +MY_PROXY_SECRET_KEY = os.environ.get( + "MY_PROXY_SECRET_KEY", "REPLACE_WITH_YOUR_PROXY_SECRET_KEY" +) # Replace with the path to a local file to register via the proxy FILE_PATH = "/path/to/your/file.csv" From 75c46758e1f72ceb59f0bc7a4d47784af82d1d06 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 6 May 2026 16:37:09 -0700 Subject: [PATCH 3/5] use env var --- .../python/tutorial_scripts/proxy_storage_location.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py index 6fa50564c..7b9d1dbec 100644 --- a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py @@ -21,9 +21,12 @@ # --8<-- [end:setup] # --8<-- [start:create_proxy_storage_location] -# Replace with your proxy server URL and shared secret key +# Replace with your proxy server URL and provide the shared secret key via the +# MY_PROXY_SECRET_KEY environment variable. MY_PROXY_URL = "https://my-proxy-server.example.com" -MY_PROXY_SECRET_KEY = "MY_PROXY_SECRET_KEY" +MY_PROXY_SECRET_KEY = os.environ.get( + "MY_PROXY_SECRET_KEY", "REPLACE_WITH_YOUR_PROXY_SECRET_KEY" +) # Replace with the path to a local file to register via the proxy FILE_PATH = "/path/to/your/file.csv" From 4492cd79620af37ee98dce0a946d279b9de4b0d2 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 6 May 2026 16:41:34 -0700 Subject: [PATCH 4/5] use env var --- .../python/tutorial_scripts/storage_location.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/python/tutorial_scripts/storage_location.py b/docs/tutorials/python/tutorial_scripts/storage_location.py index 52f261e10..402d670a7 100644 --- a/docs/tutorials/python/tutorial_scripts/storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/storage_location.py @@ -3,6 +3,8 @@ """ # --8<-- [start:setup] +import os + import synapseclient from synapseclient.models import Folder, Project, StorageLocation, StorageLocationType @@ -137,8 +139,13 @@ # Step 8: Create a Proxy storage location # Use this when a proxy server controls access to the underlying storage. # --8<-- [start:create_proxy_storage_location] + +# Replace with your proxy server URL and provide the shared secret key via the +# MY_PROXY_SECRET_KEY environment variable. MY_PROXY_URL = "https://my-proxy-server.example.com" -MY_PROXY_SECRET_KEY = "MY_PROXY_SECRET_KEY" +MY_PROXY_SECRET_KEY = os.environ.get( + "MY_PROXY_SECRET_KEY", "REPLACE_WITH_YOUR_PROXY_SECRET_KEY" +) proxy_storage = StorageLocation( storage_type=StorageLocationType.PROXY, proxy_url=MY_PROXY_URL, From b55957d6ca9845bb27ef5ecf6ae06c9e2522ca47 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Thu, 7 May 2026 10:57:16 -0700 Subject: [PATCH 5/5] remove default for env var and remove extra start marker --- .../python/tutorial_scripts/proxy_storage_location.py | 5 +---- docs/tutorials/python/tutorial_scripts/storage_location.py | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py index 7b9d1dbec..f08343641 100644 --- a/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/proxy_storage_location.py @@ -24,14 +24,11 @@ # Replace with your proxy server URL and provide the shared secret key via the # MY_PROXY_SECRET_KEY environment variable. MY_PROXY_URL = "https://my-proxy-server.example.com" -MY_PROXY_SECRET_KEY = os.environ.get( - "MY_PROXY_SECRET_KEY", "REPLACE_WITH_YOUR_PROXY_SECRET_KEY" -) +MY_PROXY_SECRET_KEY = os.environ.get("MY_PROXY_SECRET_KEY") # Replace with the path to a local file to register via the proxy FILE_PATH = "/path/to/your/file.csv" -# --8<-- [start:create_proxy_storage_location] # Use this when a proxy server controls access to the underlying storage. my_proxy_folder = Folder(name="my-folder-for-proxy", parent_id=my_project.id) my_proxy_folder = my_proxy_folder.store() diff --git a/docs/tutorials/python/tutorial_scripts/storage_location.py b/docs/tutorials/python/tutorial_scripts/storage_location.py index 402d670a7..cb231fc62 100644 --- a/docs/tutorials/python/tutorial_scripts/storage_location.py +++ b/docs/tutorials/python/tutorial_scripts/storage_location.py @@ -143,9 +143,7 @@ # Replace with your proxy server URL and provide the shared secret key via the # MY_PROXY_SECRET_KEY environment variable. MY_PROXY_URL = "https://my-proxy-server.example.com" -MY_PROXY_SECRET_KEY = os.environ.get( - "MY_PROXY_SECRET_KEY", "REPLACE_WITH_YOUR_PROXY_SECRET_KEY" -) +MY_PROXY_SECRET_KEY = os.environ.get("MY_PROXY_SECRET_KEY") proxy_storage = StorageLocation( storage_type=StorageLocationType.PROXY, proxy_url=MY_PROXY_URL,