numcodecs-wasm-round 0.2.0.dev0__tar.gz → 0.2.1.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/PKG-INFO +2 -2
  2. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/pyproject.toml +2 -2
  3. numcodecs_wasm_round-0.2.1.dev1/src/numcodecs_wasm_round/__init__.py +15 -0
  4. numcodecs_wasm_round-0.2.1.dev1/src/numcodecs_wasm_round/__init__.pyi +90 -0
  5. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/src/numcodecs_wasm_round/codec.wasm +0 -0
  6. numcodecs_wasm_round-0.2.1.dev1/src/numcodecs_wasm_round/py.typed +0 -0
  7. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/src/numcodecs_wasm_round.egg-info/PKG-INFO +2 -2
  8. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/src/numcodecs_wasm_round.egg-info/SOURCES.txt +2 -0
  9. numcodecs_wasm_round-0.2.1.dev1/src/numcodecs_wasm_round.egg-info/requires.txt +1 -0
  10. numcodecs_wasm_round-0.2.0.dev0/src/numcodecs_wasm_round/__init__.py +0 -13
  11. numcodecs_wasm_round-0.2.0.dev0/src/numcodecs_wasm_round.egg-info/requires.txt +0 -1
  12. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/LICENSE +0 -0
  13. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/README.md +0 -0
  14. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/setup.cfg +0 -0
  15. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/src/numcodecs_wasm_round.egg-info/dependency_links.txt +0 -0
  16. {numcodecs_wasm_round-0.2.0.dev0 → numcodecs_wasm_round-0.2.1.dev1}/src/numcodecs_wasm_round.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: numcodecs_wasm_round
3
- Version: 0.2.0.dev0
3
+ Version: 0.2.1.dev1
4
4
  Summary: numcodecs-round compression codec compiled to WebAssembly
5
5
  Author-email: Juniper Tyree <juniper.tyree@helsinki.fi>
6
6
  Maintainer-email: Juniper Tyree <juniper.tyree@helsinki.fi>
@@ -382,7 +382,7 @@ License: Copyright (c) 2024-2025, Juniper Tyree
382
382
 
383
383
  Requires-Python: >=3.10
384
384
  Description-Content-Type: text/markdown
385
- Requires-Dist: numcodecs-wasm==0.1.0.dev0
385
+ Requires-Dist: numcodecs-wasm==0.1.0.dev1
386
386
 
387
387
  [![CI Status]][workflow]
388
388
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "numcodecs_wasm_round"
7
- version = "0.2.0.dev0"
7
+ version = "0.2.1.dev1"
8
8
  description = "numcodecs-round compression codec compiled to WebAssembly"
9
9
 
10
10
  authors = [{ name = "Juniper Tyree", email = "juniper.tyree@helsinki.fi" }]
@@ -16,7 +16,7 @@ license = { file = "LICENSE" }
16
16
  requires-python = ">=3.10"
17
17
 
18
18
  dependencies = [
19
- "numcodecs-wasm==0.1.0.dev0", # wasi 0.2.2
19
+ "numcodecs-wasm==0.1.0.dev1", # wasi 0.2.2
20
20
  ]
21
21
 
22
22
  [tool.setuptools.packages.find]
