[SYNPY-1375] Add Activity/Provenance tutorial#1351
Merged
thomasyu888 merged 7 commits intodevelopfrom Apr 16, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
andrewelamb
requested changes
Apr 6, 2026
Contributor
|
I have two main suggesstions: I think there should be a setup section at the top that either:
There's an issue where the second version fo the file isn't being created. I'm not sure it's a bug per se, but you may want to re-write the comments to reflect that. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a complete Activity/Provenance tutorial to the Python docs, backed by a runnable tutorial script using the synapseclient.models OOP API.
Changes:
- Introduces a new runnable tutorial script demonstrating creating, storing, retrieving, and deleting
Activityprovenance. - Replaces the placeholder Activity/Provenance docs page with a full step-by-step tutorial that embeds snippets from the script.
- Adds example outputs and reference links for the tutorial’s API surface (
Activity,UsedEntity,UsedURL).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| docs/tutorials/python/tutorial_scripts/activity.py | Adds the end-to-end tutorial script used for snippet includes in the docs. |
| docs/tutorials/python/activity.md | Replaces placeholder content with a full tutorial that embeds script snippets and expected outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
andrewelamb
reviewed
Apr 16, 2026
Contributor
|
LGTM! |
andrewelamb
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
docs/tutorials/python/activity.mdpage was a placeholder with no working tutorial content, only an "Under Construction" banner and a redirect to the legacy docs.synapseclient.modelsAPI introduced in PR [SYNPY-1334] Revamp getting started docs #1036.Solution:
activity.mdwith a full tutorial that walks through the four planned steps: add an activity to a file, add an activity to a specific file version, print stored activities, and delete an activity.docs/tutorials/python/tutorial_scripts/activity.py— a self-contained runnable script that backs the tutorial page, following the same pattern as all other tutorial scripts in the directory.Activity,UsedEntity, andUsedURLOOP models and demonstrates bothfile.activity = ...; file.store()and the directActivity.store(parent=...)/Activity.from_parent()/Activity.delete()class methods.Testing:
pymdownx.snippetsincludes against the script to confirm each section renders the intended code.biospecimen_experiment_1).https://synapsepythonclient--1351.org.readthedocs.build/en/1351/