git: 57ceabc36d31 - main - databases/py-caterva: Update to 0.7.3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Dec 2022 09:09:00 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=57ceabc36d3191b08e5348c076c82ad97a89cd57 commit 57ceabc36d3191b08e5348c076c82ad97a89cd57 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-12-30 08:40:58 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-12-30 09:04:15 +0000 databases/py-caterva: Update to 0.7.3 Changes: https://github.com/Blosc/python-caterva/releases https://github.com/Blosc/python-caterva/blob/master/RELEASE_NOTES.rst --- databases/py-caterva/Makefile | 5 +- databases/py-caterva/distinfo | 6 +- .../py-caterva/files/patch-caterva-caterva_ext.pyx | 73 ---------------------- .../py-caterva/files/patch-caterva-constructors.py | 13 ---- .../files/patch-tests-test_metalayers.py | 29 --------- .../files/patch-tests-test_persistency.py | 28 --------- 6 files changed, 5 insertions(+), 149 deletions(-) diff --git a/databases/py-caterva/Makefile b/databases/py-caterva/Makefile index 0a97e4c27338..c3d21886359b 100644 --- a/databases/py-caterva/Makefile +++ b/databases/py-caterva/Makefile @@ -1,6 +1,5 @@ PORTNAME= caterva -PORTVERSION= 0.7.2 -PORTREVISION= 1 +PORTVERSION= 0.7.3 CATEGORIES= databases python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,7 +11,7 @@ WWW= https://github.com/Blosc/python-caterva LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= caterva>=0.5.0_2:databases/caterva \ +BUILD_DEPENDS= caterva>=0.5.0_3:databases/caterva \ cmake:devel/cmake-core \ ninja:devel/ninja \ ${PYTHON_PKGNAMEPREFIX}scikit-build>=0:devel/py-scikit-build@${PY_FLAVOR} diff --git a/databases/py-caterva/distinfo b/databases/py-caterva/distinfo index 7087a702f262..0844c0a6d6b9 100644 --- a/databases/py-caterva/distinfo +++ b/databases/py-caterva/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1646057914 -SHA256 (caterva-0.7.2.tar.gz) = 109a744715e99e1771575871b9eb6b54d3fcc6de6f3ca56d52289d12c2cb9849 -SIZE (caterva-0.7.2.tar.gz) = 1501558 +TIMESTAMP = 1669057579 +SHA256 (caterva-0.7.3.tar.gz) = 411b740129c7c330e732f6ab95af6f0a94ef7402ca48392a8e63286c2b46e5b3 +SIZE (caterva-0.7.3.tar.gz) = 1644501 diff --git a/databases/py-caterva/files/patch-caterva-caterva_ext.pyx b/databases/py-caterva/files/patch-caterva-caterva_ext.pyx deleted file mode 100644 index 75e6f5a76894..000000000000 --- a/databases/py-caterva/files/patch-caterva-caterva_ext.pyx +++ /dev/null @@ -1,73 +0,0 @@ -Reference: https://github.com/Blosc/caterva/commit/d34818b6fde503b13edee9654852559932bf0390 - ---- caterva/caterva_ext.pyx.orig 2022-01-28 12:38:26 UTC -+++ caterva/caterva_ext.pyx -@@ -48,7 +48,7 @@ cdef extern from "blosc2.h": - BLOSC2_MAX_FILTERS - BLOSC2_MAX_METALAYERS - BLOSC2_MAX_VLMETALAYERS -- BLOSC_MAX_OVERHEAD -+ BLOSC2_MAX_OVERHEAD - BLOSC_ALWAYS_SPLIT = 1, - BLOSC_NEVER_SPLIT = 2, - BLOSC_AUTO_SPLIT = 3, -@@ -130,7 +130,7 @@ cdef extern from "caterva.h": - ctypedef struct caterva_storage_t: - int32_t chunkshape[CATERVA_MAX_DIM] - int32_t blockshape[CATERVA_MAX_DIM] -- bool sequencial -+ bool contiguous - char* urlpath - caterva_metalayer_t metalayers[CATERVA_MAX_METALAYERS] - int32_t nmetalayers -@@ -195,8 +195,8 @@ cdef extern from "caterva.h": - int64_t *start, int64_t *stop, caterva_array_t *array); - int caterva_copy(caterva_ctx_t *ctx, caterva_array_t *src, caterva_storage_t *storage, - caterva_array_t ** array); -- int caterva_resize(caterva_array_t *array, -- int64_t *new_shape); -+ int caterva_resize(caterva_ctx_t *ctx, caterva_array_t *array, int64_t *new_shape, -+ const int64_t *start); - - # Defaults for compression params - config_dflts = { -@@ -269,7 +269,7 @@ cdef create_caterva_storage(caterva_storage_t *storage - chunks = kwargs.get('chunks', None) - blocks = kwargs.get('blocks', None) - urlpath = kwargs.get('urlpath', None) -- sequential = kwargs.get('sequential', False) -+ contiguous = kwargs.get('contiguous', False) - meta = kwargs.get('meta', None) - - if not chunks: -@@ -282,7 +282,7 @@ cdef create_caterva_storage(caterva_storage_t *storage - storage.urlpath = urlpath - else: - storage.urlpath = NULL -- storage.sequencial = sequential -+ storage.contiguous = contiguous - for i in range(len(chunks)): - storage.chunkshape[i] = chunks[i] - storage.blockshape[i] = blocks[i] -@@ -321,7 +321,7 @@ cdef class NDArray: - @property - def cratio(self): - """The compression ratio for this container.""" -- return self.size / (self.array.sc.cbytes + BLOSC_MAX_OVERHEAD * self.nchunks) -+ return self.size / (self.array.sc.cbytes + BLOSC2_MAX_OVERHEAD * self.nchunks) - - @property - def clevel(self): -@@ -517,10 +517,11 @@ def copy(NDArray arr, NDArray src, **kwargs): - return arr - - def resize(NDArray arr, new_shape): -+ ctx = Context(**arr.kwargs) - cdef int64_t new_shape_[CATERVA_MAX_DIM] - for i, s in enumerate(new_shape): - new_shape_[i] = s -- caterva_resize(arr.array, new_shape_) -+ caterva_resize(ctx.context_, arr.array, new_shape_, NULL) - return arr - - def from_file(NDArray arr, urlpath, **kwargs): diff --git a/databases/py-caterva/files/patch-caterva-constructors.py b/databases/py-caterva/files/patch-caterva-constructors.py deleted file mode 100644 index 9ee3fd4b9887..000000000000 --- a/databases/py-caterva/files/patch-caterva-constructors.py +++ /dev/null @@ -1,13 +0,0 @@ ---- caterva/constructors.py.orig 2022-01-28 12:38:26 UTC -+++ caterva/constructors.py -@@ -34,8 +34,8 @@ def empty(shape, itemsize, **kwargs): - urlpath: str or None - The name of the file to store data. If `None`, data is stored in-memory. - (Default `None`) -- sequential: bool or None -- Whether the data is stored sequentially or sparsely (one chunk per file). -+ contiguous: bool or None -+ Whether the data is stored contiguously or sparsely (one chunk per file). - If `None`, data is stored sparsely. - memframe: bool - If True, the array is backed by a frame in-memory. Else, by a super-chunk. diff --git a/databases/py-caterva/files/patch-tests-test_metalayers.py b/databases/py-caterva/files/patch-tests-test_metalayers.py deleted file mode 100644 index 226a0ed9954a..000000000000 --- a/databases/py-caterva/files/patch-tests-test_metalayers.py +++ /dev/null @@ -1,29 +0,0 @@ ---- tests/test_metalayers.py.orig 2022-01-28 12:38:26 UTC -+++ tests/test_metalayers.py -@@ -13,7 +13,7 @@ import os - from msgpack import packb - - --@pytest.mark.parametrize("sequencial", -+@pytest.mark.parametrize("contiguous", - [ - True, - False, -@@ -24,7 +24,7 @@ from msgpack import packb - ([20, 134, 13], [12, 66, 8], [3, 13, 5], "testmeta01.cat", np.int32), - ([12, 13, 14, 15, 16], [8, 9, 4, 12, 9], [2, 6, 4, 5, 4], "testmeta02.cat", np.float32) - ]) --def test_metalayers(shape, chunks, blocks, urlpath, sequencial, dtype): -+def test_metalayers(shape, chunks, blocks, urlpath, contiguous, dtype): - if os.path.exists(urlpath): - cat.remove(urlpath) - -@@ -34,7 +34,7 @@ def test_metalayers(shape, chunks, blocks, urlpath, se - # Create an empty caterva array (on disk) - itemsize = np.dtype(dtype).itemsize - a = cat.empty(shape, itemsize, chunks=chunks, blocks=blocks, -- urlpath=urlpath, sequencial=sequencial, -+ urlpath=urlpath, contiguous=contiguous, - meta={"numpy": numpy_meta, - "test": test_meta}) - diff --git a/databases/py-caterva/files/patch-tests-test_persistency.py b/databases/py-caterva/files/patch-tests-test_persistency.py deleted file mode 100644 index 647c43024c79..000000000000 --- a/databases/py-caterva/files/patch-tests-test_persistency.py +++ /dev/null @@ -1,28 +0,0 @@ ---- tests/test_persistency.py.orig 2022-01-28 12:38:26 UTC -+++ tests/test_persistency.py -@@ -12,7 +12,7 @@ import numpy as np - import os - - --@pytest.mark.parametrize("sequencial", -+@pytest.mark.parametrize("contiguous", - [ - True, - False, -@@ -23,14 +23,14 @@ import os - ([20, 134, 13], [7, 22, 5], [3, 5, 3], "test01.cat", np.int32), - ([12, 13, 14, 15, 16], [4, 6, 4, 7, 5], [2, 4, 2, 3, 3], "test02.cat", np.float32) - ]) --def test_persistency(shape, chunks, blocks, urlpath, sequencial, dtype): -+def test_persistency(shape, chunks, blocks, urlpath, contiguous, dtype): - if os.path.exists(urlpath): - cat.remove(urlpath) - - size = int(np.prod(shape)) - nparray = np.arange(size, dtype=dtype).reshape(shape) - _ = cat.asarray(nparray, chunks=chunks, blocks=blocks, -- urlpath=urlpath, sequencial=sequencial) -+ urlpath=urlpath, contiguous=contiguous) - b = cat.open(urlpath) - - bc = b[:]