Skip to content

Commit 97a3b3a

Browse files
Fix install failures on Colab and x86_64 macOS by relaxing dependency pins
Dependency floors were set to the newest available release rather than the oldest working one, which forced hosted notebooks to replace preinstalled binary packages. On Colab this swapped numpy 2.1.3 -> 2.4.6 under a live kernel, leaving numpy's Python sources newer than the already-imported compiled extension, so `import fimserve` died with: AttributeError: module 'numpy._core._multiarray_umath' has no attribute '_blas_supports_fpe' The hard `numba==0.66.0` pin also dragged in llvmlite 0.48, which ships no macOS x86_64 wheel and so fell back to a source build requiring CMake. - Lower floors to the oldest versions that actually work, so resolvers keep what the environment already has instead of churning 100+ packages. - Drop dependencies never imported by the package: numba, scikit-learn, bottleneck, utils. numba now comes transitively via teehr (>=0.60,<1), which lets it resolve to a version with wheels for the target platform. - Move jupyter, notebook, ipykernel and localtileserver to a `notebook` extra. Installing these replaced Colab's running kernel. - Widen requires-python to <3.14 to match teehr; Colab runs 3.13, which the previous <3.13 bound excluded. Verified on a Python 3.13 environment seeded with Colab's package versions: numpy, numba, llvmlite, pyarrow, matplotlib and ipykernel are all left untouched and `import fimserve` succeeds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent c494d03 commit 97a3b3a

1 file changed

Lines changed: 28 additions & 28 deletions

File tree

pyproject.toml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fimserve"
3-
version = "0.2.11"
3+
version = "0.2.12"
44
description = "Framework which is developed with the purpose of quickly generating Flood Inundation Maps (FIM) for emergency response and risk assessment. It is developed under Surface Dynamics Modeling Lab (SDML)."
55
authors = [
66
{ name = "Surface Dynamics Modeling Lab (SDML)" },
@@ -9,43 +9,43 @@ authors = [
99
maintainers = [{ name = "Supath Dhital", email = "sdhital@crimson.ua.edu" }]
1010
license = { text = "GPL-3.0" }
1111
readme = "README.md"
12-
requires-python = ">=3.10,<3.13"
12+
# Upper bound tracks teehr, which supports <3.14. Colab runs 3.13.
13+
requires-python = ">=3.10,<3.14"
14+
# Floors are the oldest release that actually works, not the newest available.
15+
# Raising them forces hosted notebooks (Colab) to swap out preinstalled binary
16+
# packages, which breaks the already-imported numpy/pyarrow ABI in a live kernel.
1317
dependencies = [
1418
"teehr==0.6.6",
15-
# geemap >=0.38 and matplotlib >=3.11 require Python >=3.11; the floors below
16-
# stay at the newest release that still supports the 3.10 floor above.
1719
"geemap>=0.37.2",
1820
# pyarrow <21 and netcdf4 ==1.7.2 are imposed by teehr.
19-
"pyarrow>=20.0.0,<21",
20-
# numba <0.67 caps numpy at <2.5; 2.2.6 is the newest numpy supporting 3.10.
21-
"numpy>=2.2.6",
21+
"pyarrow>=15,<21",
2222
"netcdf4>=1.7.2",
23-
"fiona>=1.10.1",
24-
"utils>=1.0.2",
25-
"matplotlib>=3.10.9",
26-
"awscli>=1.46.0",
27-
"boto3>=1.41.5",
28-
"numba==0.66.0",
29-
"bottleneck>=1.6.0",
30-
"localtileserver>=1.0.0",
31-
"tqdm>=4.70.0",
32-
"scipy>=1.15.3",
33-
"aiohttp>=3.14.3",
34-
"scikit-learn>=1.7.2",
35-
"tabulate>=0.10.0",
36-
"nodejs-bin>=18.4.0a4",
37-
"ipykernel>=7.3.0",
38-
"beautifulsoup4>=4.15.0",
39-
"python-dotenv>=1.2.2",
40-
"jupyter>=1.1.1",
41-
"notebook>=7.6.1",
23+
"numpy>=2.1",
24+
"scipy>=1.11",
25+
"geopandas>=1.0.1",
4226
"geocube<=0.7.1",
43-
"geopandas>=1.1.4",
27+
"fiona>=1.10.1",
28+
"matplotlib>=3.7",
29+
"awscli>=1.32",
30+
"boto3>=1.34",
31+
"aiohttp>=3.9",
32+
"beautifulsoup4>=4.12",
33+
"tabulate>=0.9",
34+
"tqdm>=4.66",
35+
"python-dotenv>=1.0",
4436
"fimeval>=0.1.65",
45-
"setuptools>=84.0.0",
4637
]
4738

4839
[project.optional-dependencies]
40+
# Only for a local Jupyter setup. Never install these on Colab/Binder: replacing
41+
# ipykernel/notebook under a live kernel is what breaks `import fimserve` there.
42+
notebook = [
43+
"jupyter>=1.1.1",
44+
"notebook>=7.6.1",
45+
"ipykernel>=7.3.0",
46+
"localtileserver>=1.0.0",
47+
]
48+
4949
dev = [
5050
"pytest>=9.1.1",
5151
# sphinx >=8 needs docutils >=0.20, but awscli 1.x pins docutils <=0.19.

0 commit comments

Comments
 (0)