Skip to content

Commit a7973a2

Browse files
authored
Updated pyproject.toml and conda environment yaml files (#40)(closes #39)
1 parent d2a2065 commit a7973a2

7 files changed

Lines changed: 102 additions & 103 deletions

File tree

.github/workflows/setup_test_publish.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
shell: bash -el {0}
2121

2222
strategy:
23-
fail-fast: true
23+
fail-fast: false
2424
matrix:
2525
platform: [ubuntu-latest, windows-latest, macos-latest]
2626
python-version: ["3.10"]
@@ -29,17 +29,16 @@ jobs:
2929
- uses: actions/checkout@v4
3030
# these libraries enable testing on Qt on linux
3131
- uses: tlambert03/setup-qt-libs@v1
32-
- uses: mamba-org/setup-micromamba@v1
32+
- uses: mamba-org/setup-micromamba@v2
3333
env:
3434
ACTIONS_STEP_DEBUG: false
3535
with:
3636
environment-name: ff
3737
environment-file: env_cpu.yml
3838
condarc: |
3939
channels:
40-
- pytorch
4140
- conda-forge
42-
- defaults
41+
- nodefaults
4342
init-shell: bash powershell
4443
cache-downloads: true
4544
post-cleanup: 'all'
@@ -54,14 +53,18 @@ jobs:
5453
echo "$(which micromamba)"
5554
echo "$(which python)"
5655
56+
- name: pip list
57+
run: pip list
58+
shell: bash -el {0}
59+
5760
# strategy borrowed from vispy for installing opengl libs on windows
5861
- name: Install Windows OpenGL
5962
if: runner.os == 'Windows'
6063
run: |
6164
micromamba activate ff
6265
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
6366
powershell gl-ci-helpers/appveyor/install_opengl.ps1
64-
67+
6568
- name: Run Tests
6669
# uses: aganders3/headless-gui@v2.2
6770
# with:
@@ -70,7 +73,7 @@ jobs:
7073
micromamba activate ff
7174
python -m pip install .[dev]
7275
pytest -v --color=yes --cov=featureforest --cov-report=xml -m "not slow"
73-
76+
7477
- name: Coverage
7578
uses: codecov/codecov-action@v4
7679
with:
@@ -115,4 +118,3 @@ jobs:
115118
- uses: softprops/action-gh-release@v2
116119
with:
117120
generate_release_notes: true
118-

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repos:
1717
hooks:
1818
- id: ruff # Run the linter
1919
types_or: [ python, pyi ]
20-
args: [ --fix ]
20+
args: [ --fix, --show-fixes ]
2121
- id: ruff-format # Run the formatter
2222
types_or: [ python, pyi ]
2323
- repo: https://github.com/psf/black

docs/install.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ mamba env create -f ./env_cpu.yml
1414
```
1515

1616
### Note
17-
You need to install `sam-2` which can be installed easily using mamba (or conda). To install `sam-2` using `pip` please refer to the official [sam-2](https://github.com/facebookresearch/sam2) repository.
17+
You need to install `segment-anything` and `sam-2` which can be installed easily using mamba (or conda). To install `sam-2` using `pip` please refer to the official [sam-2](https://github.com/facebookresearch/sam2) repository.
1818

1919
## Requirements
20-
- `python >= 3.10`
21-
- `numpy==1.24.4`
20+
- `python>=3.10`
21+
- `numpy<2.2`
22+
- `pytorch>=2.3.1`
23+
- `torchvision>=0.18.1`
24+
- `timm`
25+
- `segment-anything`
26+
- `sam-2`
2227
- `opencv-python`
2328
- `scikit-learn`
2429
- `scikit-image`
@@ -28,12 +33,8 @@ You need to install `sam-2` which can be installed easily using mamba (or conda)
2833
- `qtpy`
2934
- `napari`
3035
- `h5py`
31-
- `pytorch=2.3.1`
32-
- `torchvision=0.18.1`
33-
- `timm=1.0.9`
3436
- `pynrrd`
35-
- `segment-anything`
36-
- `sam-2`
37+
- `pooch`
3738

3839
## Installing Only The Plugin
3940
If you use the provided conda environment yaml files, the plugin will be installed automatically. But in case you already have the environment setup,
@@ -56,4 +57,4 @@ If you want to install the plugin manually using GPU, please follow the pytorch
5657

5758

5859
[conda]: https://conda.io/projects/conda/en/latest/index.html
59-
[mamba]: https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html
60+
[mamba]: https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html

env_cpu.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
name: featureforest
22
channels:
3-
- pytorch
43
- conda-forge
5-
- defaults
4+
- nodefaults
65
dependencies:
76
- python=3.10
8-
- pyqt=5.15.10
9-
- qtpy
10-
- magicgui
7+
- numpy<2.2
118
- scikit-learn
129
- scikit-image
1310
- scipy
11+
- opencv
12+
- pyqt
13+
- qtpy
1414
- napari
15-
- napari-console
16-
- napari-plugin-engine
17-
- napari-svg
1815
- h5py
19-
- pytorch=2.3.1
20-
- torchvision=0.18.1
16+
- pytorch-cpu>=2.5.1
17+
- torchvision>=0.20.1
18+
- segment-anything
2119
- sam-2
2220
- pooch
2321
- pip
2422
- pip:
25-
- numpy==1.24.4 # timm drops deprecation warnings with newer versions
2623
- matplotlib
27-
- opencv-python
28-
- timm==1.0.9
24+
- timm
2925
- pynrrd
3026
- iopath>=0.1.10
31-
- git+https://github.com/facebookresearch/segment-anything.git
32-
- git+https://github.com/juglab/featureforest.git
27+
- tqdm>=4.66.1
28+
- git+https://github.com/juglab/featureforest.git@ms/update/setup

env_gpu.yml

100644100755
Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
name: featureforest
22
channels:
3-
- pytorch
4-
- nvidia
53
- conda-forge
6-
- defaults
4+
- nodefaults
75
dependencies:
86
- python=3.10
9-
- pyqt=5.15.10
10-
- qtpy
11-
- magicgui
7+
- numpy<2.2
128
- scikit-learn
139
- scikit-image
1410
- scipy
11+
- opencv
12+
- pyqt
13+
- qtpy
1514
- napari
16-
- napari-console
17-
- napari-plugin-engine
18-
- napari-svg
1915
- h5py
20-
- pytorch-cuda
21-
- pytorch=2.3.1
22-
- torchvision=0.18.1
16+
- cuda-version>=11.8
17+
- pytorch-gpu>=2.5.1
18+
- torchvision>=0.20.1
19+
- segment-anything
2320
- sam-2
2421
- pooch
2522
- pip
2623
- pip:
27-
- numpy==1.24.4 # timm drops deprecation warnings with newer versions
2824
- matplotlib
29-
- opencv-python
30-
- timm==1.0.9
25+
- timm
3126
- pynrrd
3227
- iopath>=0.1.10
33-
- git+https://github.com/facebookresearch/segment-anything.git
28+
- tqdm>=4.66.1
3429
- git+https://github.com/juglab/featureforest.git

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,20 @@ classifiers = [
4343
"Topic :: Scientific/Engineering :: Image Processing",
4444
]
4545
dependencies = [
46-
"numpy==1.24.4",
46+
"numpy<2.2",
4747
"opencv-python",
4848
"scikit-learn",
4949
"scikit-image",
5050
"matplotlib",
5151
"pynrrd",
52-
"magicgui",
53-
"qtpy",
5452
"napari",
53+
"qtpy",
5554
"h5py",
5655
"pooch",
5756
"iopath>=0.1.10",
58-
"torch==2.3.1",
59-
"torchvision==0.18.1",
60-
"timm==1.0.9",
61-
"segment-anything-py",
62-
# "sam-2 @ git+https://github.com/facebookresearch/sam2.git"
57+
"torch>=2.5.1",
58+
"torchvision>=0.20.1",
59+
"timm",
6360
]
6461
[project.optional-dependencies]
6562
# development dependencies and tooling
@@ -72,6 +69,7 @@ dev = [
7269
"sybil", # doctesting
7370
]
7471
all = ["napari[all]"]
72+
7573
[project.urls]
7674
homepage = "https://featureforest.github.io/"
7775
repository = "https://github.com/juglab/featureforest"

0 commit comments

Comments
 (0)