@@ -0,0 +1,15 @@
1
+ __all__ = ["Round"]
2
+
3
+ import importlib.resources
4
+ import sys
5
+
6
+ from numcodecs_wasm import WasmCodecMeta
7
+
8
+
9
+ class Round(
10
+ metaclass=WasmCodecMeta,
11
+ wasm=importlib.resources.files(
12
+ sys.modules[__name__]
13
+ ).joinpath("codec.wasm").read_bytes(),
14
+ ):
15
+ pass
@@ -0,0 +1,90 @@
1
+ __all__ = ['Round']
2
+
3
+ import numcodecs.abc
4
+
5
+ class Round(numcodecs.abc.Codec):
6
+ r"""
7
+ Codec that rounds the data on encoding and passes through the input
8
+ unchanged during decoding.
9
+
10
+ The codec only supports floating point data.
11
+
12
+ Parameters
13
+ ----------
14
+ precision : ...
15
+ Precision of the rounding operation
16
+ """
17
+
18
+ def __init__(self, precision): ...
19
+
20
+ codec_id = 'round'
21
+
22
+ def decode(self, buf, out=None):
23
+ r"""
24
+ Decode the data in `buf`.
25
+
26
+ Parameters
27
+ ----------
28
+ buf : Buffer
29
+ Encoded data. May be any object supporting the new-style buffer
30
+ protocol.
31
+ out : Buffer, optional
32
+ Writeable buffer to store decoded data. N.B. if provided, this buffer must
33
+ be exactly the right size to store the decoded data.
34
+
35
+ Returns
36
+ -------
37
+ dec : Buffer
38
+ Decoded data. May be any object supporting the new-style
39
+ buffer protocol.
40
+ """
41
+ ...
42
+
43
+ def encode(self, buf):
44
+ r"""
45
+ Encode the data in `buf`.
46
+
47
+ Parameters
48
+ ----------
49
+ buf : Buffer
50
+ Data to be encoded. May be any object supporting the new-style
51
+ buffer protocol.
52
+
53
+ Returns
54
+ -------
55
+ enc : Buffer
56
+ Encoded data. May be any object supporting the new-style buffer
57
+ protocol.
58
+ """
59
+ ...
60
+
61
+ @classmethod
62
+ def from_config(cls, config):
63
+ r"""
64
+ Instantiate the codec from a configuration [`dict`][dict].
65
+
66
+ Parameters
67
+ ----------
68
+ config : dict
69
+ Configuration of the codec.
70
+
71
+ Returns
72
+ -------
73
+ codec : Self
74
+ Instantiated codec.
75
+ """
76
+ ...
77
+
78
+ def get_config(self):
79
+ r"""
80
+ Returns the configuration of the codec.
81
+
82
+ [`numcodecs.registry.get_codec(config)`][numcodecs.registry.get_codec]
83
+ can be used to reconstruct this codec from the returned config.
84
+
85
+ Returns
86
+ -------
87
+ config : dict
88
+ Configuration of the codec.
89
+ """
90
+ ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: numcodecs_wasm_round
3
- Version: 0.2.0.dev0
3
+ Version: 0.2.1.dev1
4
4
  Summary: numcodecs-round compression codec compiled to WebAssembly
5
5
  Author-email: Juniper Tyree <juniper.tyree@helsinki.fi>
6
6
  Maintainer-email: Juniper Tyree <juniper.tyree@helsinki.fi>
@@ -382,7 +382,7 @@ License: Copyright (c) 2024-2025, Juniper Tyree
382
382
 
383
383
  Requires-Python: >=3.10
384
384
  Description-Content-Type: text/markdown
385
- Requires-Dist: numcodecs-wasm==0.1.0.dev0
385
+ Requires-Dist: numcodecs-wasm==0.1.0.dev1
386
386
 
387
387
  [![CI Status]][workflow]
388
388
 
@@ -2,7 +2,9 @@ LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
4
  src/numcodecs_wasm_round/__init__.py
5
+ src/numcodecs_wasm_round/__init__.pyi
5
6
  src/numcodecs_wasm_round/codec.wasm
7
+ src/numcodecs_wasm_round/py.typed
6
8
  src/numcodecs_wasm_round.egg-info/PKG-INFO
7
9
  src/numcodecs_wasm_round.egg-info/SOURCES.txt
8
10
  src/numcodecs_wasm_round.egg-info/dependency_links.txt
@@ -0,0 +1 @@
1
+ numcodecs-wasm==0.1.0.dev1
@@ -1,13 +0,0 @@
1
- __all__ = ["Round"]
2
-
3
- import importlib.resources
4
- import sys
5
-
6
- from numcodecs_wasm import WasmCodecMeta
7
-
8
-
9
- with importlib.resources.as_file(
10
- importlib.resources.files(sys.modules[__name__]).joinpath("codec.wasm")
11
- ) as wasm:
12
- class Round(metaclass=WasmCodecMeta, wasm=wasm):
13
- pass
@@ -1 +0,0 @@
1
- numcodecs-wasm==0.1.0.dev0