# Core dependencies needed at runtime that that should install without much issue

### Specialized Versions
# These packages have different minimum versions for wheels between our original 3.8
# target and more recent python releases.
# Note: xdev availpkg is used to help autogenerate these requirements, e.g.
# pip install xdev
# xdev availpkg numpy

numpy>=2.1.0   ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
numpy>=1.26.0  ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
numpy>=1.23.2  ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
numpy>=1.23.2  ; python_version < '3.11' and python_version >= '3.10'  # Python 3.10

scipy>=1.14.1    ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
scipy>=1.11.2    ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
scipy>=1.9.2     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
scipy>=1.8.0     ; python_version < '3.11' and python_version >= '3.10'  # Python 3.10

shapely>=2.0.6     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
shapely>=2.0.2     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
shapely>=2.0.1 ; python_version < '3.12'  and python_version >= '3.11'  # Python 3.11+
shapely>=2.0.1 ; python_version < '3.11' and python_version >= '3.10'  # Python 3.10

rasterio>=1.3.11    ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
rasterio>=1.3.9     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12+
rasterio>=1.3.5     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
rasterio>=1.3.5     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

pandas>=2.2.3  ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
pandas>=2.1.1  ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
pandas>=1.5.3  ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
pandas>=1.5.3  ; python_version < '3.11' and python_version >= '3.10'  # Python 3.10

scikit-learn>=1.5.2     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
scikit-learn>=1.3.1     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
scikit-learn>=1.1.3     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
scikit-learn>=1.1.0     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

scikit-image>=0.25.1    ; python_version < '4.0'  and python_version >= '3.13'   # Python 3.13+
scikit-image>=0.22.0    ; python_version < '3.13' and python_version >= '3.12'   # Python 3.12
scikit-image>=0.20.0    ; python_version < '3.12' and python_version >= '3.11'   # Python 3.11
scikit-image>=0.19.0    ; python_version < '3.11' and python_version >= '3.10'   # Python 3.10

jq>=1.8.0     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
jq>=1.7.0     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
jq>=1.2.2     ; python_version < '3.11' and python_version >= '3.10' and platform_system!="Windows"    # Python 3.10

jsonschema>=4.19.2

# Pinned due to CRS issue. Unsure if this is necessary. Need to check dashboards.
# TODO: try and fix and unpin pyproj 
pyproj>=3.7.0        ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
pyproj>=3.6.1        ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
pyproj>=3.4.1,<3.5.0 ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11+
pyproj>=3.3.1,<3.5.0 ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

# Need to update to 1.9.5
fiona>=1.10.0         ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
fiona>=1.9.5          ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
fiona>=1.8.22,<1.9.0  ; python_version < '3.12'  and python_version >= '3.11'   # Python 3.11
fiona>=1.8.22,<1.9.0  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

matplotlib>=3.9.2  ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
matplotlib>=3.8.2  ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
matplotlib>=3.8.2  ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
matplotlib>=3.8.2  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

Pillow>=11.3.0 ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13
Pillow>=10.2.0 ; python_version < '3.13'  

psutil>=5.9.6     ; python_version < '4.0'  and python_version >= '3.12'    # Python 3.12+
psutil>=5.9.6     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
psutil>=5.9.6     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

rtree>=1.2.0  ;                             python_version >= '3.11'    # Python 3.11+
rtree>=1.0.0  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

sqlalchemy>=1.4.50  ;                             python_version >= '3.11'    # Python 3.11+
sqlalchemy>=1.4.37  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

xxhash>=3.4.1     ; python_version < '4.0'  and python_version >= '3.12'    # Python 3.12+
xxhash>=3.4.1     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
xxhash>=3.0.0     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

# xdev availpkg numexpr
numexpr>=2.10.2    ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
numexpr>=2.8.7     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
numexpr>=2.8.4     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
numexpr>=2.8.1     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

# xdev availpkg mgrs
mgrs>=1.4.6     ; python_version < '4.0'  and python_version >= '3.12'    # Python 3.12+
mgrs>=1.4.6     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
mgrs>=1.4.3     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

# Numeric
kwarray>=0.6.19
xarray>=2023.10.0
#filterpy>=1.4.5

einops>=0.8.0     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
einops>=0.6.0     ; python_version < '3.13'
# dask[array]>=2023.8.1

dask[array]>=2025.2.0    ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
dask[array]>=2023.5.0    ; python_version < '3.13' 

# Dask related
# cytoolz>=0.11.2
# xxhash>=3.0.0
# cityhash>=0.4.1

### Note: this relies on pygeos which is deprecated.
## dask-geopandas>=0.2.0

# Utilities
rich>=12.5.1
textual>=0.1.18
text_unidecode>=1.3
configargparse>=1.7.1
parse>=1.19.0
affine>=2.3.0
ubelt>=1.3.6
xmltodict>=0.12.0
Pygments>=2.12.0
requests>=2.27.1
fasteners>=0.17.3
kwutil>=0.3.4
simple_dvc>=0.2.1

blake3>=1.0.1  ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
blake3>=1.0.1  ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
blake3>=0.3.1  ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
blake3>=0.2.1  ; python_version < '3.11' # Python 3.10- 

more_itertools>=8.12.0
 
