[SYNPY-1402] Update reticulate tutorial for new OOP models/operations API#1352
Merged
thomasyu888 merged 4 commits intodevelopfrom Apr 16, 2026
Merged
[SYNPY-1402] Update reticulate tutorial for new OOP models/operations API#1352thomasyu888 merged 4 commits intodevelopfrom
thomasyu888 merged 4 commits intodevelopfrom
Conversation
…s API - Add Docker setup instructions for fresh RStudio environment - Update Python version requirement to 3.10+ - Update install command to include pandas,curator extras - Replace legacy synapseclient$File/Project/etc with models$* pattern - Replace syn$store/get with entity$store() OOP pattern; keep operations$get for type-unknown retrieval - Update tables to use models$Table + store_rows with SchemaStorageStrategy - Update views to use models$EntityView with ViewTypeMask - Replace syn$tableQuery with models$query - Move R package onLoad guidance to its own section at end of doc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
andrewelamb
reviewed
Apr 6, 2026
andrewelamb
approved these changes
Apr 6, 2026
Contributor
|
LGTM! I had one suggestion for clarity. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the R/reticulate tutorial to reflect synapseclient’s new OOP models.* / operations.* APIs, adds environment setup guidance, and refreshes version/dependency instructions so R users can follow modern examples end-to-end.
Changes:
- Add Docker-based RStudio + Python setup instructions and update Python requirement to 3.10+.
- Replace legacy
synapseclient$*entity usage withmodels$*entities andentity$store()/models$query()patterns. - Refresh table/view examples to use
Table.store_rows(),SchemaStorageStrategy, andEntityView+ViewTypeMask.
Comments suppressed due to low confidence (1)
docs/tutorials/reticulate.md:161
- This section reintroduces
syn$get_annotations()/syn$set_annotations(), which are deprecated in the client (marked for removal in 5.0.0). Since the tutorial is positioning the new OOP API, it would be better to either remove this alternative or clearly label it as deprecated and keep the recommended approach as updatingentity$annotations+entity$store().
Alternatively, retrieve and update annotations directly:
```r
annotations <- syn$get_annotations(project$id)
annotations$foo <- "bar"
annotations$fooList <- list("bar", "baz")
syn$set_annotations(annotations)
</details>
---
💡 <a href="/Sage-Bionetworks/synapsePythonClient/new/develop?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
thomasyu888
commented
Apr 8, 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/reticulate.mdwas written against the legacy synapseclient API (synapseclient$File,syn$store(),syn$get(), etc.)models.*,operations.*,entity$store()) was not documented for R/reticulate usersSolution:
synapseclient$File,synapseclient$Project, etc.) withmodels$File,models$Project, etc.entity$store()OOP pattern throughout; keepoperations$get()for type-unknown retrieval by Synapse IDmodels$Table+store_rows()withSchemaStorageStrategy$INFER_FROM_DATAandmodels$Columnwith snake_case fields (column_type,maximum_size)models$EntityViewwithViewTypeMaskbitmasksyn$tableQuery()$asDataFrame()withmodels$query()py_install("synapseclient[pandas,curator]")onLoad/delay_loadguidance to its own section at the end (it was mixed into the general usage section)Testing:
entity$store(),entity$get(),operations$get(),models$query(), andtable$store_rows()calls work end-to-end against Synapsemkdocs serveand confirm the page renders correctly