spacr.qt.widgets.sample_project¶
Explore pipeline flowcharts and optionally start an example from Home.
The dialog opens the first module in the selected pathway with example data and settings supplied. A status-bar walkthrough button keeps the route available after the example opens.
Pathways come from spacr/resources/module_workflows.json, shared with
tutorials, walkthroughs and API pages. Three fallback pathways are available
if the bundled map is missing.
Classes¶
Explore pathway flowcharts and optionally start an example project. |
Functions¶
|
Describe fallback modules using their runtime input/output declarations. |
|
Ask which pathway, open its first module, and load its example. |
|
Add external inputs to a display copy without changing runnable steps. |
|
The pathways to offer, from the shared map or the fallback. |
|
Load the example data of the module |
Module Contents¶
- class spacr.qt.widgets.sample_project.SampleProjectDialog(parent=None, entries: List[Dict] | None = None)[source]¶
Bases:
spacr.qt.widgets.workflow_diagram.DiagramDialogExplore pathway flowcharts and optionally start an example project.
- Parameters:
parent – the window it belongs to.
entries – the pathways;
pathways()when None.
Show a module/input/output flowchart for each pathway row.
- eventFilter(watched, event)[source]¶
Select a pipeline from any part of its row, preserving pan and clicks.
- Parameters:
watched – widget whose optional pipelineRow property identifies a row.
event – Qt event; only a left-button press changes the selection.
- Returns:
the base event filter’s result, preserving normal event handling.
- spacr.qt.widgets.sample_project.fallback_workflow_map(keys)[source]¶
Describe fallback modules using their runtime input/output declarations.
- Parameters:
keys – modules needed by a fallback pathway.
- Returns:
display map with port descriptions, locations and API references. GUI-only editing modules use their documented source/mask/database contracts. This performs no filesystem scan of user data.
- spacr.qt.widgets.sample_project.offer_a_sample_project(window, opener: Callable[[str], object], entries: List[Dict] | None = None) str[source]¶
Ask which pathway, open its first module, and load its example.
- Parameters:
window – the main window, the dialog’s parent.
opener –
fn(module key) -> the screen, normally the window’s own navigation.entries – the pathways, for tests.
- Returns:
the module key opened, or
""when nothing was chosen.
- spacr.qt.widgets.sample_project.pathway_graph(entry, data, steps)[source]¶
Add external inputs to a display copy without changing runnable steps.
- Parameters:
entry – pathway metadata with optional external input records.
data – shared module/artifact map, left unchanged.
steps – runnable module dependencies, left unchanged.
- Returns:
display map, node keys and dependencies including input nodes.
- spacr.qt.widgets.sample_project.pathways(map_file: pathlib.Path | None = None) List[Dict][source]¶
The pathways to offer, from the shared map or the fallback.
- Parameters:
map_file – the map;
MAP_FILEwhen None.- Returns:
dicts with
id,title,summaryandmodules.
- spacr.qt.widgets.sample_project.start_example(screen) str[source]¶
Load the example data of the module
screenshows.Each module already knows how to fetch its own example – Annotate asks which half it needs and OPS has its sequencing-cycle sample – so this calls what the module has rather than a second downloader.
- Parameters:
screen – the module screen just opened.
- Returns:
what was started:
"chooser","test data"or"".