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

Remove use of tutorial endpoints in docs #915

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Documentation
~~~~~~~~~~~~~

- Remove references to the Tutorial Endpoints from documentation. (:pr:`NUMBER`)
4 changes: 4 additions & 0 deletions docs/examples/minimal_transfer_script/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ using the :class:`TransferClient <globus_sdk.TransferClient>`.
It uses the tutorial client ID from the :ref:`tutorial <tutorial>`.
For simplicity, the script will prompt for login on each use.

.. note::
You will need to replace the values for ``source_collection_id`` and
``dest_collection_id`` with UUIDs of collections that you have access to.

.. literalinclude:: transfer_minimal.py
:caption: ``transfer_minimal.py`` [:download:`download <transfer_minimal.py>`]
:language: python
Expand Down
9 changes: 4 additions & 5 deletions docs/examples/minimal_transfer_script/transfer_minimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@
authorizer=globus_sdk.AccessTokenAuthorizer(transfer_tokens["access_token"])
)

# Globus Tutorial Endpoint 1
source_endpoint_id = "ddb59aef-6d04-11e5-ba46-22000b92c6ec"
# Globus Tutorial Endpoint 2
dest_endpoint_id = "ddb59af0-6d04-11e5-ba46-22000b92c6ec"
# Replace these with your own collection UUIDs
source_collection_id = "..."
dest_collection_id = "..."

# create a Transfer task consisting of one or more items
task_data = globus_sdk.TransferData(
source_endpoint=source_endpoint_id, destination_endpoint=dest_endpoint_id
source_endpoint=source_collection_id, destination_endpoint=dest_collection_id
)
task_data.add_item(
"/share/godata/file1.txt", # source
Expand Down
14 changes: 11 additions & 3 deletions docs/examples/timer_operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Timer Operations Script
This example demonstrates the usage of methods on the Timer client to
schedule a recurring Transfer task.

.. note::
You will need to replace the values for ``SOURCE_COLLECTION`` and ``DEST_COLLECTION``
with UUIDs of collections that you have access to.

.. code-block:: python

import os
Expand All @@ -23,8 +27,10 @@ schedule a recurring Transfer task.
TransferScopes,
)

GOEP1 = "ddb59aef-6d04-11e5-ba46-22000b92c6ec"
GOEP2 = "ddb59af0-6d04-11e5-ba46-22000b92c6ec"
# Replace these with UUIDs of collections that you have access to
SOURCE_COLLECTION = "..."
DEST_COLLECTION = "..."

NATIVE_CLIENT_ID = "61338d24-54d5-408f-a10d-66c06b59f6d2"
TIMER_CLIENT_ID = "524230d7-ea86-4a52-8312-86065a9e0417"

Expand Down Expand Up @@ -67,7 +73,9 @@ schedule a recurring Transfer task.
timer_token = token_response.by_resource_server[TIMER_CLIENT_ID]["access_token"]

# Create a `TransferData` object
data = TransferData(source_endpoint=GOEP1, destination_endpoint=GOEP2)
data = TransferData(
source_endpoint=SOURCE_COLLECTION, destination_endpoint=DEST_COLLECTION
)
data.add_item("/share/godata/file1.txt", "/~/file1.txt")

# Set up the Timer client
Expand Down