Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-system flit-core,
# optional-dependencies jupyter, mediapy, numpy, packaging, protobuf, fsspec, typing-extensions, zipp, absl-py, simple-parsing, einops, gcsfs, s3fs, tqdm, dm-tree, jax, tensorflow,
# tests chex, ffmpeg, jaxlib, optree, pydantic, pytest-xdist, pytestCheckHook, torch, yapf,}:
buildPythonPackage (finalAttrs: { pname = "etils"; version = "1.14.0"; pyproject = true; __structuredAttrs = true;
src = fetchFromGitHub { owner = "google"; repo = "etils"; tag = "v${finalAttrs.version}"; hash = "sha256-gjWA+y1dXihmOBzCxfgUZJLvtSHzpRLQIhNxzk+y11M="; };
build-system = [ flit-core ];
optional-dependencies = lib.fix (self: { array-types = self.enp; eapp = [ absl-py simple-parsing ] ++ self.epy; ecolab = [ jupyter numpy mediapy packaging protobuf ] ++ self.enp ++ self.epy ++ self.etree; edc = self.epy; enp = [ numpy einops ] ++ self.epy; epath = [ fsspec typing-extensions zipp ] ++ self.epy; epath-gcs = [ gcsfs ] ++ self.epath; epath-s3 = [ s3fs ] ++ self.epath; epy = [ typing-extensions ]; etqdm = [ absl-py tqdm ] ++ self.epy; etree = self.array-types ++ self.epy ++ self.enp ++ self.etqdm; etree-dm = [ dm-tree ] ++ self.etree; etree-jax = [ jax ] ++ self.etree; etree-tf = [ tensorflow ] ++ self.etree; lazy-imports = self.ecolab; all = self.array-types ++ self.eapp ++ self.ecolab ++ self.edc ++ self.enp ++ self.epath ++ self.epath-gcs ++ self.epath-s3 ++ self.epy ++ self.etqdm ++ self.etree ++ self.etree-dm ++ self.etree-jax ++ lib.optionals (!tensorflow.meta.broken) self.etree-tf; });
pythonImportsCheck = [ "etils" ];
nativeCheckInputs = [ chex optree ffmpeg jaxlib torch pydantic pytest-xdist pytestCheckHook yapf ] ++ finalAttrs.passthru.optional-dependencies.all;
# enabledTestPaths = [ ];
disabledTests = [ # Requires network access "test_public_access"
# AttributeError: module 'jax._src' has no attribute 'prng' "test_array_spec_is_fake" "test_array_spec_repr" "test_array_spec_tensors" "test_array_spec_valid" "test_obj" "test_spec_like" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # AssertionError: assert '/tmp/to/something' == '/private/tmp/to/something' "test_repr" ] ++ lib.optionals tensorflow.meta.broken [ "test_use_backend" ];
disabledTestPaths = [ # Circular dependency with tensorflow-datasets "etils/epy/lazy_imports_utils_test.py"
# Requires unpackaged fiddle "etils/epy/text_utils_test.py" ] ++ lib.optionals tensorflow.meta.broken [ "etils/ecolab/array_as_img_test.py" "etils/enp/array_spec_test.py" "etils/enp/array_types/dtypes_test.py" "etils/enp/checking_test.py" "etils/enp/compat_test.py" "etils/enp/geo_utils_test.py" "etils/enp/interp_utils_test.py" "etils/enp/linalg_test.py" "etils/enp/numpy_utils_test.py" "etils/etree/tree_utils_test.py" ];
meta = { description = "Collection of eclectic utils"; homepage = "https://github.com/google/etils"; changelog = "https://github.com/google/etils/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ mcwitt ]; };})