Skip to content

Commit

Permalink
Merge pull request #4 from phinate/register-codec-on-install
Browse files Browse the repository at this point in the history
add install entrypoint for registering codec
  • Loading branch information
peterdudfield authored Jul 18, 2024
2 parents 4cc8a26 + 2d22d2c commit bde8534
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py310"
fix = false
# Group violations by containing file.
format = "github"
ignore-init-module-imports = true

[mccabe]
Expand Down
4 changes: 0 additions & 4 deletions ocf_blosc2/ocf_blosc2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import blosc2
from numcodecs.abc import Codec
from numcodecs.compat import ensure_contiguous_ndarray
from numcodecs.registry import register_codec


class Blosc2(Codec):
Expand Down Expand Up @@ -46,6 +45,3 @@ def __repr__(self):
self.clevel,
)
return r


register_codec(Blosc2)
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
"""
For more detailed information, please check the accompanying README.md.
"""

from pathlib import Path

from setuptools import find_packages, setup
Expand All @@ -20,4 +21,9 @@
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
entry_points={
"numcodecs.codecs": [
"blosc2 = ocf_blosc2:Blosc2",
],
},
)

0 comments on commit bde8534

Please sign in to comment.