Skip to content

Commit a836367

Browse files
Bump pytest-doctestplus from 0.4.0 to 0.9.0 (#752)
* Bump pytest-doctestplus from 0.4.0 to 0.9.0 Bumps [pytest-doctestplus](https://github.com/astropy/pytest-doctestplus) from 0.4.0 to 0.9.0. - [Release notes](https://github.com/astropy/pytest-doctestplus/releases) - [Changelog](https://github.com/astropy/pytest-doctestplus/blob/main/CHANGES.rst) - [Commits](scientific-python/pytest-doctestplus@v0.4.0...0.9.0) Signed-off-by: dependabot[bot] <[email protected]> * Install line_profiler for bench/compress_normal.py * Temporarily disable bench/compress_normal.py * Fix pep8 in compress_normal.py Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jmoore <[email protected]> Co-authored-by: Josh Moore <[email protected]>
1 parent bb8b37b commit a836367

File tree

3 files changed

+30
-26
lines changed

3 files changed

+30
-26
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
conda activate zarr-env
5757
python -m pip install --upgrade pip
58-
python -m pip install -U pip setuptools wheel codecov
58+
python -m pip install -U pip setuptools wheel codecov line_profiler
5959
python -m pip install -rrequirements_dev_minimal.txt numpy${{ matrix.numpy_version}} -rrequirements_dev_optional.txt pymongo redis
6060
python -m pip install -e .
6161
python -m pip freeze

bench/compress_normal.py

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,38 @@
77
import zarr
88
from zarr import blosc
99

10-
sys.path.insert(0, '..')
10+
if __name__ == "__main__":
1111

12-
# setup
13-
a = np.random.normal(2000, 1000, size=200000000).astype('u2')
14-
z = zarr.empty_like(a, chunks=1000000, compression='blosc', compression_opts=dict(cname='lz4', clevel=5, shuffle=2))
15-
print(z)
12+
sys.path.insert(0, '..')
1613

17-
print('*' * 79)
14+
# setup
15+
a = np.random.normal(2000, 1000, size=200000000).astype('u2')
16+
z = zarr.empty_like(a, chunks=1000000,
17+
compression='blosc',
18+
compression_opts=dict(cname='lz4', clevel=5, shuffle=2))
19+
print(z)
1820

19-
# time
20-
t = timeit.repeat('z[:] = a', repeat=10, number=1, globals=globals())
21-
print(t)
22-
print(min(t))
23-
print(z)
21+
print('*' * 79)
2422

25-
# profile
26-
profile = line_profiler.LineProfiler(blosc.compress)
27-
profile.run('z[:] = a')
28-
profile.print_stats()
23+
# time
24+
t = timeit.repeat('z[:] = a', repeat=10, number=1, globals=globals())
25+
print(t)
26+
print(min(t))
27+
print(z)
2928

30-
print('*' * 79)
29+
# profile
30+
profile = line_profiler.LineProfiler(blosc.compress)
31+
profile.run('z[:] = a')
32+
profile.print_stats()
3133

32-
# time
33-
t = timeit.repeat('z[:]', repeat=10, number=1, globals=globals())
34-
print(t)
35-
print(min(t))
34+
print('*' * 79)
3635

37-
# profile
38-
profile = line_profiler.LineProfiler(blosc.decompress)
39-
profile.run('z[:]')
40-
profile.print_stats()
36+
# time
37+
t = timeit.repeat('z[:]', repeat=10, number=1, globals=globals())
38+
print(t)
39+
print(min(t))
40+
41+
# profile
42+
profile = line_profiler.LineProfiler(blosc.decompress)
43+
profile.run('z[:]')
44+
profile.print_stats()

requirements_dev_optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tox==3.23.1
1515
coverage
1616
flake8==3.9.2
1717
pytest-cov==2.12.1
18-
pytest-doctestplus==0.4.0
18+
pytest-doctestplus==0.9.0
1919
h5py==3.2.1
2020
s3fs==2021.6.0
2121
fsspec==2021.6.0

0 commit comments

Comments
 (0)