Skip to content

Commit

Permalink
Merge pull request #41 from lucas-diedrich/fix-1
Browse files Browse the repository at this point in the history
Fix 1
  • Loading branch information
lucas-diedrich authored Jan 15, 2025
2 parents 2a3b824 + 8014574 commit 545f53f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 26 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ concurrency:

jobs:
package:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ __pycache__/
# docs
/docs/generated/
/docs/_build/
/docs/tutorials/mock-data/
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ conda create -n dvpio python=3.11 -y && conda activate dvpio
pip install git+https://github.com/lucas-diedrich/dvp-io.git@main
```

## Known issues with napari_spatialdata

Importing napari_spatialdata might initially fail due missing non-python dependencies. If you get the following error:

```python
import napari_spatialdata
> qtpy.PythonQtError: No Qt bindings could be found
```

Try to install the `pyqt5-tools` binaries in your environment

```bash
pip install pyqt5-tools
```

## Release notes

Refer to the [Releases page](https://github.com/lucas-diedrich/dvp-io/releases) for information on releases and the changelog.
Expand Down
51 changes: 26 additions & 25 deletions docs/tutorials/002_read-dvpio.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -55,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {
"vscode": {
"languageId": "shellscript"
Expand Down Expand Up @@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -103,12 +103,13 @@
],
"source": [
"import spatialdata\n",
"import spatialdata_plot # noqa"
"import spatialdata_plot # noqa\n",
"from napari_spatialdata import Interactive # noqa"
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -126,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -136,7 +137,7 @@
"with coordinate systems:"
]
},
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -160,7 +161,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -550,7 +551,7 @@
" * y (y) float64 8kB 0.5 1.5 2.5 3.5 ... 1.022e+03 1.022e+03 1.024e+03\n",
" * x (x) float64 8kB 0.5 1.5 2.5 3.5 ... 1.022e+03 1.022e+03 1.024e+03\n",
"Attributes:\n",
" transform: {&#x27;global&#x27;: Identity }</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'image'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>c</span>: 1</li><li><span class='xr-has-index'>y</span>: 1024</li><li><span class='xr-has-index'>x</span>: 1024</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-75e5101e-dc37-4bdd-b93b-32a4f65b51ac' class='xr-array-in' type='checkbox' checked><label for='section-75e5101e-dc37-4bdd-b93b-32a4f65b51ac' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 1024, 1024), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" transform: {&#x27;global&#x27;: Identity }</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'image'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>c</span>: 1</li><li><span class='xr-has-index'>y</span>: 1024</li><li><span class='xr-has-index'>x</span>: 1024</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-d718a0d0-c6c7-4947-aa23-c58ee62eea1d' class='xr-array-in' type='checkbox' checked><label for='section-d718a0d0-c6c7-4947-aa23-c58ee62eea1d' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 1024, 1024), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
Expand Down Expand Up @@ -628,19 +629,19 @@
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-f6d8b421-5ab3-4464-8f8f-234b8775d35c' class='xr-section-summary-in' type='checkbox' checked><label for='section-f6d8b421-5ab3-4464-8f8f-234b8775d35c' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>c</span></div><div class='xr-var-dims'>(c)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-8f37ad3f-5c9a-4ca2-9966-83bf6374f18b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-8f37ad3f-5c9a-4ca2-9966-83bf6374f18b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-312c27c1-f6b8-45b6-a2c3-c4da8593dbe9' class='xr-var-data-in' type='checkbox'><label for='data-312c27c1-f6b8-45b6-a2c3-c4da8593dbe9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>c</dd><dt><span>units :</span></dt><dd></dd></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5 1.5 2.5 ... 1.022e+03 1.024e+03</div><input id='attrs-24b6a195-5b44-4e8a-9c31-ffaa889370e9' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-24b6a195-5b44-4e8a-9c31-ffaa889370e9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-c8586695-c3b0-4ecb-9627-e87ebc3a28cc' class='xr-var-data-in' type='checkbox'><label for='data-c8586695-c3b0-4ecb-9627-e87ebc3a28cc' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([5.0000e-01, 1.5000e+00, 2.5000e+00, ..., 1.0215e+03, 1.0225e+03,\n",
" 1.0235e+03])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5 1.5 2.5 ... 1.022e+03 1.024e+03</div><input id='attrs-7247a5db-973e-44c8-982b-94abde79b56c' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-7247a5db-973e-44c8-982b-94abde79b56c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-31ffe472-1703-47c3-88a2-a6ac0c082aa7' class='xr-var-data-in' type='checkbox'><label for='data-31ffe472-1703-47c3-88a2-a6ac0c082aa7' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([5.0000e-01, 1.5000e+00, 2.5000e+00, ..., 1.0215e+03, 1.0225e+03,\n",
" 1.0235e+03])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f39f41f3-cbb2-45b7-b64c-c8e983498cae' class='xr-section-summary-in' type='checkbox' ><label for='section-f39f41f3-cbb2-45b7-b64c-c8e983498cae' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>c</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-96491f08-4a55-4083-baba-07d332f2f9ac' class='xr-index-data-in' type='checkbox'/><label for='index-96491f08-4a55-4083-baba-07d332f2f9ac' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0], dtype=&#x27;int64&#x27;, name=&#x27;c&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-61ba39c2-f0b6-4a56-b833-217447c0a0b7' class='xr-index-data-in' type='checkbox'/><label for='index-61ba39c2-f0b6-4a56-b833-217447c0a0b7' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5,\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-db19b7a2-0cf6-448a-9560-4d98e511ac14' class='xr-section-summary-in' type='checkbox' checked><label for='section-db19b7a2-0cf6-448a-9560-4d98e511ac14' class='xr-section-summary' >Coordinates: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>c</span></div><div class='xr-var-dims'>(c)</div><div class='xr-var-dtype'>int64</div><div class='xr-var-preview xr-preview'>0</div><input id='attrs-ab71bfc3-521d-4f52-8222-8938d7c05d59' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ab71bfc3-521d-4f52-8222-8938d7c05d59' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-21b89131-19c5-4d9a-9703-de9a7c099da8' class='xr-var-data-in' type='checkbox'><label for='data-21b89131-19c5-4d9a-9703-de9a7c099da8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>c</dd><dt><span>units :</span></dt><dd></dd></dl></div><div class='xr-var-data'><pre>array([0])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5 1.5 2.5 ... 1.022e+03 1.024e+03</div><input id='attrs-cc080e33-531a-4477-9818-8415a73670ec' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-cc080e33-531a-4477-9818-8415a73670ec' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d0bc30b1-fb3a-4615-ab26-b2172465cf2a' class='xr-var-data-in' type='checkbox'><label for='data-d0bc30b1-fb3a-4615-ab26-b2172465cf2a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([5.0000e-01, 1.5000e+00, 2.5000e+00, ..., 1.0215e+03, 1.0225e+03,\n",
" 1.0235e+03])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>0.5 1.5 2.5 ... 1.022e+03 1.024e+03</div><input id='attrs-f9cf622c-00a6-41af-9c66-89b2cd118710' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-f9cf622c-00a6-41af-9c66-89b2cd118710' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-093c5710-65db-41bb-96c2-620d3ceaa40b' class='xr-var-data-in' type='checkbox'><label for='data-093c5710-65db-41bb-96c2-620d3ceaa40b' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><pre>array([5.0000e-01, 1.5000e+00, 2.5000e+00, ..., 1.0215e+03, 1.0225e+03,\n",
" 1.0235e+03])</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-1ffcb07e-98ca-428b-afdd-211471d0edfe' class='xr-section-summary-in' type='checkbox' ><label for='section-1ffcb07e-98ca-428b-afdd-211471d0edfe' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>c</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-af3cbaf5-3c25-4fbf-b933-ec9b746e5e3e' class='xr-index-data-in' type='checkbox'/><label for='index-af3cbaf5-3c25-4fbf-b933-ec9b746e5e3e' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([0], dtype=&#x27;int64&#x27;, name=&#x27;c&#x27;))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-a5c57f94-3ad3-4fe1-9a61-67314138d3bf' class='xr-index-data-in' type='checkbox'/><label for='index-a5c57f94-3ad3-4fe1-9a61-67314138d3bf' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5,\n",
" 9.5,\n",
" ...\n",
" 1014.5, 1015.5, 1016.5, 1017.5, 1018.5, 1019.5, 1020.5, 1021.5, 1022.5,\n",
" 1023.5],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;y&#x27;, length=1024))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-6e8286d2-76ab-4196-9181-edea97dab6df' class='xr-index-data-in' type='checkbox'/><label for='index-6e8286d2-76ab-4196-9181-edea97dab6df' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5,\n",
" dtype=&#x27;float64&#x27;, name=&#x27;y&#x27;, length=1024))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-6de8f5f2-fbc4-45a3-8f6c-34f45f6fb823' class='xr-index-data-in' type='checkbox'/><label for='index-6de8f5f2-fbc4-45a3-8f6c-34f45f6fb823' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([ 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5,\n",
" 9.5,\n",
" ...\n",
" 1014.5, 1015.5, 1016.5, 1017.5, 1018.5, 1019.5, 1020.5, 1021.5, 1022.5,\n",
" 1023.5],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;x&#x27;, length=1024))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-e895fbee-3b6d-4ebb-887a-7e7fa458683d' class='xr-section-summary-in' type='checkbox' checked><label for='section-e895fbee-3b6d-4ebb-887a-7e7fa458683d' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>transform :</span></dt><dd>{&#x27;global&#x27;: Identity }</dd></dl></div></li></ul></div></div>"
" dtype=&#x27;float64&#x27;, name=&#x27;x&#x27;, length=1024))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f36f83ae-2c37-4d4f-9840-49a199ff09f2' class='xr-section-summary-in' type='checkbox' checked><label for='section-f36f83ae-2c37-4d4f-9840-49a199ff09f2' class='xr-section-summary' >Attributes: <span>(1)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>transform :</span></dt><dd>{&#x27;global&#x27;: Identity }</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'image' (c: 1, y: 1024, x: 1024)> Size: 8MB\n",
Expand All @@ -653,7 +654,7 @@
" transform: {'global': Identity }"
]
},
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -672,7 +673,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand All @@ -686,7 +687,7 @@
" blobs (Images)"
]
},
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -709,7 +710,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -739,7 +740,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -753,7 +754,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -769,7 +770,7 @@
" blobs (Images), calibration_points_image (Points)"
]
},
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -789,7 +790,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -907,7 +908,7 @@
"[62 rows x 3 columns]"
]
},
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -931,7 +932,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -960,7 +961,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 545f53f

Please sign in to comment.