File tree 3 files changed +12
-17
lines changed
3 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 35
35
import cellfinder.core
36
36
import cellfinder.napari
37
37
38
- - name : Uninstall tensorflow
39
- run : python -m pip uninstall -y tensorflow
38
+ - name : Uninstall keras
39
+ run : python -m pip uninstall -y keras
40
40
41
41
- name : Test (broken) import
42
42
id : broken_import
Original file line number Diff line number Diff line change 5
5
except PackageNotFoundError as e :
6
6
raise PackageNotFoundError ("cellfinder package not installed" ) from e
7
7
8
- # If tensorflow is not present, tools cannot be used.
8
+ # If Keras is not present with a backend , tools cannot be used.
9
9
# Throw an error in this case to prevent invocation of functions.
10
10
try :
11
- TF_VERSION = version ("tensorflow " )
11
+ KERAS_VERSION = version ("keras " )
12
12
except PackageNotFoundError as e :
13
- try :
14
- TF_VERSION = version ("tensorflow-macos" )
15
- except PackageNotFoundError as e :
16
- raise PackageNotFoundError (
17
- f"cellfinder tools cannot be invoked without tensorflow. "
18
- f"Please install tensorflow into your environment to use cellfinder tools. "
19
- f"For more information, please see "
20
- f"https://github.com/brainglobe/brainglobe-meta#readme."
21
- ) from e
13
+ raise PackageNotFoundError (
14
+ f"cellfinder tools cannot be invoked without Keras. "
15
+ f"Please install tensorflow into your environment to use cellfinder tools. "
16
+ f"For more information, please see "
17
+ f"https://github.com/brainglobe/brainglobe-meta#readme."
18
+ ) from e
22
19
23
20
__author__ = "Adam Tyson, Christian Niedworok, Charly Rousseau"
24
21
__license__ = "BSD-3-Clause"
Original file line number Diff line number Diff line change @@ -29,9 +29,8 @@ dependencies = [
29
29
" numpy" ,
30
30
" scikit-image" ,
31
31
" scikit-learn" ,
32
- # See https://github.com/brainglobe/cellfinder-core/issues/103 for < 2.12.0 pin
33
- " tensorflow-macos>=2.5.0,<2.12.0; platform_system=='Darwin' and platform_machine=='arm64'" ,
34
- " tensorflow>=2.5.0,<2.12.0; platform_system!='Darwin' or platform_machine!='arm64'" ,
32
+ " keras" ,
33
+ " tf-nightly==2.16.0.dev20240101" , # pinning to same TF as Keras 3.0
35
34
" tifffile" ,
36
35
" tqdm" ,
37
36
]
@@ -124,7 +123,6 @@ commands = python -m pytest -v --color=yes
124
123
deps =
125
124
pytest
126
125
pytest-cov
127
- pytest-lazy-fixture
128
126
pytest-mock
129
127
pytest-timeout
130
128
# Even though napari is a requirement for cellfinder.napari, we have to
You can’t perform that action at this time.
0 commit comments