Skip to content

Commit 3023d5d

Browse files
authored
Update README & docs CI for Python 3.12 support (#125)
* Update README with v0.2.3 notes and badges Add PyPI Python versions badge and replace the Black code-style badge with a Ruff badge. Bump release to v0.2.3 and include changelog entries (Python 3.10–3.12 support, deprecation fixes, packaging moved to pyproject.toml, added uv.lock) plus a warning about SwinUNetR `in_channels` issues. Update compatibility line to Python 3.10 to 3.12. * Remove old python versions mentions * Modernize pyproject and update pre-commit hooks Bump and extend pre-commit configuration and migrate pyproject to a PEP 621 style layout. .pre-commit-config.yaml: update pre-commit-hooks rev, replace/update ruff hook to astral-sh/ruff-pre-commit with auto-fix and unsafe-fixes, add ruff-format, mdformat (with mdformat-myst), pyproject-fmt and validate-pyproject hooks; keep napari-plugin-checks. pyproject.toml: add [build-system], normalize project metadata (name, license, requires-python, classifiers), move authors to [[project.authors]], declare dynamic version, reorganize and deduplicate dependencies and optional-dependencies, add project.urls and napari entry-point, add [tool.setuptools] packaging settings, move and refine ruff configuration under [tool.ruff.lint], and add [tool.pyproject-fmt] settings. Overall this modernizes packaging and enables enhanced linting/formatting via pre-commit hooks. * Update README.md * pre-commit all * Update pyproject.toml
1 parent b6d27d9 commit 3023d5d

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

.napari/DESCRIPTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ more detailed documentation if you have it.
9898

9999
## Additional Install Steps
100100

101-
**Python >= 3.8 required**
101+
**Python >= 3.10 required**
102102

103103
Requires manual installation of **pytorch** and **MONAI**.
104104

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
<!-- [![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-cellseg3d)](https://www.napari-hub.org/plugins/napari_cellseg3d) -->
44

55
[![PyPI](https://img.shields.io/pypi/v/napari-cellseg3d.svg?color=green)](https://pypi.org/project/napari-cellseg3d)
6+
[![Python versions](https://img.shields.io/pypi/pyversions/napari-cellseg3d)](https://pypi.org/project/napari-cellseg3d)
67
[![Downloads](https://static.pepy.tech/badge/napari-cellseg3d)](https://pepy.tech/project/napari-cellseg3d)
78
[![Downloads](https://static.pepy.tech/badge/napari-cellseg3d/month)](https://pepy.tech/project/napari-cellseg3d)
89
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/AdaptiveMotorControlLab/CellSeg3D/raw/main/LICENSE)
910
[![codecov](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3D/branch/main/graph/badge.svg?token=hzUcn3XN8F)](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3D)
10-
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
11+
[![Code style:Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
1112

1213
<img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/838605d0-9723-4e43-83cd-6dbfe4adf36b/cellseg-logo.png?format=1500w" title="cellseg3d" alt="cellseg3d logo" width="150" align="right" vspace = "80"/>
1314

@@ -65,7 +66,16 @@ F1-score is computed from the Intersection over Union (IoU) with ground truth la
6566

6667
Read the [article here !](https://elifesciences.org/articles/99848)
6768

68-
### **New version: v0.2.2**
69+
### **New version: v0.2.3**
70+
71+
- v0.2.3:
72+
- Python 3.10-12 support added
73+
- Several fixes to deprecation errors on newer Python versions
74+
- Upgraded packaging to use only pyproject.toml
75+
- Added uv.lock to repository for more reproducible installs
76+
77+
> [!WARNING]
78+
> If you are still getting errors related to `in_channels` on the SwinUNetR model, please open an issue and report your MONAI version. Thanks!
6979
7080
- v0.2.2:
7181

@@ -102,7 +112,7 @@ Previous additions:
102112

103113
## Requirements
104114

105-
**Compatible with Python 3.8 to 3.10.**
115+
**Compatible with Python 3.10 to 3.12.**
106116
Requires **[napari]**, **[PyTorch]** and **[MONAI]**.
107117
Compatible with Windows, MacOS and Linux.
108118
Installation of the plugin itself should not take more than 30 minutes, depending on your internet connection,

napari_cellseg3d/code_models/models/model_SwinUNetR.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def __init__(
4545
**kwargs,
4646
)
4747
if "img_size" in sig.parameters:
48-
# since MONAI API changes depending on py3.8 or py3.9
4948
init_kwargs["img_size"] = input_img_size
5049
if "dropout_prob" in kwargs:
5150
init_kwargs["drop_rate"] = kwargs["dropout_prob"]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dev = [
7070
"twine",
7171
]
7272
docs = [
73-
"jupyter-book",
73+
"jupyter-book<2",
7474
]
7575
onnx-cpu = [ "onnx", "onnxruntime" ]
7676
onnx-gpu = [ "onnx", "onnxruntime-gpu" ]

0 commit comments

Comments
 (0)