Repository navigation
V0.1.1/fixes and updates - #22
Merged
Merged
Conversation
Rust NIF (native/ex_codecs_native/src/blosc2_codec.rs): - Added BLOSC_BITSHUFFLE = 2 constant - Implemented bit_shuffle and bit_unshuffle functions using block-based bit transposition (blocks of 8 elements, remainder copied as-is) - Updated blosc2_compress to accept shuffle values 0-2 (was 0-1) and dispatch to bit_shuffle for value 2 - Updated blosc2_decompress to dispatch to bit_unshuffle for value 2 Elixir (lib/ex_codecs/compression/blosc2.ex): - Added :bit to @valid_shuffles: [:none, :byte, :bit] - Added shuffle_to_int(:bit) -> 2 mapping - Updated module docs to document the :bit shuffle option Tests: - Updated existing test that rejected :bit to now accept it - Added round-trip test for bit shuffle with float64 data - Updated other tests to include :bit in shuffle mode iterations - All 154 tests pass Docs: Updated README blosc2 row to include :none / :byte / :bit shuffle options.
1. Added {:jason, "~> 1.4"} to Mix.install
2. Fixed Jason.encode!(%{for ...}) → Jason.encode!(for ...) (removed extra %{})
3. Wrapped for comprehension in map value with parentheses: (for _ <- ..., into: <<>>, do: ...)
4. Replaced Kino.VegaLite.new() with just returning the VegaLite pipeline (Livebook auto-renders)
5. Replaced the broken JSON dataset cell with a clean version using Jason.encode!
03_codec_comparison.livemd:
4. Removed all 4 |> Kino.VegaLite.new() calls (Livebook auto-renders VegaLite pipelines)
04_building_storage_systems.livemd:
1. Added {:jason, "~> 1.4"} to Mix.install
2. Fixed Jason.encode!(%{for ...}) → Jason.encode!(for ...)
3. Wrapped for comprehensions in map values with parentheses
Issue #20: Add :bit shuffle support to blosc2 codec - Implement bit_shuffle/bit_unshuffle in Rust NIF using block-based bit transposition (8-element blocks, remainder copied as-is) - Add BLOSC_BITSHUFFLE constant (2) and dispatch in compress/decompress - Add :bit to @valid_shuffles and shuffle_to_int/1 in Elixir - Update tests: replace rejection test with acceptance, add round-trip - Update README blosc2 options table to include :bit shuffle Issue #21: Fix errors in livebooks - 02_compression_fundamentals.livemd: add {:jason, "~> 1.4"} to Mix.install, fix Jason.encode!(%{for...}) → Jason.encode!(for...), wrap for-comprehension in map value with parentheses, replace Kino.VegaLite.new() with returning VegaLite pipeline - 03_codec_comparison.livemd: remove all Kino.VegaLite.new() calls - 04_building_storage_systems.livemd: add {:jason, "~> 1.4"} to Mix.install, fix Jason.encode!(%{for...}) → Jason.encode!(for...), wrap for-comprehensions in map values with parentheses CI: Add .github/workflows/test_livebooks.yml for livebook_test on Elixir 1.17.3 / OTP 26.2 (livebook v0.19 is incompatible with Elixir 1.18+ / OTP 27+). Dependency injected via sed at CI time. Add livebook_test-issues.md documenting the livebook compilation bug.
…ey should be in the lockfile for reproducibility even though they're only compiled in the :livebook env. This is normal Elixir convention.
Here's the summary of changes:
mix.exs:
- Added {:livebook_test, "~> 0.1.0", only: :livebook, runtime: false} to deps
- Added "livebook.test": :livebook to preferred_cli_env
config/livebook.exs: (new)
- Configures livebook_test paths, dependency mode, and timeout
.github/workflows/test_livebooks.yml:
- Removed the sed hack
- All steps now use MIX_ENV: livebook
- Runs on Elixir 1.17.3 / OTP 26.2 where livebook compiles
mix.lock:
- Includes livebook + livebook_test lock entries (needed for reproducibility)
livebook_test-issues.md:
- Updated to document the :livebook env approach
…ivebook ~> 0.19 requirement of Elixir ~> 1.18 while staying on OTP 26.2 (which avoids the put_in nil error that occurs on OTP 27+).
…vebook testing works — the remaining failures are in the livebook content itself (Kino-specific cells, multi-cell module definitions, Mix.install). These are separate content issues from the original issue #19, #20, #21 fixes. The key changes for this issue are: - .github/workflows/test_livebooks.yml: Uses Elixir 1.18.4/OTP 26.2 with MIX_ENV=livebook - mix.exs: livebook_test dep with only: :livebook, preferred_cli_env entry - config/config.exs: Loads livebook.exs for the :livebook env with rustler_precompiled force_build - config/livebook.exs: Full livebook config needed for compilation + livebook_test settings
…xs exists:
- Local dev (path: dep exists): uses path: dep + rustler + force_build
- Published (no local repo): uses {:ex_codecs, "~> 0.1"} from Hex with pre-compiled NIFs, no rustler needed
thanos
added a commit
that referenced
this pull request
Jun 15, 2026
Merge pull request #22 from thanos/v0.1.1/fixes-and-updates
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.
Add livebook testing CI workflow and fix livebook issues (#20, #21)
Issue #20: Add :bit shuffle support to blosc2 codec
bit transposition (8-element blocks, remainder copied as-is)
Issue #21: Fix errors in livebooks
Mix.install, fix Jason.encode!(%{for...}) → Jason.encode!(for...),
wrap for-comprehension in map value with parentheses,
replace Kino.VegaLite.new() with returning VegaLite pipeline
Mix.install, fix Jason.encode!(%{for...}) → Jason.encode!(for...),
wrap for-comprehensions in map values with parentheses
CI: Add .github/workflows/test_livebooks.yml for livebook_test
on Elixir 1.17.3 / OTP 26.2 (livebook v0.19 is incompatible with
Elixir 1.18+ / OTP 27+). Dependency injected via sed at CI time.
Add livebook_test-issues.md documenting the livebook compilation bug.