Skip to content

Commit

Permalink
ci: adopt uv as installer (#1142)
Browse files Browse the repository at this point in the history
* try uv

* pip for typing

* fix docs generation

* fix weaviate

* revert weaviate change

* no setuptools

* try to see if nightly with Haystack main works

* trigger

* fix instructor embedders

* Fix formatting in integrations/chroma/pyproject.toml

---------

Co-authored-by: Silvano Cerza <[email protected]>
  • Loading branch information
anakin87 and silvanocerza authored Oct 18, 2024
1 parent 2f12690 commit f166d91
Show file tree
Hide file tree
Showing 28 changed files with 85 additions and 27 deletions.
4 changes: 3 additions & 1 deletion integrations/amazon_bedrock/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/amazon_bedrock-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -60,8 +61,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"

Expand Down
4 changes: 3 additions & 1 deletion integrations/amazon_sagemaker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/amazon_sagemaker-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -65,8 +66,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/anthropic/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/anthropic-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -60,8 +61,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"

Expand Down
4 changes: 3 additions & 1 deletion integrations/astra/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/astra-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -59,8 +60,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
3 changes: 3 additions & 0 deletions integrations/chroma/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/chroma-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -61,8 +62,10 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.9", "3.10"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = [
"pip",
"black>=23.1.0",
"mypy>=1.0.0",
"ruff>=0.0.243",
Expand Down
4 changes: 3 additions & 1 deletion integrations/cohere/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/cohere-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -60,8 +61,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = [
Expand Down
4 changes: 3 additions & 1 deletion integrations/deepeval/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/deepeval-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = ["coverage[toml]>=6.5", "pytest", "pytest-rerunfailures", "haystack-pydoc-tools"]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
Expand All @@ -55,8 +56,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive {args:src/}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/elasticsearch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/elasticsearch-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -61,8 +62,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/fastembed/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/fastembed-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -62,8 +63,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", "numpy"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", "numpy"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/google_ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/google_ai-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -58,8 +59,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/google_vertex/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/google_vertex-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -59,8 +60,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
5 changes: 4 additions & 1 deletion integrations/instructor_embedders/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies = [
# Commenting some of them to not interfere with the dependencies of Haystack.
#"transformers==4.20.0",
"datasets>=2.2.0",
"huggingface_hub<0.26.0",
#"pyarrow==8.0.0",
"jsonlines",
"numpy",
Expand Down Expand Up @@ -64,6 +65,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/instructor_embedders-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -83,8 +85,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["38", "39", "310", "311"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]

[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
Expand Down
4 changes: 3 additions & 1 deletion integrations/jina/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/jina-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = ["coverage[toml]>=6.5", "pytest", "pytest-rerunfailures", "haystack-pydoc-tools"]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
Expand All @@ -58,8 +59,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/langfuse/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/langfuse-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -64,8 +65,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]

[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
Expand Down
4 changes: 3 additions & 1 deletion integrations/llama_cpp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/llama_cpp-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -65,8 +66,9 @@ python = ["3.8", "3.9", "3.10", "3.11", "3.12"]


[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]

[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
Expand Down
4 changes: 3 additions & 1 deletion integrations/mistral/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/mistral-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -60,8 +61,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = [
Expand Down
4 changes: 3 additions & 1 deletion integrations/mongodb_atlas/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/mongodb_atlas-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -62,8 +63,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:.}", "black --check --diff {args:.}"]
Expand Down
4 changes: 3 additions & 1 deletion integrations/nvidia/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/nvidia-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -62,8 +63,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = [
Expand Down
4 changes: 3 additions & 1 deletion integrations/ollama/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/ollama-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -66,8 +67,9 @@ python = ["3.8", "3.9", "3.10", "3.11", "3.12"]


[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243"]

[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
Expand Down
4 changes: 3 additions & 1 deletion integrations/opensearch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ root = "../.."
git_describe_command = 'git describe --tags --match="integrations/opensearch-v[0-9]*"'

[tool.hatch.envs.default]
installer = "uv"
dependencies = [
"coverage[toml]>=6.5",
"pytest",
Expand All @@ -63,8 +64,9 @@ docs = ["pydoc-markdown pydoc/config.yml"]
python = ["3.8", "3.9", "3.10", "3.11"]

[tool.hatch.envs.lint]
installer = "uv"
detached = true
dependencies = ["black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", "boto3"]
dependencies = ["pip", "black>=23.1.0", "mypy>=1.0.0", "ruff>=0.0.243", "boto3"]
[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/ tests}"
style = ["ruff check {args:}", "black --check --diff {args:.}"]
Expand Down
Loading

0 comments on commit f166d91

Please sign in to comment.