cellmap_flow.portable.pasted ============================ .. py:module:: cellmap_flow.portable.pasted .. autoapi-nested-parse:: A dataset path as a person pastes it, as cellmap-flow reads it. A path copied from Neuroglancer's source field names its format as well as its location: in front, as ``zarr://``, ``zarr2://``, ``zarr3://`` or ``n5://`` (``zarr://https://host/x.zarr/raw``), or after it in Neuroglancer's newer pipeline form, as ``|zarr:``, ``|zarr2:``, ``|zarr3:``, ``|n5:`` or ``|neuroglancer-precomputed:`` (``gs://bucket/x.zarr/raw|zarr2:``), where what follows the colon is a path inside the location (``gs://bucket/x.zarr|zarr2:raw`` is ``gs://bucket/x.zarr/raw``). cellmap-flow finds a zarr's or an N5's format itself, so ``pasted_path`` drops the format and keeps the location; a precomputed volume is named ``precomputed://``, as cellmap-flow names it (``io/paths.py``, the browser's ``web/src/backend/routes/data.ts``), and that form is kept as it is. Blanks and quotes around the text go too. Anything else, a local path or a URL (``gs://``, ``s3://``, ``https://``, ``file://``) or a format cellmap-flow does not read (``graphene://``), is left as it is. Called where a person gives a dataset: the CLIs' ``-d`` (``view``, ``infer ``, ``add --run``), a YAML's ``data_path`` (``config/yaml.py`` ``load_config``, for ``cellmap_flow yaml`` and blockwise tasks), and the dashboard's dataset field and box tool (``dashboard/requests.py`` SetData and BbxGenerator). The browser's twin, ``web/src/shared/pasted.ts`` ``pastedPath``, applies the same pattern, which ``build/export_data.py`` exports, to its dataset field (``routes/data.ts``) and its ``?dataset=`` links (``web/src/link.ts`` parseLink); both are held to one table of cases, ``web/test/fixtures/pasted_paths.json``. Attributes ---------- .. autoapisummary:: cellmap_flow.portable.pasted.NEUROGLANCER_SOURCE Functions --------- .. autoapisummary:: cellmap_flow.portable.pasted.pasted_path Module Contents --------------- .. py:data:: NEUROGLANCER_SOURCE .. py:function:: pasted_path(text: str) -> str The dataset ``text`` names, without the Neuroglancer format around it.