mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
- Configure hatch test matrix for Python 3.10-3.13 (coverage requires 3.10+) - Add separate test-legacy workflow job for Python 3.8 and 3.9 - Tests verified passing on all versions locally
71 lines
1.5 KiB
TOML
71 lines
1.5 KiB
TOML
[project]
|
|
name = 'ollama'
|
|
description = 'The official Python client for Ollama.'
|
|
authors = [
|
|
{ email = 'hello@ollama.com' },
|
|
]
|
|
readme = 'README.md'
|
|
requires-python = '>=3.8'
|
|
dependencies = [
|
|
'httpx>=0.27',
|
|
'pydantic>=2.9',
|
|
]
|
|
dynamic = [ 'version' ]
|
|
license = "MIT"
|
|
|
|
[project.urls]
|
|
homepage = 'https://ollama.com'
|
|
repository = 'https://github.com/ollama/ollama-python'
|
|
issues = 'https://github.com/ollama/ollama-python/issues'
|
|
|
|
[build-system]
|
|
requires = [ 'hatchling', 'hatch-vcs' ]
|
|
build-backend = 'hatchling.build'
|
|
|
|
[tool.hatch.version]
|
|
source = 'vcs'
|
|
|
|
[tool.hatch.envs.hatch-test]
|
|
default-args = ['ollama', 'tests']
|
|
extra-dependencies = [
|
|
'pytest-anyio',
|
|
'pytest-httpserver',
|
|
]
|
|
|
|
[[tool.hatch.envs.hatch-test.matrix]]
|
|
python = ["3.10", "3.11", "3.12", "3.13"]
|
|
|
|
[tool.hatch.envs.hatch-static-analysis]
|
|
dependencies = [ 'ruff>=0.9.1' ]
|
|
config-path = 'none'
|
|
|
|
[tool.ruff]
|
|
line-length = 320
|
|
indent-width = 2
|
|
|
|
[tool.ruff.format]
|
|
quote-style = 'single'
|
|
indent-style = 'space'
|
|
docstring-code-format = false
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
'F', # pyflakes
|
|
'E', # pycodestyle errors
|
|
'W', # pycodestyle warnings
|
|
'I', # sort imports
|
|
'N', # pep8-naming
|
|
'ASYNC', # flake8-async
|
|
'FBT', # flake8-boolean-trap
|
|
'B', # flake8-bugbear
|
|
'C4', # flake8-comprehensions
|
|
'PIE', # flake8-pie
|
|
'SIM', # flake8-simplify
|
|
'FLY', # flynt
|
|
'RUF', # ruff-specific rules
|
|
]
|
|
ignore = ['FBT001'] # Boolean-typed positional argument in function definition
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = ['--doctest-modules']
|