# 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.

# For a helper, Jon's local repo contains a script to try and automatically
# figure out the correct pins for each version. Not ready for prime time yet
# though. May be integrated into xdev in the future.
# https://github.com/Erotemic/local/blob/main/tools/supported_python_versions_pip.py

numpy>=1.23.2    ;                             python_version >= '3.11'    # Python 3.11+
numpy>=1.21.6    ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
numpy>=1.19.3    ; python_version < '3.10'    # Python 3.8-3.9

scipy>=1.9.2     ;                             python_version >= '3.11'    # Python 3.11+
scipy>=1.8.1     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
scipy>=1.8.0     ; python_version < '3.10'    # Python 3.8-3.9

shapely>=2.0.0   ;                             python_version >= '3.11'    # Python 3.11+
shapely>=2.0.0   ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
shapely>=2.0.0   ; python_version < '3.10'    # Python 3.8-3.9

rasterio>=1.3.4     ;                             python_version >= '3.11'    # Python 3.11+
rasterio>=1.3.4     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
rasterio>=1.3.4    ; python_version < '3.10'    # Python 3.8-3.9

pandas>=1.5.0,<2.0.0 ;                             python_version >= '3.11'    # Python 3.11+
pandas>=1.4.2,<2.0.0 ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
pandas>=1.4.2,<2.0.0 ; python_version < '3.10'    # Python 3.8-3.9

scikit_learn>=1.1.3     ;                             python_version >= '3.11'    # Python 3.11+
scikit_learn>=1.1.1     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
scikit_learn>=1.1.0     ; python_version < '3.10'    # Python 3.8-3.9

scikit_image>=0.20.0  ;  python_version < '4.0'  and python_version >= '3.11'    # Python 3.11+
scikit_image>=0.19.3  ;  python_version < '3.11' and python_version >= '3.10'    # Python 3.10
scikit_image>=0.18.1  ;  python_version <  '3.10'    # Python 3.8-3.9

jq>=1.3.0     ;                             python_version >= '3.11' and platform_system!="Windows"    # Python 3.11+
jq>=1.2.2     ; python_version < '3.11' and python_version >= '3.10' and platform_system!="Windows"    # Python 3.10
jq>=1.2.1     ; python_version < '3.10' and platform_system!="Windows"    # Python 3.8-3.9

# Pinned due to CRS issue. Unsure if this is necessary. Need to check dashboards.
# TODO: try and fix and unpin pyproj 
pyproj>=3.4.1,<3.5.0 ;                             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
pyproj>=3.2.1,<3.5.0 ;  python_version <  '3.10'    # Python 3.8-3.9

fiona>=1.8.22,<1.9.0  ;                             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
fiona>=1.8.22,<1.9.0  ;  python_version <  '3.10'    # Python 3.8-3.9

matplotlib>=3.5.2  ;                             python_version >= '3.11'    # Python 3.11+
matplotlib>=3.5.2  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
matplotlib>=3.4.1  ; python_version <  '3.10'    # Python 3.8-3.9

Pillow>=9.2.0     ;                             python_version >= '3.11'    # Python 3.11+
Pillow>=9.1.1     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
Pillow>=8.0.1     ; python_version <  '3.10'    # Python 3.8-3.9

psutil>=5.9.1     ;                             python_version >= '3.11'    # Python 3.11+
psutil>=5.9.1     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
psutil>=5.8.0     ; python_version <  '3.10'    # Python 3.8-3.9

rtree>=1.0.1  ;                             python_version >= '3.11'    # Python 3.11+
rtree>=1.0.0  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
rtree>=0.9.7  ; python_version <  '3.10'    # Python 3.8-3.9

sqlalchemy>=1.4.41  ;                             python_version >= '3.11'    # Python 3.11+
sqlalchemy>=1.4.37  ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
sqlalchemy>=1.3.22  ; python_version <  '3.10'    # Python 3.8-3.9

xxhash>=3.0.0     ; python_version < '4.0'  and python_version >= '3.11'    # Python 3.11+
xxhash>=3.0.0     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
xxhash>=3.0.0     ; python_version < '3.10' and python_version >= '3.9'     # Python 3.9
xxhash>=1.4.4     ; python_version <= '3.8'    # Python 3.8

