Skip to content
Open
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v6.0.0
hooks:
- id: check-docstring-first
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: ^\.napari-hub/.*
- id: check-yaml # checks for correct yaml syntax for github actions ex.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
rev: v0.14.1
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 24.3.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
hooks:
- id: black
- repo: https://github.com/tlambert03/napari-plugin-checks
Expand Down
9 changes: 2 additions & 7 deletions notebooks/demo_biological_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,10 @@
"metadata": {},
"outputs": [],
"source": [
"import glob\n",
"import pandas as pd\n",
"from pathlib import Path\n",
"import numpy as np\n",
"from skimage import io, measure\n",
"\n",
"import napari\n",
"import napari_clusters_plotter as ncp\n",
"import napari_segment_blobs_and_things_with_membranes as nsbatwm"
"\n",
"import napari_clusters_plotter as ncp"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions notebooks/demo_cluster_export.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
"outputs": [],
"source": [
"import napari\n",
"from napari.layers import Points\n",
"import numpy as np\n",
"from napari_clusters_plotter._new_plotter_widget import _export_cluster_to_layer, PlotterWidget"
"from napari.layers import Points\n",
"\n",
"from napari_clusters_plotter._new_plotter_widget import (\n",
" PlotterWidget,\n",
")"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions notebooks/demo_new_plotter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"outputs": [],
"source": [
"import napari\n",
"from napari_clusters_plotter._new_plotter_widget import PlotterWidget\n",
"\n",
"from skimage import morphology, measure, data\n",
"import numpy as np\n",
"import pandas as pd"
"import pandas as pd\n",
"from skimage import data, measure\n",
"\n",
"from napari_clusters_plotter._new_plotter_widget import PlotterWidget"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions notebooks/demo_new_reduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"metadata": {},
"outputs": [],
"source": [
"from napari_clusters_plotter._new_plotter_widget import PlotterWidget\n",
"from napari_clusters_plotter._dim_reduction_and_clustering import DimensionalityReductionWidget, ClusteringWidget\n",
"from napari_clusters_plotter._algorithms import reduce_pca\n",
"import napari\n",
"import numpy as np\n",
"import pandas as pd\n",
"from napari.layers import Points\n",
"\n",
"from skimage import data, measure\n",
"\n",
"import pandas as pd"
"from napari_clusters_plotter._dim_reduction_and_clustering import (\n",
" ClusteringWidget,\n",
" DimensionalityReductionWidget,\n",
")\n",
"from napari_clusters_plotter._new_plotter_widget import PlotterWidget"
]
},
{
Expand Down
14 changes: 5 additions & 9 deletions notebooks/demo_shapes_clustering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
"metadata": {},
"outputs": [],
"source": [
"import glob\n",
"import pandas as pd\n",
"from pathlib import Path\n",
"import napari\n",
"import numpy as np\n",
"from skimage import io, measure\n",
"import pandas as pd\n",
"\n",
"import napari\n",
"import napari_clusters_plotter as ncp\n",
"import napari_segment_blobs_and_things_with_membranes as nsbatwm"
"import napari_clusters_plotter as ncp"
]
},
{
Expand Down Expand Up @@ -49,8 +45,8 @@
"source": [
"# random centers\n",
"box_centers = np.random.random((20, 2)) * 1000\n",
"box_widths = np.random.random((20)) * 100\n",
"box_heights = np.random.random((20)) * 100\n",
"box_widths = np.random.random(20) * 100\n",
"box_heights = np.random.random(20) * 100\n",
"features = pd.DataFrame({'box_widths': box_widths, 'box_heights': box_heights})\n",
"features['area'] = features['box_widths'] * features['box_heights']\n",
"\n",
Expand Down