pint>=0.24.4  ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
pint>=0.23    ; python_version < '3.13' 

girder_client>=3.1.15

lxml>=5.3.0     ; python_version < '4.0'  and python_version >= '3.11'    # Python 3.11+
lxml>=4.6.3     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

tempenv>=0.2.0
pystac_client>=0.5.1
scriptconfig>=0.8.2

pygtrie>=2.5.0    

# protobuf>=3.15.8
networkx>=3.0.0   ; python_version < '4.0' and python_version >= '3.13'    # Python 3.12
networkx>=2.8.0   ; python_version < '3.12' 

python_dateutil>=2.8.2
pytimeparse>=1.1.8
progiter>=2.0.0
fire>=0.4.0

# Parsing
lark >= 1.1.7
lark_cython >= 0.0.16

# Imaging
distinctipy>=1.2.1
kwimage>=0.11.2
kwcoco>=0.8.5
kwcoco_dataloader>=0.1.1
delayed_image>=0.4.5

# Try 1.3.1?
albumentations==1.0.0  # pinned for invariants model

ndsampler>=0.8.0

tifffile>=2022.8.12 ; python_version < '4.0' and python_version >= '3.13'    # Python 3.12
tifffile>=2021.4.8  ; python_version < '3.12' 

# Plotting
kwplot>=0.4.14
seaborn>=0.13.0

# GIS
# Note: kwgis contains tools that have historically lived in geowatch 
# We are gradually transitioning this codebase to use those instead of
# internal variants to maintain a more modular software stack. 
kwgis>=0.1.1

# TODO: we need to unpin geopandas at some point
geopandas>=0.14.4,<1.0.0  ; python_version < '4.0'  and python_version >= '3.13'   # Python 3.13
geopandas>=0.10.2,<1.0.0  ; python_version < '3.12' and python_version >= '3.8'   

utm>=0.7.0
rgd_imagery_client>=0.2.7
rgd_client>=0.2.7
geojson>=3.1.0     ; python_version < '4.0'  and python_version >= '3.12'   # Python 3.12+
geojson>=3.0.1     ; python_version < '3.12' and python_version >= '3.8'    # Python 3.11-

# Machine learning

# Note: torch 1.10 does not run latest models
torch>=2.6.0     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
torch>=2.2.0     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
torch>=2.0.0     ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11+
torch>=1.12.0       ; python_version < '3.11'                               # Python 3.10-

# TODO: support 1.13.1 

torchvision>=0.21.0 ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
torchvision>=0.17.0 ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
torchvision>=0.15.1 ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
torchvision>=0.13.0 ; python_version < '3.11'                               # Python 3.10-


torchmetrics>=0.11.0
torch_liberator>=0.2.1

omegaconf >=2.3
hydra-core >=1.3.2

# FIXME: pinned because update broke our aliases
# But we have seem to have a fix for jsonargparse 4.30.0
jsonargparse[signatures]>=4.19.0
pytorch_lightning>=2.0.8,!=2.3.*,!=2.4.0
#pytorch_lightning>=2.0.8
#jsonargparse[signatures]>=4.24.1

monai>=1.3.2     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13
monai>=0.8.0     ; python_version < '3.13'  and python_version >= '3.11'   # Python 3.11
monai>=0.6.0     ; python_version < '3.11' 

torch_optimizer>=0.1.0

# TODO: modernize timm?
# What is causing us to pin timm?
#timm>=0.6.13 ; python_version < '4.0'  and python_version >= '3.11'  # Python 3.11+
timm>=0.6.13,<0.9.0 ; python_version < '4.0'  and python_version >= '3.11'  # Python 3.11+
timm>=0.4.12,<0.9.0 ; python_version < '3.11'                               # Python 3.10-

# Do we need to pin this?
kornia>=0.6.8
segmentation-models-pytorch>=0.2.0  ; python_version < '3.11'

ujson>=5.6.0 ; python_version < '4.0'  and python_version >= '3.11'  # Python 3.11+
ujson>=5.2.0 ; python_version < '3.11'                               # Python 3.10-

kwimage_ext >= 0.2.1; platform_system=="Linux" and python_version < '3.12'    

py-cpuinfo>=9.0.0     


ruamel.yaml>=0.17.22,<=0.17.32

ijson>=3.2.1 ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
ijson>=3.2.1 ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
ijson>=3.2.1 ; python_version < '3.12' and python_version >= '3.11'    # Python 3.11
ijson>=3.2.1 ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10

lazy_loader>=0.4

colormath>=3.0.0

imagesize>=1.4.1
pytorch_msssim==0.1.5

absl_py>=1.4.0

PyYaml>=6.0.2     ; python_version < '4.0'  and python_version >= '3.13'    # Python 3.13+
PyYaml>=6.0.1     ; python_version < '3.13' and python_version >= '3.12'    # Python 3.12
PyYaml>=6.0       ; python_version < '3.12'                                 # Python 3.11-
tqdm>=4.64.1

cmd_queue >= 0.1.20

# NOTE: It is difficult to pin a minimum version of fsspec because of its
# interactions with other libraries.
fsspec>=2023.6.0
s3fs>=2023.6.0

portion>=2.4.1

transformers>=4.37.2
