Skip to content

Commit

Permalink
Merge branch 'main' into fix_1121
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmoore authored Feb 14, 2024
2 parents a9b13a0 + 0b0ac88 commit b11e8d0
Show file tree
Hide file tree
Showing 71 changed files with 6,313 additions and 5,561 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# lint codebase with black and ruff
4e348d6b80c96da461fd866576c971b8a659ba15
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ body:
attributes:
label: Python Version
description: Version of Python interpreter
placeholder: 3.8.5, 3.9, 3.10, etc.
placeholder: 3.9, 3.10, 3.11, etc.
validations:
required: true
- type: input
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -69,4 +69,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
4 changes: 2 additions & 2 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.2.0
uses: conda-incubator/setup-miniconda@v3.0.1
with:
channels: conda-forge
environment-file: environment.yml
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
numpy_version: ['>=1.22.0', '==1.20.*']
python-version: ['3.9', '3.10', '3.11']
numpy_version: ['>=1.22.0', '==1.21.*']
exclude:
- python-version: '3.10'
numpy_version: '==1.20.*'
numpy_version: '==1.21.*'
- python-version: '3.11'
numpy_version: '==1.20.*'
numpy_version: '==1.21.*'
services:
redis:
image: redis
Expand All @@ -38,11 +38,11 @@ jobs:
ports:
- 27017:27017
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.2.0
uses: conda-incubator/setup-miniconda@v3.0.1
with:
channels: conda-forge
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
pytest --cov=zarr --cov-config=pyproject.toml --doctest-plus --cov-report xml --cov=./ --timeout=300
- uses: codecov/codecov-action@v3
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: actions/setup-python@v4.6.0
- uses: actions/setup-python@v5.0.0
name: Install Python
with:
python-version: '3.8'
python-version: '3.9'

- name: Install PyBuild
run: |
Expand All @@ -36,7 +36,7 @@ jobs:
else
echo "All seem good"
fi
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: releases
path: dist
Expand All @@ -45,7 +45,7 @@ jobs:
needs: [build_artifacts]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
Expand All @@ -60,11 +60,11 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
- uses: pypa/[email protected].7
- uses: pypa/[email protected].11
with:
user: __token__
password: ${{ secrets.pypi_password }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
strategy:
fail-fast: True
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2.2.0
- uses: conda-incubator/setup-miniconda@v3.0.1
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ coverage.xml

# Sphinx documentation
docs/_build/
docs/_autoapi/

# PyBuilder
target/
Expand All @@ -77,3 +78,5 @@ zarr/version.py
#doesnotexist
#test_sync*
data/*

.DS_Store
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"
autofix_prs: false
default_stages: [commit, push]
default_language_version:
python: python3
repos:
- repo: https:/PyCQA/flake8
rev: 6.0.0
- repo: https:/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.1.14'
hooks:
- id: flake8
args: [
--max-line-length=100
]
exclude: ^(venv/|docs/)
types: ['python']
- id: ruff
- repo: https:/psf/black
rev: 23.12.1
hooks:
- id: black
- repo: https:/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
args: ["-L", "ba,ihs,kake,nd,noe,nwo,te,fo", "-S", "fixture"]
- repo: https:/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- repo: https:/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.8.0
hooks:
- id: mypy
files: zarr
Expand Down
3 changes: 0 additions & 3 deletions .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ requirements:
- requirements_dev_optional.txt:
pin: True
update: all
- requirements_rtfd.txt:
pin: False
update: False
6 changes: 5 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ build:

sphinx:
configuration: docs/conf.py
fail_on_warning: true

python:
install:
- requirements: requirements_rtfd.txt
- method: pip
path: .
extra_requirements:
- docs

formats: all
46 changes: 0 additions & 46 deletions CODE_OF_CONDUCT.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2022 Zarr Developers <https:/zarr-developers>
Copyright (c) 2015-2023 Zarr Developers <https:/zarr-developers>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 26 additions & 0 deletions TEAM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Active core-developers
- @joshmoore (Josh Moore)
- @jni (Juan Nunez-Iglesias)
- @rabernat (Ryan Abernathey)
- @jhamman (Joe Hamman)
- @d-v-b (Davis Bennett)
- @jakirkham (jakirkham)
- @martindurant (Martin Durant)
- @normanrz (Norman Rzepka)

## Emeritus core-developers
- @alimanfoo (Alistair Miles)
- @shoyer (Stephan Hoyer)
- @ryan-williams (Ryan Williams)
- @jrbourbeau (James Bourbeau)
- @mzjp2 (Zain Patel)
- @grlee77 (Gregory Lee)

## Former core-developers
- @jeromekelleher (Jerome Kelleher)
- @tjcrone (Tim Crone)
- @funkey (Jan Funke)
- @shikharsg
- @Carreau (Matthias Bussonnier)
- @dazzag24
- @WardF (Ward Fisher)
26 changes: 14 additions & 12 deletions bench/compress_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,39 @@
from zarr import blosc

if __name__ == "__main__":

sys.path.insert(0, '..')
sys.path.insert(0, "..")

# setup
a = np.random.normal(2000, 1000, size=200000000).astype('u2')
z = zarr.empty_like(a, chunks=1000000,
compression='blosc',
compression_opts=dict(cname='lz4', clevel=5, shuffle=2))
a = np.random.normal(2000, 1000, size=200000000).astype("u2")
z = zarr.empty_like(
a,
chunks=1000000,
compression="blosc",
compression_opts=dict(cname="lz4", clevel=5, shuffle=2),
)
print(z)

print('*' * 79)
print("*" * 79)

# time
t = timeit.repeat('z[:] = a', repeat=10, number=1, globals=globals())
t = timeit.repeat("z[:] = a", repeat=10, number=1, globals=globals())
print(t)
print(min(t))
print(z)

# profile
profile = line_profiler.LineProfiler(blosc.compress)
profile.run('z[:] = a')
profile.run("z[:] = a")
profile.print_stats()

print('*' * 79)
print("*" * 79)

# time
t = timeit.repeat('z[:]', repeat=10, number=1, globals=globals())
t = timeit.repeat("z[:]", repeat=10, number=1, globals=globals())
print(t)
print(min(t))

# profile
profile = line_profiler.LineProfiler(blosc.decompress)
profile.run('z[:]')
profile.run("z[:]")
profile.print_stats()
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXOPTS = -W --keep-going
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ html[data-theme=dark] h1 {

html[data-theme=dark] h3 {
color: #0a6774;
}
}
2 changes: 1 addition & 1 deletion docs/acknowledgments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ documentation, code reviews, comments and/or ideas:
* :user:`gsakkis`
* :user:`hailiangzhang <hailiangzhang>`
* :user:`pmav99 <pmav99>`
* :user:`sbalmer <sbalmer>`
* :user:`sbalmer <sbalmer>`
Loading

0 comments on commit b11e8d0

Please sign in to comment.