Skip to content

Commit b2d7c3a

Browse files
committed
replace remaining pooch use with lighter platformdirs
1 parent bc91d8a commit b2d7c3a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bioimageio/spec/_internal/_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pathlib import Path
44
from typing import Optional, Union
55

6-
import pooch # pyright: ignore [reportMissingTypeStubs]
6+
import platformdirs
77
from genericache import DiskCache
88
from genericache.digest import UrlDigest
99
from pydantic import Field, field_validator
@@ -25,7 +25,7 @@ class Settings(
2525
allow_pickle: bool = False
2626
"""Sets the `allow_pickle` argument for `numpy.load()`"""
2727

28-
cache_path: Path = pooch.os_cache("bioimageio")
28+
cache_path: Path = Path(platformdirs.user_cache_dir("bioimageio"))
2929
"""bioimageio cache location"""
3030

3131
@field_validator("cache_path", mode="after")

dev/env.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- numpy[version='>=1.21']
1616
- packaging[version='>=17.0']
1717
- pip
18-
- pooch
18+
- platformdirs
1919
- pre-commit
2020
- psutil
2121
- pydantic-settings

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ requires-python = ">=3.8"
66
dependencies = [
77
"annotated-types>=0.5.0,<1",
88
"email_validator",
9+
"exceptiongroup", # TODO: remove when py3.11 is lowest supported version
910
"genericache==0.5.2",
11+
"httpx",
1012
"imageio",
1113
"loguru",
1214
"markdown",
1315
"numpy>=1.21",
1416
"packaging>=17.0",
15-
"pooch>=1.5,<2",
17+
"platformdirs",
1618
"pydantic-settings>=2.5,<3",
1719
"pydantic>=2.10.3,<2.12",
1820
"python-dateutil",
19-
"httpx",
2021
"rich",
2122
"ruyaml",
2223
"tifffile>=2020.7.4",
2324
"tqdm",
2425
"typing-extensions",
25-
"exceptiongroup", # TODO: remove when py3.11 is lowest supported version
2626
"zipp",
2727
]
2828
classifiers = [

0 commit comments

Comments
 (0)