Skip to content

Commit

Permalink
Move code to BloscExt rather H5Zblosc, reconcile other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitti committed Nov 14, 2024
1 parent 502ea93 commit cb3c6f4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 41 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
strategy:
matrix:
version:
- '1.6'
- '1.9'
- '1.10'
- '1'
os:
- ubuntu-20.04 # required for libhdf5 v1.10.4 support
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MPIPreferences = "0.1.7"
Preferences = "1.3"
Requires = "1.0"
bitshuffle_jll = "0.4.2, 0.5"
julia = "1.6"
julia = "1.9"

[extensions]
BloscExt = "Blosc"
Expand Down
33 changes: 1 addition & 32 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ version = "0.7.3"

[[deps.Blosc_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"]

git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23"
uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9"
version = "1.21.6+0"
Expand Down Expand Up @@ -142,18 +141,6 @@ git-tree-sha1 = "ea372033d09e4552a04fd38361cd019f9003f4f4"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.46.2+0"

[[deps.Git]]
deps = ["Git_jll"]
git-tree-sha1 = "04eff47b1354d702c3a85e8ab23d539bb7d5957e"
uuid = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2"
version = "1.3.1"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
git-tree-sha1 = "ea372033d09e4552a04fd38361cd019f9003f4f4"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.46.2+0"

[[deps.H5Zbitshuffle]]
deps = ["HDF5", "bitshuffle_jll"]
path = "../filters/H5Zbitshuffle"
Expand Down Expand Up @@ -185,7 +172,7 @@ uuid = "f6f2d980-1ec6-471c-a70d-0270e22f1103"
version = "0.2.0"

[[deps.HDF5]]
deps = ["Compat", "H5Zblosc", "HDF5_jll", "Libdl", "MPIPreferences", "Mmap", "Preferences", "Printf", "Random", "Requires", "UUIDs"]
deps = ["Compat", "HDF5_jll", "Libdl", "MPIPreferences", "Mmap", "Preferences", "Printf", "Random", "Requires", "UUIDs"]
path = ".."
uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
version = "0.17.1"
Expand Down Expand Up @@ -285,12 +272,6 @@ git-tree-sha1 = "61dfdba58e585066d8bce214c5a51eaa0539f269"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.17.0+1"

[[deps.Libiconv_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175"
uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531"
version = "1.17.0+0"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
version = "1.11.0"
Expand Down Expand Up @@ -344,12 +325,6 @@ git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899"
uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
version = "0.1.2"

[[deps.MarkdownAST]]
deps = ["AbstractTrees", "Markdown"]
git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899"
uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391"
version = "0.1.2"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
Expand Down Expand Up @@ -444,12 +419,6 @@ git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51"
uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3"
version = "0.1.0"

[[deps.RegistryInstances]]
deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"]
git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51"
uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3"
version = "0.1.0"

[[deps.Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7"
Expand Down
1 change: 0 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ makedocs(;
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://JuliaIO.github.io/HDF5.jl",
size_threshold=1024 * 1024, # 1 MiB
assets=String[],
sidebar_sitename=false,
# api_bindings.md will be large, consider splitting it up
Expand Down
7 changes: 7 additions & 0 deletions ext/BloscExt/BloscExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import HDF5.Filters:
set_local_func,
set_local_cfunc
import HDF5.Filters.Shuffle
import HDF5: Properties
import HDF5: set_blosc!

export H5Z_FILTER_BLOSC, blosc_filter, BloscFilter

Expand Down Expand Up @@ -216,6 +218,11 @@ function Base.push!(f::FilterPipeline, blosc::BloscFilter)
return f
end

# legacy support
set_blosc!(p::Properties, val::Bool) = val && push!(FilterPipeline(p), BloscFilter())
set_blosc!(p::Properties, level::Integer) =
push!(FilterPipeline(p), BloscFilter(; level=level))

function __init__()
register_filter(BloscFilter)
end
Expand Down
6 changes: 0 additions & 6 deletions filters/H5Zblosc/src/H5Zblosc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ using HDF5: HDF5

# The next block of lines can be removed
using HDF5.API
import HDF5: Properties
import HDF5: set_blosc!
import HDF5.Filters: Filter, FilterPipeline
import HDF5.Filters:
filterid,
Expand All @@ -29,10 +27,6 @@ const BloscExt = Base.get_extension(HDF5, :BloscExt)
using .BloscExt: blosc_filter
using .BloscExt: BloscFilter

set_blosc!(p::Properties, val::Bool) = val && push!(FilterPipeline(p), BloscFilter())
set_blosc!(p::Properties, level::Integer) =
push!(FilterPipeline(p), BloscFilter(; level=level))

using .BloscExt: H5Z_FILTER_BLOSC
using .BloscExt: FILTER_BLOSC_VERSION
using .BloscExt: blosc_name
Expand Down

0 comments on commit cb3c6f4

Please sign in to comment.