Skip to content

Commit 09c2bab

Browse files
committed
Merge branch 'main' into meson
2 parents 5a522e8 + c5f1af7 commit 09c2bab

9 files changed

Lines changed: 10 additions & 26 deletions

docs/release.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ Maintenance
3939

4040
* Move source code from ``numcodecs/`` to ``src/numcodecs/`` (src layout). This avoids
4141
import shadowing issues where the source tree's ``numcodecs/`` package (without compiled
42-
C extensions) would shadow the installed package. Move test suite from
43-
``numcodecs/tests/`` to top-level ``tests/`` directory, following the standard layout
44-
for meson-python projects (numpy, scipy, scikit-learn). Test imports change from
45-
``from numcodecs.tests.common import ...`` to ``from tests.common import ...``.
42+
C extensions) would shadow the installed package.
4643

4744
By :user:`Max Jones <maxrjones>`.
4845

4946
* Rewrite contributing guide with pixi and uv development environment instructions.
5047

5148
By :user:`Max Jones <maxrjones>`.
49+
* Move tests out of installable package into top-level ``tests/`` directory.
50+
By :user:`Max Jones <maxrjones>`, :issue:`829`
5251

5352
.. _release_0.16.5:
5453

notebooks/benchmark_vlen.ipynb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,10 @@
6464
},
6565
{
6666
"cell_type": "code",
67-
"execution_count": 3,
67+
"execution_count": null,
6868
"metadata": {},
6969
"outputs": [],
70-
"source": [
71-
"from numcodecs.tests.common import greetings\n",
72-
"\n",
73-
"msgpack_codec = numcodecs.MsgPack()\n",
74-
"json_codec = numcodecs.JSON()\n",
75-
"pickle_codec = numcodecs.Pickle()\n",
76-
"cat_codec = numcodecs.Categorize(greetings, dtype=object, astype='u1')\n",
77-
"vlen_codec = numcodecs.VLenUTF8()"
78-
]
70+
"source": "from tests.common import greetings\n\nmsgpack_codec = numcodecs.MsgPack()\njson_codec = numcodecs.JSON()\npickle_codec = numcodecs.Pickle()\ncat_codec = numcodecs.Categorize(greetings, dtype=object, astype='u1')\nvlen_codec = numcodecs.VLenUTF8()"
7971
},
8072
{
8173
"cell_type": "markdown",
@@ -678,4 +670,4 @@
678670
},
679671
"nbformat": 4,
680672
"nbformat_minor": 2
681-
}
673+
}

tests/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66

77
import numpy as np
88
import pytest
9-
from numpy.testing import assert_array_almost_equal, assert_array_equal
10-
119
from numcodecs import * # noqa: F403 # for eval to find names in repr tests
1210
from numcodecs.compat import ensure_bytes, ensure_ndarray
1311
from numcodecs.registry import get_codec
12+
from numpy.testing import assert_array_almost_equal, assert_array_equal
1413

1514
greetings = [
1615
'¡Hola mundo!',

tests/test_bitround.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import numpy as np
22
import pytest
3-
43
from numcodecs.bitround import BitRound, max_bits
54

65
# adapted from https://github.com/milankl/BitInformation.jl/blob/main/test/round_nearest.jl

tests/test_compat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import numpy as np
55
import pytest
6-
76
from numcodecs.compat import ensure_bytes, ensure_contiguous_ndarray, ensure_text
87

98

tests/test_entrypoints.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import os.path
22
import sys
33

4-
import pytest
5-
64
import numcodecs.registry
5+
import pytest
76

87
here = os.path.abspath(os.path.dirname(__file__))
98

tests/test_entrypoints_backport.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
import sys
44
from multiprocessing import Process
55

6-
import pytest
7-
86
import numcodecs.registry
7+
import pytest
98

109
importlib_spec = importlib.util.find_spec("importlib_metadata")
1110
if importlib_spec is None or importlib_spec.loader is None: # pragma: no cover

tests/test_ndarray_like.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
32
from numcodecs.ndarray_like import DType, FlagsObj, NDArrayLike
43

54

tests/test_registry.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import inspect
22

3-
import pytest
4-
53
import numcodecs
4+
import pytest
65
from numcodecs.errors import UnknownCodecError
76
from numcodecs.registry import get_codec
87

0 commit comments

Comments
 (0)