From 167be2d7714c45860e947db28a40b8923ef749fc Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 18 May 2024 16:11:45 +0400 Subject: [PATCH 1/5] python3Packages.morecantile: init at 5.3.0 --- .../python-modules/morecantile/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/morecantile/default.nix diff --git a/pkgs/development/python-modules/morecantile/default.nix b/pkgs/development/python-modules/morecantile/default.nix new file mode 100644 index 000000000000..00a6a7c533b4 --- /dev/null +++ b/pkgs/development/python-modules/morecantile/default.nix @@ -0,0 +1,54 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + + attrs, + click, + flit, + mercantile, + pydantic, + pyproj, + rasterio, +}: + +buildPythonPackage rec { + pname = "morecantile"; + version = "5.3.0"; + pyproject = true; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "developmentseed"; + repo = "morecantile"; + rev = version; + hash = "sha256-F7xYQrOngoRsZjmS6ZHRGN0/GD53AYcMQzyY1LZ1O7I="; + }; + + nativeBuildInputs = [ flit ]; + + propagatedBuildInputs = [ + attrs + click + pydantic + pyproj + ]; + + nativeCheckInputs = [ + mercantile + pytestCheckHook + rasterio + ]; + + pythonImportsCheck = [ "morecantile" ]; + + meta = { + description = "Construct and use map tile grids in different projection"; + homepage = "https://developmentseed.org/morecantile/"; + license = lib.licenses.mit; + maintainers = lib.teams.geospatial.members; + mainProgram = "morecantile"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 73bf650c68c3..f18b0beb21da 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7671,6 +7671,8 @@ self: super: with self; { more-properties = callPackage ../development/python-modules/more-properties { }; + morecantile = callPackage ../development/python-modules/morecantile { }; + moreorless = callPackage ../development/python-modules/moreorless { }; moretools = callPackage ../development/python-modules/moretools { }; From 55f6adc1b1623a21ac55b65d0e42dbea45562419 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 18 May 2024 16:19:18 +0400 Subject: [PATCH 2/5] python3Packages.rioxarray: init at 0.15.5 --- .../python-modules/rioxarray/default.nix | 57 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/python-modules/rioxarray/default.nix diff --git a/pkgs/development/python-modules/rioxarray/default.nix b/pkgs/development/python-modules/rioxarray/default.nix new file mode 100644 index 000000000000..5394906148c2 --- /dev/null +++ b/pkgs/development/python-modules/rioxarray/default.nix @@ -0,0 +1,57 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + + dask, + netcdf4, + numpy, + packaging, + pyproj, + rasterio, + setuptools, + xarray, +}: + +buildPythonPackage rec { + pname = "rioxarray"; + version = "0.15.5"; + pyproject = true; + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "corteva"; + repo = "rioxarray"; + rev = version; + hash = "sha256-bumFZQktgUqo2lyoLtDXkh6Vv5oS/wobqYpvNYy7La0="; + }; + + build-system = [ setuptools ]; + + propagatedBuildInputs = [ + numpy + packaging + pyproj + rasterio + xarray + ]; + + nativeCheckInputs = [ + dask + netcdf4 + pytestCheckHook + ]; + + disabledTests = [ "test_clip_geojson__no_drop" ]; + + pythonImportsCheck = [ "rioxarray" ]; + + meta = { + description = "geospatial xarray extension powered by rasterio"; + homepage = "https://corteva.github.io/rioxarray/"; + license = lib.licenses.asl20; + maintainers = lib.teams.geospatial.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f18b0beb21da..2017434f100c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13285,6 +13285,8 @@ self: super: with self; { ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; + rioxarray = callPackage ../development/python-modules/rioxarray { }; + ripe-atlas-cousteau = callPackage ../development/python-modules/ripe-atlas-cousteau { }; ripe-atlas-sagan = callPackage ../development/python-modules/ripe-atlas-sagan { }; From 6f0396177b65f4ac09c39d4186b241cffaad6d21 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 18 May 2024 21:09:40 +0400 Subject: [PATCH 3/5] python3Packages.color-operations: init at 0.1.3 --- .../color-operations/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/color-operations/default.nix diff --git a/pkgs/development/python-modules/color-operations/default.nix b/pkgs/development/python-modules/color-operations/default.nix new file mode 100644 index 000000000000..e4189e06809a --- /dev/null +++ b/pkgs/development/python-modules/color-operations/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + + colormath, + cython, + oldest-supported-numpy, + setuptools, +}: + +buildPythonPackage rec { + pname = "color-operations"; + version = "0.1.3"; + pyproject = true; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "vincentsarago"; + repo = "color-operations"; + rev = version; + hash = "sha256-KsrgilcNK2ufPKrhtGdf8mdlFzhsHB2jHN+WDlZqabc="; + }; + + nativeBuildInputs = [ + cython + setuptools + ]; + + propagatedBuildInputs = [ oldest-supported-numpy ]; + + nativeCheckInputs = [ + colormath + pytestCheckHook + ]; + + preCheck = '' + python setup.py build_ext --inplace + ''; + + pythonImportsCheck = [ "color_operations" ]; + + meta = { + description = "Apply basic color-oriented image operations. Fork of rio-color"; + homepage = "https://github.com/vincentsarago/color-operations"; + license = lib.licenses.mit; + maintainers = lib.teams.geospatial.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2017434f100c..8bb100c51185 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2358,6 +2358,8 @@ self: super: with self; { collidoscope = callPackage ../development/python-modules/collidoscope { }; + color-operations = callPackage ../development/python-modules/color-operations { }; + colorama = callPackage ../development/python-modules/colorama { }; colorcet = callPackage ../development/python-modules/colorcet { }; From 05233494a5d6bb42567b143da0e50ec7e28795e7 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 18 May 2024 21:37:59 +0400 Subject: [PATCH 4/5] python3Packages.pystac: init at 1.10.1 --- .../python-modules/pystac/default.nix | 53 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/pystac/default.nix diff --git a/pkgs/development/python-modules/pystac/default.nix b/pkgs/development/python-modules/pystac/default.nix new file mode 100644 index 000000000000..eb7f653db9de --- /dev/null +++ b/pkgs/development/python-modules/pystac/default.nix @@ -0,0 +1,53 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + + html5lib, + jsonschema, + pytest-cov, + pytest-mock, + pytest-recording, + python-dateutil, + requests-mock, + setuptools, +}: + +buildPythonPackage rec { + pname = "pystac"; + version = "1.10.1"; + pyproject = true; + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "stac-utils"; + repo = "pystac"; + rev = "v${version}"; + hash = "sha256-zJGDhKRX50Muo1YDEzfwypMLISnYBYKkPvUULYkUf68="; + }; + + build-system = [ setuptools ]; + + propagatedBuildInputs = [ python-dateutil ]; + + nativeCheckInputs = [ + html5lib + jsonschema + pytestCheckHook + pytest-cov + pytest-mock + pytest-recording + requests-mock + ]; + + pythonImportsCheck = [ "pystac" ]; + + meta = { + description = "Python library for working with any SpatioTemporal Asset Catalog (STAC)"; + homepage = "https://github.com/stac-utils/pystac"; + license = lib.licenses.asl20; + maintainers = lib.teams.geospatial.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8bb100c51185..021ce4df98ea 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10052,6 +10052,8 @@ self: super: with self; { pysolcast = callPackage ../development/python-modules/pysolcast { }; + pystac = callPackage ../development/python-modules/pystac { }; + pysubs2 = callPackage ../development/python-modules/pysubs2 { }; pysuez = callPackage ../development/python-modules/pysuez { }; From 0262b1e06e4494a1ea9f65407b7ab92f95f3c9e6 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 18 May 2024 21:49:21 +0400 Subject: [PATCH 5/5] python3Packages.rio-tiler: init at 6.6.1 --- .../python-modules/rio-tiler/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/rio-tiler/default.nix diff --git a/pkgs/development/python-modules/rio-tiler/default.nix b/pkgs/development/python-modules/rio-tiler/default.nix new file mode 100644 index 000000000000..757dd7c5e174 --- /dev/null +++ b/pkgs/development/python-modules/rio-tiler/default.nix @@ -0,0 +1,65 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + + attrs, + boto3, + cachetools, + color-operations, + hatchling, + httpx, + morecantile, + numexpr, + numpy, + pydantic, + pystac, + rasterio, + rioxarray, +}: + +buildPythonPackage rec { + pname = "rio-tiler"; + version = "6.6.1"; + pyproject = true; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "cogeotiff"; + repo = "rio-tiler"; + rev = version; + hash = "sha256-MR6kyoGM3uXt6JiIEfGcsmTmxqlLxUF9Wn+CFuK5LtQ="; + }; + + build-system = [ hatchling ]; + + propagatedBuildInputs = [ + attrs + cachetools + color-operations + httpx + morecantile + numexpr + numpy + pydantic + pystac + rasterio + ]; + + nativeCheckInputs = [ + boto3 + pytestCheckHook + rioxarray + ]; + + pythonImportsCheck = [ "rio_tiler" ]; + + meta = with lib; { + description = "User friendly Rasterio plugin to read raster datasets"; + homepage = "https://cogeotiff.github.io/rio-tiler/"; + license = licenses.bsd3; + maintainers = lib.teams.geospatial.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 021ce4df98ea..cbf7b07fc99e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13289,6 +13289,8 @@ self: super: with self; { ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; + rio-tiler = callPackage ../development/python-modules/rio-tiler { }; + rioxarray = callPackage ../development/python-modules/rioxarray { }; ripe-atlas-cousteau = callPackage ../development/python-modules/ripe-atlas-cousteau { };