## Windows ----

.scvelo.dependencies.Windows <- list(
  packages = c(
    'anndata==0.11.4',
    'array-api-compat==1.12.0',
    'click==8.2.1',
    'colorama==0.4.6',
    'contourpy==1.3.2',
    'cycler==0.12.1',
    'fonttools==4.58.5',
    'h5py==3.14.0',
    'joblib==1.5.1',
    'kiwisolver==1.4.8',
    'legacy-api-wrap==1.4.1',
    'llvmlite==0.44.0',
    'loompy==3.0.8',
    'matplotlib==3.10.3',
    'natsort==8.4.0',
    'networkx==3.5',
    'numba==0.61.2',
    'numpy==2.2.6',
    'numpy-groupies==0.11.3',
    'packaging==25.0',
    'pandas==2.3.1',
    'patsy==1.0.1',
    'pillow==11.3.0',
    'pip==25.1.1',
    'pynndescent==0.5.13',
    'pyparsing==3.2.3',
    'python-dateutil==2.9.0.post0',
    'pytz==2025.2',
    'scanpy==1.11.3',
    'scikit-learn==1.7.0',
    'scipy==1.15.3',
    'scvelo==0.3.3',
    'seaborn==0.13.2',
    'session-info2==0.1.2',
    'setuptools==80.9.0',
    'six==1.17.0',
    'statsmodels==0.14.5',
    'threadpoolctl==3.6.0',
    'tqdm==4.67.1',
    'typing_extensions==4.14.1',
    'tzdata==2025.2',
    'umap-learn==0.5.9.post2',
    'wheel==0.45.1'
  )
)

## LinuxAarch64 ----

.scvelo.dependencies.LinuxAarch64 <- list(
  packages = c(
    'anndata==0.11.4',
    'array-api-compat==1.12.0',
    'click==8.2.1',
    'contourpy==1.3.2',
    'cycler==0.12.1',
    'fonttools==4.58.5',
    'h5py==3.14.0',
    'joblib==1.5.1',
    'kiwisolver==1.4.8',
    'legacy-api-wrap==1.4.1',
    'llvmlite==0.44.0',
    'loompy==3.0.8',
    'matplotlib==3.10.3',
    'natsort==8.4.0',
    'networkx==3.5',
    'numba==0.61.2',
    'numpy==2.2.6',
    'numpy-groupies==0.11.3',
    'packaging==25.0',
    'pandas==2.3.1',
    'patsy==1.0.1',
    'pillow==11.3.0',
    'pip==25.1.1',
    'pynndescent==0.5.13',
    'pyparsing==3.2.3',
    'python-dateutil==2.9.0.post0',
    'pytz==2025.2',
    'scanpy==1.11.3',
    'scikit-learn==1.7.0',
    'scipy==1.15.3',
    'scvelo==0.3.3',
    'seaborn==0.13.2',
    'session-info2==0.1.2',
    'setuptools==80.9.0',
    'six==1.17.0',
    'statsmodels==0.14.5',
    'threadpoolctl==3.6.0',
    'tqdm==4.67.1',
    'typing_extensions==4.14.1',
    'tzdata==2025.2',
    'umap-learn==0.5.9.post2',
    'wheel==0.45.1'
  )
)

## Linux ----

.scvelo.dependencies.Linux <- list(
  packages = c(
    'anndata==0.11.4',
    'array-api-compat==1.12.0',
    'click==8.2.1',
    'contourpy==1.3.2',
    'cycler==0.12.1',
    'fonttools==4.58.5',
    'h5py==3.14.0',
    'joblib==1.5.1',
    'kiwisolver==1.4.8',
    'legacy-api-wrap==1.4.1',
    'llvmlite==0.44.0',
    'loompy==3.0.8',
    'matplotlib==3.10.3',
    'natsort==8.4.0',
    'networkx==3.5',
    'numba==0.61.2',
    'numpy==2.2.6',
    'numpy-groupies==0.11.3',
    'packaging==25.0',
    'pandas==2.3.1',
    'patsy==1.0.1',
    'pillow==11.3.0',
    'pip==25.1.1',
    'pynndescent==0.5.13',
    'pyparsing==3.2.3',
    'python-dateutil==2.9.0.post0',
    'pytz==2025.2',
    'scanpy==1.11.3',
    'scikit-learn==1.7.0',
    'scipy==1.15.3',
    'scvelo==0.3.3',
    'seaborn==0.13.2',
    'session-info2==0.1.2',
    'setuptools==80.9.0',
    'six==1.17.0',
    'statsmodels==0.14.5',
    'threadpoolctl==3.6.0',
    'tqdm==4.67.1',
    'typing_extensions==4.14.1',
    'tzdata==2025.2',
    'umap-learn==0.5.9.post2',
    'wheel==0.45.1'
  )
)

## MacOSXArm ----