# xdev availpkg numexpr
numexpr>=2.8.4     ; python_version < '4.0'  and python_version >= '3.11'    # Python 3.11+
numexpr>=2.8.1     ; python_version < '3.11' and python_version >= '3.10'    # Python 3.10
numexpr>=2.7.3     ; python_version < '3.10' and python_version >= '3.9'    # Python 3.9
numexpr>=2.7.3     ; python_version < '3.9'  and python_version >= '3.8'    # Python 3.8

# xdev availpkg mgrs
mgrs>=1.4.3     ; python_version < '4.0'  and python_version >= '3.10'    # Python 3.10+
mgrs>=1.4.3     ; python_version < '3.10' and python_version >= '3.9'     # Python 3.9
mgrs>=1.4.3     ; python_version < '3.10' and python_version >= '3.9'    # Python 3.9
mgrs>=1.3.7     ; python_version < '3.9'  and python_version >= '3.8'    # Python 3.8

# Numeric
kwarray>=0.6.12
xarray>=0.17.0
filterpy>=1.4.5
einops>=0.6.0
dask[array]>=2022.10.2

# 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

# Pygeos is deprecated and merged into shapley 2.0
# # Waiting for 3.11 support
# pygeos>=0.13    ;  python_version < '3.11' and python_version >= '3.10'    # Python 3.10+ 
# pygeos>=0.10.2  ;  python_version <  '3.10'    # Python 3.8-3.9

# Utilities
rich>=12.3.0
textual>=0.1.18
text_unidecode>=1.3
configargparse>=1.5.1
parse>=1.19.0
affine>=2.3.0
ubelt>=1.2.4
xmltodict>=0.12.0
Pygments>=2.6.0
requests>=2.27.1
fasteners>=0.16.3

blake3>=0.3.1  ;  python_version < '4' 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.17
retry>=0.9.2


girder_client>=3.1.15

lxml>=4.9.2     ; 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
lxml>=4.5.2     ; python_version < '3.10' and python_version >= '3.9'     # Python 3.9
lxml>=4.4.1     ; python_version < '3.9'  and python_version >= '3.8'     # Python 3.8
lxml>=4.2.4     ; python_version < '3.8'  and python_version >= '3.7'     # Python 3.7

tempenv>=0.2.0
pystac_client>=0.5.1
scriptconfig>=0.7.8
pygtrie>=2.3.3
# protobuf>=3.15.8
networkx>=2.8.0
python_dateutil>=2.8.2
pytimeparse>=1.1.8
progiter>=1.1.0
fire>=0.4.0

# Parsing
lark >= 1.1.2
lark_cython >= 0.0.12

# Imaging
distinctipy>=1.2.1
kwimage>=0.9.18
kwcoco>=0.6.2
delayed_image>=0.2.7
albumentations==1.0.0  # pinned for invariants model
ndsampler>=0.7.3
tifffile>=2021.4.8

# Includes SimpleITK. Used in depth predictor.
medpy>=0.4.0 

# Plotting
kwplot>=0.4.14
seaborn>=0.11.1

# GIS
geopandas>=0.10.2
utm>=0.7.0
rgd_imagery_client>=0.2.7
rgd_client>=0.2.7
geojson>=2.5.0

# Machine learning

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

torchvision>=0.15.1 ; python_version < '4.0'  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

#pytorch_lightning[extra]>=1.8.6,<2.0.0
#pytorch_lightning[extra]>=1.8.6
pytorch_lightning>=1.8.6

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

torch_optimizer>=0.1.0
netharn>=0.6.1

timm>=0.6.13 ; python_version < '4.0'  and python_version >= '3.11'  # Python 3.11+
timm>=0.4.12 ; python_version < '3.11'                               # Python 3.10-

# Do we need to pin this?
kornia<=0.5
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"

py-cpuinfo>=8.0.0

jsonargparse[signatures]>=4.19.0


ruamel.yaml>=0.17.21

ijson>=3.1.4

lazy_loader>=0.1

colormath>=3.0.0

imagesize>=1.4.1
pytorch_msssim==0.1.5

absl_py>=1.4.0
PyYAML>=6.0
tqdm>=4.64.1

cmd_queue >= 0.1.12
