From d2fb7b83c14cabbf4c31961ac5d8e324e1979f62 Mon Sep 17 00:00:00 2001 From: Roy Smart Date: Sat, 10 Jun 2023 15:33:30 -0600 Subject: [PATCH] Renamed project from `interp` to `regridding` since `interp` wasn't available on PyPI. Signed-off-by: Roy Smart --- README.md | 12 ++++++------ docs/conf.py | 6 +++--- docs/index.rst | 2 +- pyproject.toml | 6 +++--- {interp => regridding}/__init__.py | 0 {interp => regridding}/_interp_ndarray.py | 0 {interp => regridding}/tests/__init__.py | 0 {interp => regridding}/tests/test_interp_ndarray.py | 6 +++--- 8 files changed, 16 insertions(+), 16 deletions(-) rename {interp => regridding}/__init__.py (100%) rename {interp => regridding}/_interp_ndarray.py (100%) rename {interp => regridding}/tests/__init__.py (100%) rename {interp => regridding}/tests/test_interp_ndarray.py (89%) diff --git a/README.md b/README.md index bf7ae5a..0ea81cc 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# interp +# regridding -![tests](https://github.com/byrdie/interp/actions/workflows/tests.yml/badge.svg) -[![codecov](https://codecov.io/gh/byrdie/interp/branch/main/graph/badge.svg?token=TV57F67UUI)](https://codecov.io/gh/byrdie/interp) -[![Documentation Status](https://readthedocs.org/projects/interp/badge/?version=latest)](https://interp.readthedocs.io/en/latest/?badge=latest) -[![PyPI version](https://badge.fury.io/py/interp.svg)](https://badge.fury.io/py/interp) +![tests](https://github.com/byrdie/regridding/actions/workflows/tests.yml/badge.svg) +[![codecov](https://codecov.io/gh/byrdie/regridding/branch/main/graph/badge.svg?token=TV57F67UUI)](https://codecov.io/gh/byrdie/regridding) +[![Documentation Status](https://readthedocs.org/projects/regridding/badge/?version=latest)](https://regridding.readthedocs.io/en/latest/?badge=latest) +[![PyPI version](https://badge.fury.io/py/regridding.svg)](https://badge.fury.io/py/regridding) -`numba`-accelerated interpolation of `numpy` n-dimensional arrays. +Numba-accelerated multilinear and first-order conservative interpolation of Numpy arrays. diff --git a/docs/conf.py b/docs/conf.py index 275452f..83506e8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,7 @@ # -- Project information ----------------------------------------------------- -project = 'interp' +project = 'regridding' copyright = '2023, Roy T. Smart' author = 'Roy T. Smart' @@ -75,13 +75,13 @@ "icon_links": [ { "name": "GitHub", - "url": "https://github.com/byrdie/interp", + "url": "https://github.com/byrdie/regridding", "icon": "fa-brands fa-github", "type": "fontawesome", }, { "name": "PyPI", - "url": "https://pypi.org/project/interp/", + "url": "https://pypi.org/project/regridding/", "icon": "fa-brands fa-python", }, ], diff --git a/docs/index.rst b/docs/index.rst index 5b6f8a6..3957e40 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,7 @@ Introduction :template: module_custom.rst :recursive: - interp + regridding diff --git a/pyproject.toml b/pyproject.toml index 6220244..8a989ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools-scm"] build-backend = "setuptools.build_meta" [project] -name = "interp" +name = "regridding" authors = [ {name = "Roy T. Smart", email = "roytsmart@gmail.com"}, ] @@ -35,7 +35,7 @@ doc = [ ] [project.urls] -Homepage = "https://github.com/byrdie/interp" -Documentation = "https://interp.readthedocs.io/en/latest" +Homepage = "https://github.com/byrdie/regridding" +Documentation = "https://regridding.readthedocs.io/en/latest" [tool.setuptools_scm] diff --git a/interp/__init__.py b/regridding/__init__.py similarity index 100% rename from interp/__init__.py rename to regridding/__init__.py diff --git a/interp/_interp_ndarray.py b/regridding/_interp_ndarray.py similarity index 100% rename from interp/_interp_ndarray.py rename to regridding/_interp_ndarray.py diff --git a/interp/tests/__init__.py b/regridding/tests/__init__.py similarity index 100% rename from interp/tests/__init__.py rename to regridding/tests/__init__.py diff --git a/interp/tests/test_interp_ndarray.py b/regridding/tests/test_interp_ndarray.py similarity index 89% rename from interp/tests/test_interp_ndarray.py rename to regridding/tests/test_interp_ndarray.py index eaf7b60..9a749aa 100644 --- a/interp/tests/test_interp_ndarray.py +++ b/regridding/tests/test_interp_ndarray.py @@ -1,7 +1,7 @@ import pytest import numpy as np import scipy.ndimage -import interp +import regridding sz_t = 9 @@ -32,7 +32,7 @@ def test_ndarray_linear_interpolation_1d( x: np.ndarray, axis: None | int | tuple[int] ): - result = interp.ndarray_linear_interpolation(a=a, coordinates=(x,), axis=axis) + result = regridding.ndarray_linear_interpolation(a=a, coordinates=(x,), axis=axis) expected = scipy.ndimage.map_coordinates(input=a, coordinates=x[np.newaxis], mode="nearest", order=1) assert np.allclose(result, expected) @@ -74,7 +74,7 @@ def test_ndarray_linear_interpolation_2d( ): x, y = np.broadcast_arrays(x, y) - result = interp.ndarray_linear_interpolation(a=a, coordinates=(x, y), axis=axis) + result = regridding.ndarray_linear_interpolation(a=a, coordinates=(x, y), axis=axis) expected = scipy.ndimage.map_coordinates(input=a, coordinates=np.stack([x, y]), order=1) print(result - expected)