.scvelo.dependencies.MacOSXArm <- list(
  packages = c(
    'anndata==0.11.4',
    'array-api-compat==1.14.0',
    'asciitree==0.3.3',
    'asttokens==3.0.1',
    'certifi==2026.2.25',
    'click==8.3.2',
    'comm==0.2.3',
    'contourpy==1.3.3',
    'cycler==0.12.1',
    'decorator==5.2.1',
    'Deprecated==1.3.1',
    'donfig==0.8.1.post1',
    'executing==2.2.1',
    'fast-array-utils==1.4.1',
    'fasteners==0.20',
    'fonttools==4.62.1',
    'google-crc32c==1.8.0',
    'h5py==3.16.0',
    'ipython==9.12.0',
    'ipython_pygments_lexers==1.1.1',
    'ipywidgets==8.1.8',
    'jedi==0.19.2',
    'joblib==1.5.3',
    'jupyterlab_widgets==3.0.16',
    'kiwisolver==1.5.0',
    'legacy-api-wrap==1.5',
    'llvmlite==0.47.0',
    'loompy==3.0.8',
    'matplotlib==3.10.8',
    'matplotlib-inline==0.2.1',
    'natsort==8.4.0',
    'networkx==3.6.1',
    'numba==0.65.0',
    'numcodecs==0.15.1',
    'numpy==2.4.4',
    'numpy-groupies==0.11.3',
    'packaging==26.1',
    'pandas==2.3.3',
    'parso==0.8.6',
    'patsy==1.0.2',
    'pexpect==4.9.0',
    'pillow==12.2.0',
    'pip==26.0.1',
    'prompt_toolkit==3.0.52',
    'ptyprocess==0.7.0',
    'pure_eval==0.2.3',
    'Pygments==2.20.0',
    'pynndescent==0.6.0',
    'pyparsing==3.3.2',
    'python-dateutil==2.9.0.post0',
    'pytz==2026.1.post1',
    'PyYAML==6.0.3',
    'scanpy==1.12.1',
    'scikit-learn==1.8.0',
    'scipy==1.15.2',
    'scvelo==0.3.3',
    'seaborn==0.13.2',
    'session-info2==0.4.1',
    'setuptools==82.0.1',
    'six==1.17.0',
    'stack-data==0.6.3',
    'statsmodels==0.14.6',
    'threadpoolctl==3.6.0',
    'tqdm==4.67.3',
    'traitlets==5.14.3',
    'typing_extensions==4.15.0',
    'tzdata==2026.1',
    'umap-learn==0.5.12',
    'wcwidth==0.6.0',
    'widgetsnbextension==4.0.15',
    'wrapt==2.1.2',
    'zarr==2.18.7'
  )
)

## MacOSX ----

.scvelo.dependencies.MacOSX <- list(
  packages = c(
    'anndata==0.11.4',
    'array-api-compat==1.12.0',
    'click==8.2.1',
    'contourpy==1.3.2',
    'cycler==0.12.1',
    'fonttools==4.58.5',
    'h5py==3.14.0',
    'joblib==1.5.1',
    'kiwisolver==1.4.8',
    'legacy-api-wrap==1.4.1',
    'llvmlite==0.44.0',
    'loompy==3.0.8',
    'matplotlib==3.10.3',
    'natsort==8.4.0',
    'networkx==3.5',
    'numba==0.61.2',
    'numpy==2.2.6',
    'numpy-groupies==0.11.3',
    'packaging==25.0',
    'pandas==2.3.1',
    'patsy==1.0.1',
    'pillow==11.3.0',
    'pip==25.1.1',
    'pynndescent==0.5.13',
    'pyparsing==3.2.3',
    'python-dateutil==2.9.0.post0',
    'pytz==2025.2',
    'scanpy==1.11.3',
    'scikit-learn==1.7.0',
    'scipy==1.15.3',
    'scvelo==0.3.3',
    'seaborn==0.13.2',
    'session-info2==0.1.2',
    'setuptools==80.9.0',
    'six==1.17.0',
    'statsmodels==0.14.5',
    'threadpoolctl==3.6.0',
    'tqdm==4.67.1',
    'typing_extensions==4.14.1',
    'tzdata==2025.2',
    'umap-learn==0.5.9.post2',
    'wheel==0.45.1'
  )
)

# Switch environment ----

#' @importFrom basilisk isWindows
#' @importFrom basilisk isLinuxAarch64
#' @importFrom basilisk isLinux
#' @importFrom basilisk isMacOSXArm
#' @importFrom basilisk isMacOSX
if (basilisk::isWindows()) {
  .scvelo_dependencies <- .scvelo.dependencies.Windows
} else if (basilisk::isLinuxAarch64()) {
  .scvelo_dependencies <- .scvelo.dependencies.LinuxAarch64
} else if (basilisk::isLinux()) {
  .scvelo_dependencies <- .scvelo.dependencies.Linux
} else if (basilisk::isMacOSXArm()) {
  .scvelo_dependencies <- .scvelo.dependencies.MacOSXArm
} else if (basilisk::isMacOSX()) {
  .scvelo_dependencies <- .scvelo.dependencies.MacOSX
} else {
  stop("Unsupported operating system or architecture.\n  Please open an issue at <https://github.com/kevinrue/velociraptor/issues> to request support.")
}

#' @importFrom basilisk BasiliskEnvironment
#' @importFrom zellkonverter AnnDataDependencies
velo.env <- BasiliskEnvironment("env", "velociraptor", packages=.scvelo_dependencies$packages)
