[build-system]
requires = ["poetry-core", "setuptools", "wheel"]
build-backend = "poetry.core.masonry.api"

[tool.setuptools_scm]
write_to = "sciphi/_version.py"

[tool.poetry]
name = "sciphi"
version = "0.1.3"
description = "SciPhi: A Framework for LLM Powered Data."
authors = ["Owen Colegrove <owen@sciphi.ai>"]
license = "Apache-2.0"
readme = "README.md"

[tool.poetry.dependencies]
# python version
python = ">=3.9,<3.12"
# package dependencies
bs4 = "^0.0.1"
fire = "^0.5.0"
openai = { version = "0.27.8" }
pandas = "^2.1.0"
python-dotenv = "^1.0.0"
pyyaml = "^6.0.1"
retrying = "^1.3.4"
sentencepiece = "^0.1.99"
torch = "^2.1.0"
tiktoken = "^0.5.1"
tqdm = "^4.66.1"

# Begin optional dependencies

# anthropic
anthropic = { version = "^0.3.10", optional = true }
# hf
accelerate = { version = "^0.23.0", optional = true }
datasets = { version = "^2.14.5", optional = true }
transformers = { version = "^4.33.1", optional = true }
# llama-cpp 
llama-cpp-python = { version = "^0.2.11", optional = true }
# llama-index
llama-index = { version = "^0.8.29.post1", optional = true }
# vllm
# accelerate = { version = "^0.23.0", optional = true } ## Defined above in 'hf'
vllm = { version = "0.2.0", optional = true }

[tool.poetry.extras]
anthropic_support = ["anthropic"]
hf_support = ["accelerate", "datasets", "torch", "transformers"]
llama_cpp_support = ["llama-cpp-python"]
llama_index_support = ["llama-index"]
vllm_support = ["accelerate", "torch", "vllm"]

all = [
    # anthropic
    "anthropic",
    # hf
    "accelerate",
    "datasets",
    "torch",
    "transformers",
]
all_with_extras = [
    # all
    # anthropic
    "anthropic",
    # hf
    "accelerate",
    "datasets",
    "torch",
    "transformers",
    # More Extras
    "llama-index",
    "llama-cpp-python",
    "vllm",
]
# To export dependencies to pip, use:
# poetry export -f requirements.txt --with dev --without-hashes --output requirements-dev.txt
# poetry export -f requirements.txt --without-hashes --extras all --output requirements.txt
# poetry export -f requirements.txt --without-hashes --extras all_with_extras --output requirements_with_extras.txt

[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
flake8 = "6.1.0"
isort = "5.12.0"
pre-commit = "^3.3.3"
mypy = "^1.5.1"
sourcery = "^1.6.0"
types-requests = "^2.31.0.2"
types-attrs = "^19.1.0"
yapf = "0.40.1"

[tool.black]
line-length = 79

[tool.mypy]
ignore_missing_imports = true
exclude = 'playground/.*|deprecated/.*|dump/.*'

[[tool.mypy.overrides]]
module = "yaml"
ignore_missing_imports = true
