Skip to content

Commit 929abe6

Browse files
authored
Merge pull request #37 from AdaptiveMotorControlLab/cy/docs-action
Updated docs building action + 0.0.2rc2
2 parents 47945fe + a09e8a5 commit 929abe6

File tree

8 files changed

+71
-25
lines changed

8 files changed

+71
-25
lines changed

.github/workflows/build_docs.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
name: CI
1+
name: Deploy Sphinx documentation to Pages
22

33
on:
44
push:
5-
branches:
5+
branches: # branch to trigger deployment
66
- main
77

88
jobs:
9-
build:
10-
11-
runs-on: ubuntu-latest
12-
9+
pages:
10+
runs-on: ubuntu-20.04
1311
steps:
14-
- run: sudo apt-get update && sudo apt-get install libgl1
15-
- run: /usr/local/bin/python -m pip install --upgrade pip
16-
- uses: actions/checkout@v1
17-
# Standard drop-in approach that should work for most people.
18-
- uses: ammaraskar/sphinx-action@master
12+
- id: deployment
13+
uses: sphinx-notes/pages@v3
1914
with:
20-
pre-build-command: "pip install -r requirements.txt napari-cellseg3d opencv-python-headless"
21-
docs-folder: "docs/"
22-
23-
- name: GitHub Pages action
24-
uses: peaceiris/[email protected]
15+
publish: false
16+
- uses: peaceiris/actions-gh-pages@v3
2517
with:
2618
github_token: ${{ secrets.GITHUB_TOKEN }}
27-
publish_dir: ./docs/_build/html
19+
publish_dir: ${{ steps.deployment.outputs.artifact }}

napari_cellseg3d/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.2rc1"
1+
__version__ = "0.0.2rc2"

napari_cellseg3d/code_plugins/plugin_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, viewer: "napari.viewer.Viewer"):
3737
self.logo_label.setToolTip("Open Github page")
3838

3939
self.info_label = ui.make_label(
40-
f"You are using napari-cellseg3d v.{'0.0.2rc1'}\n\n"
40+
f"You are using napari-cellseg3d v.{'0.0.2rc2'}\n\n"
4141
f"Plugin for cell segmentation developed\n"
4242
f"by the Mathis Lab of Adaptive Motor Control\n\n"
4343
f"Code by :\nCyril Achard\nMaxime Vidal\nJessy Lauer\nMackenzie Mathis\n"

napari_cellseg3d/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ def slider_value(self, value: int):
581581
f"The value for the slider ({value}) cannot be out of ({self.minimum()};{self.maximum()}) "
582582
)
583583

584-
self.setValue(value)
584+
self.setValue(int(value))
585585

586586
divided = value / self._divide_factor
587587
if self._divide_factor == 1.0:

napari_cellseg3d/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
LOGGER = logging.getLogger(__name__)
1515
###############
1616
# Global logging level setting
17-
LOGGER.setLevel(logging.DEBUG)
18-
# LOGGER.setLevel(logging.INFO)
17+
# LOGGER.setLevel(logging.DEBUG)
18+
LOGGER.setLevel(logging.INFO)
1919
###############
2020

2121
"""
@@ -161,7 +161,7 @@ def align_array_sizes(array_shape, target_shape):
161161
for i in range(len(targets)):
162162
targets[i] = reverse_mapping[targets[i]]
163163
infos = np.unique(origins, return_index=True, return_counts=True)
164-
info_dict = {"origins": infos[0], "index": infos[1], "counts": infos[2]}
164+
{"origins": infos[0], "index": infos[1], "counts": infos[2]}
165165
# print(info_dict)
166166

167167
final_orig = []

pyproject.toml

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,65 @@
1+
[project]
2+
name = "napari_cellseg3d"
3+
version = "0.0.2rc2"
4+
authors = [
5+
{name = "Cyril Achard", email = "[email protected]"},
6+
{name = "Maxime Vidal", email = "[email protected]"},
7+
{name = "Mackenzie Mathis", email = "[email protected]"},
8+
]
9+
requires-python = ">=3.8"
10+
dependencies = [
11+
"numpy",
12+
"napari[all]>=0.4.14",
13+
"QtPy",
14+
"opencv-python>=4.5.5",
15+
"dask-image>=0.6.0",
16+
"scikit-image>=0.19.2",
17+
"matplotlib>=3.4.1",
18+
"tifffile>=2022.2.9",
19+
"imageio-ffmpeg>=0.4.5",
20+
"torch>=1.11",
21+
"monai[nibabel,einops]>=0.9.0",
22+
"itk",
23+
"tqdm",
24+
"nibabel",
25+
"scikit-image",
26+
"pillow",
27+
"tqdm",
28+
"matplotlib",
29+
"vispy>=0.9.6",
30+
]
31+
132
[build-system]
233
requires = ["setuptools", "wheel"]
334
build-backend = "setuptools.build_meta"
435

5-
36+
[tool.ruff]
37+
# Never enforce `E501` (line length violations).
38+
ignore = ["E501", "E741"]
639

740
[tool.black]
841
line-length = 79
942

1043
[tool.isort]
1144
profile = "black"
1245
line_length = 79
46+
47+
[project.optional-dependencies]
48+
dev = [
49+
"isort",
50+
"black",
51+
"ruff",
52+
]
53+
docs = [
54+
"sphinx",
55+
"sphinx_autodoc_typehints",
56+
"sphinx_rtd_theme",
57+
"twine",
58+
]
59+
test = [
60+
"pytest",
61+
"pytest_qt",
62+
"coverage",
63+
"tox",
64+
"twine",
65+
]

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = napari-cellseg3d
3-
version = 0.0.2rc1
3+
version = 0.0.2rc2
44
author = Cyril Achard, Maxime Vidal, Jessy Lauer, Mackenzie Mathis
55
66

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ passenv =
2929
deps =
3030
pytest # https://docs.pytest.org/en/latest/contents.html
3131
pytest-cov # https://pytest-cov.readthedocs.io/en/latest/
32+
dask-image
3233
; # you can remove these if you don't use them
3334
napari
3435
PyQt5

0 commit comments

Comments
 (0)