Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #300

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_stages:
minimum_pre_commit_version: 2.9.3
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [numpy>=1.23]
Expand Down Expand Up @@ -49,7 +49,7 @@ repos:
hooks:
- id: blacken-docs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
rev: v0.6.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
1 change: 1 addition & 0 deletions benchmarks/benchmark_qt_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from napari import Viewer
from napari.layers import Image
from napari.utils.events import EventedList

from napari_spatialdata._sdata_widgets import SdataWidget


Expand Down
21 changes: 10 additions & 11 deletions docs/notebooks/mibitof_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"from napari_spatialdata import Interactive\n",
"from spatialdata import SpatialData\n",
"import squidpy as sq\n",
"import scanpy as sc\n",
"\n",
"plt.rcParams['figure.figsize'] = (20, 20)"
"from napari_spatialdata import Interactive\n",
"\n",
"plt.rcParams[\"figure.figsize\"] = (20, 20)"
]
},
{
Expand Down Expand Up @@ -205,7 +204,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -254,7 +253,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -295,7 +294,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -347,7 +346,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -398,7 +397,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -439,7 +438,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -480,7 +479,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
}
],
Expand Down
22 changes: 11 additions & 11 deletions docs/notebooks/nanostring_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"from napari_spatialdata import Interactive\n",
"from spatialdata import SpatialData\n",
"import squidpy as sq\n",
"import scanpy as sc\n",
"from spatialdata import SpatialData\n",
"\n",
"from napari_spatialdata import Interactive\n",
"\n",
"plt.rcParams['figure.figsize'] = (20, 20)"
"plt.rcParams[\"figure.figsize\"] = (20, 20)"
]
},
{
Expand Down Expand Up @@ -278,7 +278,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -327,7 +327,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -390,7 +390,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -431,7 +431,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -483,7 +483,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -572,7 +572,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -613,7 +613,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
}
],
Expand Down
39 changes: 20 additions & 19 deletions docs/notebooks/scatterwidget.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"from napari_spatialdata import QtAdataScatterWidget\n",
"import matplotlib.pyplot as plt\n",
"import squidpy as sq\n",
"import matplotlib.pyplot as plt"
],
"outputs": []
"\n",
"from napari_spatialdata import QtAdataScatterWidget"
]
},
{
"attachments": {},
Expand All @@ -60,10 +61,10 @@
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"adata = sq.datasets.visium_hne_adata()"
],
"outputs": []
]
},
{
"attachments": {},
Expand All @@ -77,10 +78,10 @@
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"%gui qt5"
],
"outputs": []
]
},
{
"attachments": {},
Expand All @@ -94,11 +95,11 @@
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"widget = QtAdataScatterWidget(adata)\n",
"widget.show()"
],
"outputs": []
]
},
{
"attachments": {},
Expand All @@ -112,11 +113,11 @@
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"plt.imshow(widget.screenshot())\n",
"plt.axis('off')"
],
"outputs": []
"plt.axis(\"off\")"
]
},
{
"attachments": {},
Expand All @@ -130,21 +131,21 @@
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"plt.imshow(widget.screenshot())\n",
"plt.axis('off')"
],
"outputs": []
"plt.axis(\"off\")"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"plt.imshow(widget.screenshot())\n",
"plt.axis('off')"
],
"outputs": []
"plt.axis(\"off\")"
]
}
],
"metadata": {
Expand Down
23 changes: 12 additions & 11 deletions docs/notebooks/spatialdata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"from napari_spatialdata import Interactive\n",
"from spatialdata import SpatialData\n",
"\n",
"plt.rcParams['figure.figsize'] = (20, 20)\n",
"from napari_spatialdata import Interactive\n",
"\n",
"plt.rcParams[\"figure.figsize\"] = (20, 20)\n",
"\n",
"FILE_PATH = \"../../../data/cosmx/data.zarr\" # Change this\n",
"sdata = SpatialData.read(FILE_PATH)"
Expand Down Expand Up @@ -156,7 +157,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -246,7 +247,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -299,7 +300,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -358,7 +359,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -401,7 +402,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -459,7 +460,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -502,7 +503,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -543,7 +544,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
},
{
Expand Down Expand Up @@ -584,7 +585,7 @@
],
"source": [
"plt.imshow(interactive.screenshot())\n",
"plt.axis('off')"
"plt.axis(\"off\")"
]
}
],
Expand Down
3 changes: 2 additions & 1 deletion examples/spatialdata_visium.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

# The dataset can be downloaded from https://spatialdata.scverse.org/en/latest/tutorials/notebooks/datasets/README.html

from napari_spatialdata import Interactive
from spatialdata import SpatialData

from napari_spatialdata import Interactive

if __name__ == "__main__":
sdata = SpatialData.read("../data/visium/data.zarr") # Change this path!
i = Interactive(sdata)
Expand Down
Loading
Loading