# DINO-4DSTEM Python dependencies  (Python 3.10)
# Versions pinned to the validated reference environment.
#
# Installed for you by install.bat (into a conda env), or manually with:
#     pip install -r requirements.txt
#
# ---------------------------------------------------------------------------

# --- core scientific stack ---
numpy==1.26.4
scipy==1.15.3
# py4DSTEM 0.14.18 requires scikit-learn<1.5, so 1.7 cannot be installed
# alongside it (the dev machine has py4DSTEM 0.14.19, which lifted that cap).
scikit-learn==1.4.2
scikit-image==0.25.2
pandas==2.3.0
matplotlib==3.10.3
h5py==3.14.0
hdf5plugin==5.1.0
pillow==11.2.1
# NOTE: opencv-python 4.12.x requires numpy>=2, which conflicts with the
# numpy 1.26.4 pin above (the dev machine has 4.12 + numpy 1.26 only because
# they were installed at different times and pip never re-resolved).
# 4.11.0.86 is the newest opencv that works with numpy 1.x.
opencv-python==4.11.0.86
tqdm==4.67.1
psutil==7.0.0
requests==2.32.4

# --- clustering / embedding ---
# 0.5.9 needs scikit-learn>=1.6, which clashes with the <1.5 cap above.
umap-learn==0.5.7
hdbscan==0.8.40
colorcet==3.1.0

# --- deep learning ---
# PyPI torch is CPU-only on Windows.  The installers then run
# tools/setup_gpu_torch.py, which detects an NVIDIA GPU + driver and swaps in
# the matching CUDA build (cu128 / cu126 / cu118) of these same versions.
torch==2.7.1
torchvision==0.22.1

# --- 4D-STEM / microscopy ---
# NOTE: the reference dev machine has 0.14.19, but that build was never
# published to PyPI (0.14.18 is the newest there), so pip installs fail on
# ==0.14.19.  0.14.18 is the same 0.14 API and is what we install.
py4DSTEM==0.14.18
ase==3.28.0

# --- synthetic diffraction simulation (Synthetic tab) ---
# Needed for the Simulate feature; ships with ASE.  Pin the exact beta the
# tab was written against (its API changes between betas).
abtem==1.0.0b33

# --- GUI / reporting ---
customtkinter==5.2.2
python-pptx==1.0.2

# ---------------------------------------------------------------------------
# OPTIONAL extras (only needed for specific features; uncomment to enable):
#
# transformers==4.44.2          # "Pretrained DINO" panel
# segment-anything @ git+https://github.com/facebookresearch/segment-anything.git   # SAM masks
# cupy-cuda11x                  # GPU acceleration for ACOM (NVIDIA, CUDA 11.x)
# md-to-docx                    # Markdown -> .docx export helper
#
# The local NL assistant uses Ollama, which auto-installs on first use
# (no Python package required).

# --- tutorial notebooks (installed up front, not on first launch) ---
notebook>=7,<8
ipywidgets>=8,<9
ipympl>=0.9,<0.10
