Skip to content

Commit

Permalink
python312Packages.docarray: init at 0.40.0
Browse files Browse the repository at this point in the history
Co-authored-by: OTABI Tomoya <[email protected]>
  • Loading branch information
loicreynier and natsukium committed Oct 25, 2024
1 parent 2d53b65 commit 0612a4c
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
134 changes: 134 additions & 0 deletions pkgs/development/python-modules/docarray/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
poetry-core,
numpy,
orjson,
pydantic,
rich,
types-requests,
typing-inspect,
# Optional dependencies
av,
elasticsearch,
elastic-transport,
fastapi,
hnswlib,
jax,
lz4,
jaxlib,
pandas,
pillow,
types-pillow,
protobuf,
pydub,
pyepsilla,
pymilvus,
qdrant-client,
redis,
smart-open,
torch,
trimesh,
weaviate-client,
# Test
pytestCheckHook,
mktestdocs,
boto3,
botocore,
scipy,
}:
buildPythonPackage rec {
pname = "docarray";
version = "0.40.0";
format = "pyproject";

disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "docarray";
repo = "docarray";
rev = "v${version}";
hash = "sha256-Vqmfn36UYb3s5Y1OtxtHgU5bCJaWKb5Perqr6X3A9xA=";
};

build-system = [ poetry-core ];

dependencies = [
numpy
orjson
pydantic
rich
types-requests
typing-inspect
];

optional-dependencies = {
proto = [
protobuf
lz4
];
pandas = [ pandas ];
image = [
pillow
types-pillow
];
video = [ av ];
audio = [ pydub ];
mesh = [ trimesh ];
hnswlib = [
hnswlib
protobuf
];
elasticsearch = [
elasticsearch
elastic-transport
];
jac = [
# jina-hubble-sdk
];
aws = [ smart-open ];
torch = [ torch ];
web = [ fastapi ];
qdrant = [ qdrant-client ];
weaviate = [ weaviate-client ];
milvus = [ pymilvus ];
redis = [ redis ];
jax = [
jaxlib
jax
];
epsilla = [
pyepsilla
];
};

pythonImportsCheck = [ "docarray" ];
nativeCheckInputs = [
pytestCheckHook
boto3
botocore
elasticsearch
elastic-transport
fastapi
hnswlib
mktestdocs
protobuf
pyepsilla
pymilvus
qdrant-client
scipy
smart-open
torch
weaviate-client
];

meta = with lib; {
description = "Library expertly crafted for the representation, transmission, storage, and retrieval of multimodal data";
homepage = "https://docs.docarray.org/";
changelog = "https://github.com/docarray/docarray/blob/main/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ loicreynier ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3648,6 +3648,8 @@ self: super: with self; {

doc8 = callPackage ../development/python-modules/doc8 { };

docarray = callPackage ../development/python-modules/docarray { };

docformatter = callPackage ../development/python-modules/docformatter { };

docker = callPackage ../development/python-modules/docker { };
Expand Down

0 comments on commit 0612a4c

Please sign in to comment.