Session-based remote API, notebook testing, and usability improvements#37
Merged
Session-based remote API, notebook testing, and usability improvements#37
Conversation
… functions Simplifies the authentication flow so users no longer need to import login_interactive() from internal paths or thread api_client through every call. Breaking change: api_client moves from first positional arg to last optional kwarg in save_and_start, wait_for_simulation, export_n5, and run_remote. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduces session-based API for all remote operations: - vc.connect() for anonymous access, vc.connect(login=True) for auth - VCellSession with run_sim(), start_sim(), save_biomodel(), load_biomodel(), list_biomodels() - SimulationJob with status, wait(), export(), result() for non-blocking simulation control - Remove module-level remote functions (run_remote, save_and_start, etc.) and load_biomodel/list_biomodels from top-level vc.* API - Add integration tests with --run-remote flag for authenticated tests - Rewrite remote-simulations guide and notebook around session API Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Separates the export request submission from the polling loop, making it possible to expose non-blocking export in the future without changing the current blocking public API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add tests/examples/test_example_notebooks.py with mypy lint checks for all example notebooks and tiered execution tests (default, --run-interactive for trame, --run-remote for VCell auth) - Update tests/guides/test_notebooks.py to use --run-remote flag instead of hardcoded skip for remote-simulations notebook - Fix fielddata_trame.ipynb: rename shadowed `app` variable to `viewer` - Fix _internal_data_demo.ipynb: rename shadowed `y` variable - Fix _internal_vcell_publications.ipynb: import Publication directly - Add copasi-basico as dev dependency for sysbio notebooks - Reduce remote-simulations notebook/guide model size for faster tests - Fix DeprecationWarning for Path context manager in vtk_test and test_result - Add --run-interactive pytest flag - Add docs/project-overview.md for presentations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Field.expression property generates vcField() string for use in initial condition formulas - Field.__init__ with defaults for var_name and time for direct construction without create_fields() - Application.get_species_mapping() convenience method - SegmentedImageGeometry.get_mask() returns boolean mask by subvolume name - Fix to_segmented_image() to use subvolume names instead of pixel class names for image-based geometries - Add scipy mypy override Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Widget fixes: - Fix time_index bug: get_data expects time value, not index - Refactor into _init_state/_bind_state_changes/_render_current/_render - Preserve valid state (variable, time, clip) across re-runs - Add status bar footer showing current render info - Add error handling in state change callbacks - Set iframe height to 1000px for better display in notebooks New examples: - examples/notebooks/image_field_data_demo.ipynb — synthetic microscopy image as initial conditions with Trame visualization - examples/scripts/image_field_data_demo.py — same workflow as script - Update project-overview.md with image field data example Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Breaking changes in this release warrant a minor version bump. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Session-based remote API
vc.connect()as single entry point — anonymous by default,vc.connect(login=True)for authenticated accessVCellSessionwithrun_sim(),start_sim(),save_biomodel(),load_biomodel(),list_biomodels()SimulationJob(fromstart_sim()) with.status,.wait(),.export(),.result()for non-blocking controlvc.*— all remote ops go through a sessionexport_n5internally into_submit_export/_await_exportfor future non-blocking exportNotebook testing infrastructure
--run-interactive(trame),--run-remote(VCell auth)--run-remoteflagAPI usability improvements
Field.expressionproperty — generatesvcField()strings, composable in formulasField.__init__with defaults — direct construction without circularcreate_fields()patternApplication.get_species_mapping(name)— convenience accessorSegmentedImageGeometry.get_mask(name)— boolean mask by subvolume nameto_segmented_image()to use subvolume names for image-based geometriesTrame widget
get_dataexpects time value, not index)New examples
image_field_data_demonotebook and script — synthetic microscopy image as simulation initial conditionsdocs/project-overview.md— project summary for presentationsBreaking changes
vc.login(),vc.run_remote(),vc.save_and_start(),vc.wait_for_simulation(),vc.export_n5(),vc.load_biomodel(),vc.list_biomodels()removed from public APIsession = vc.connect()orsession = vc.connect(login=True)Usage
Test plan
make check(lint, mypy, deptry) passespoetry run pytest tests -v— all tests passpoetry run pytest tests -v --run-remote— authenticated remote testspoetry run pytest tests -v --run-interactive— trame/display testsimage_field_data_demo.ipynbin Jupyter, verify Trame widget🤖 Generated with Claude Code