Repository navigation
Adding python bindings - #4
Merged
Merged
Conversation
Owner
|
Awesome work. Went through the corruption rewrite and it's great: nothing's seeded in the real path, and the alpha and pixel-boundary handling held up across the parallel split. CI's red on this thing: PyO3/maturin-action@v2 doesn't exist, so the python jobs die at "Set up job" before building. Switch both uses (build + publish) to @v1 and it should go green, then I'll merge. |
Contributor
Author
|
@aravpanwar fixed, check the tests and manage how you publish it to PyPI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
python/crate publishing thedecayfmt-pypackage on PyPI (import name:decayfmt).corrupt_bytes(data, x, kind)— decayed copy of immutable bytescorrupt_in_place(buffer, x, kind)— zero-copy decay of abytearrayencode_file(source, output)/encode_bytes(source, output)— encode clean filesdecay_file(path)— open without display: permanently corrupts on disk, returns(kind, dims, bytes)parse_filename(name),read_header(data),write_header(kind, width, height),__version__OSError(I/O),PermissionError(read-only target),ValueError(everything else) — messages match the CLI exactly>=3.11python.yml) — builds and smoke-tests wheels on 5 platforms (manylinux x86_64 + aarch64, macOS arm64 + x86_64, Windows), publishes to PyPI via trusted publishing onpy-v*tagspython/README.md(PyPI long description),python/examples/example.py(every function + every exception),python/RELEASE.md(release checklist), new## Pythonand## Performancesections in root READMEChanged
1 - exp(-x/10)(quantization ≤ 1/65536), image alpha never touched, trailing non-pixel bytes untouched, randomness stays OS-entropy-seeded and never replayablewrite_decayfmt(header + payload streamed); text encode measured 7.9 → 3.9 ms (2.0x)imagedefault features trimmed (avif encode-only dead code, internal rayon); rav1e removed from lockfile. Decode format parity kept (exr retained)members = ["python"]withdefault-members = ["."]; existing CLI CI/release workflows untouchedInternal (no CLI behavior change)
encode::encode_bytes,decode_image,text_payload,write_decayfmt,open::decay_in_placenowpubfor embeddingbenches/, no new dependencies,DECAY_BENCH_MBoverride) and large-payload statistical tests (8 MiB parallel path, seeded determinism, alpha/tail invariance)Notes
decayfmt-py(import staysdecayfmt); releases taggedpy-v*independently of CLIv*tags