Skip to content

Commit 1a24872

Browse files
topolaritygbaraldimkitti
authored
Move set_blosc! methods to H5ZBlosc.jl (#1167)
* Move `set_blosc!` methods to H5ZBlosc.jl As far as I can tell, this usage of Requires was entirely unnecessary since the package it was "extending" already depends on HDF5.jl Co-authored-by: Gabriel Baraldi <[email protected]> * Bump `docs` Manifest.toml This is needed to pick up Documenter 1.4.0 which supports fully-qualified `@ref` links. * Fix downstream CI to dev filter packages * Bump `H5Zblosc` version number and add compat bound * Remove H5Zblosc `[compat]` bound There's already an HDF5 compat bound in H5Zblosc - that one just needs to be kept up-to-date. * Move code to BloscExt rather H5Zblosc, reconcile other changes * Refer to BloscExt.BloscFilter rather than H5Zblosc.BloscFilter * Remove Julia 1.6 references from CI.yml --------- Co-authored-by: Gabriel Baraldi <[email protected]> Co-authored-by: Mark Kittisopikul <[email protected]> Co-authored-by: Mark Kittisopikul <[email protected]>
1 parent 038f96c commit 1a24872

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

Diff for: .github/workflows/CI.yml

+12-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
strategy:
1717
matrix:
1818
version:
19-
- '1.6'
19+
- '1.9'
20+
- '1.10'
2021
- '1'
2122
os:
2223
- ubuntu-20.04 # required for libhdf5 v1.10.4 support
@@ -50,9 +51,9 @@ jobs:
5051
fail-fast: false
5152
matrix:
5253
version:
53-
- '1.6'
54+
- '1.9'
55+
- '1.10'
5456
- '1'
55-
- '1.11-nightly'
5657
- 'nightly'
5758
os:
5859
- ubuntu-latest
@@ -66,14 +67,8 @@ jobs:
6667
arch: x86
6768
- os: ubuntu-latest # excluded because HDF5_jll v1.12 does not support i686
6869
arch: x86
69-
- version: '1.6'
70-
arch: x86
7170
- version: 'nightly'
7271
arch: x86
73-
- version: '1.6'
74-
os: macOS-latest
75-
- version: '1.6'
76-
os: windows-latest
7772
steps:
7873
- uses: actions/checkout@v4
7974
- uses: julia-actions/setup-julia@latest
@@ -123,7 +118,14 @@ jobs:
123118
using Pkg
124119
try
125120
# force it to use this PR's version of the package
126-
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
121+
Pkg.develop(PackageSpec[ # resolver may fail with main deps
122+
PackageSpec(path="."),
123+
PackageSpec(path="./filters/H5Zbitshuffle"),
124+
PackageSpec(path="./filters/H5Zblosc"),
125+
PackageSpec(path="./filters/H5Zbzip2"),
126+
PackageSpec(path="./filters/H5Zlz4"),
127+
PackageSpec(path="./filters/H5Zzstd"),
128+
])
127129
Pkg.update()
128130
Pkg.test() # resolver may fail with test time deps
129131
catch err

Diff for: Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ MPIPreferences = "0.1.7"
2626
Preferences = "1.3"
2727
Requires = "1.0"
2828
bitshuffle_jll = "0.4.2, 0.5"
29-
julia = "1.6"
29+
julia = "1.9"
3030

3131
[extensions]
3232
BloscExt = "Blosc"

Diff for: ext/BloscExt/BloscExt.jl

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import HDF5.Filters:
1313
set_local_func,
1414
set_local_cfunc
1515
import HDF5.Filters.Shuffle
16+
import HDF5: Properties
17+
import HDF5: set_blosc!
1618

1719
export H5Z_FILTER_BLOSC, blosc_filter, BloscFilter
1820

@@ -216,6 +218,11 @@ function Base.push!(f::FilterPipeline, blosc::BloscFilter)
216218
return f
217219
end
218220

221+
# legacy support
222+
set_blosc!(p::Properties, val::Bool) = val && push!(FilterPipeline(p), BloscFilter())
223+
set_blosc!(p::Properties, level::Integer) =
224+
push!(FilterPipeline(p), BloscFilter(; level=level))
225+
219226
function __init__()
220227
register_filter(BloscFilter)
221228
end

Diff for: src/HDF5.jl

-7
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,6 @@ function __init__()
129129
)
130130
end
131131

132-
@require H5Zblosc = "c8ec2601-a99c-407f-b158-e79c03c2f5f7" begin
133-
set_blosc!(p::Properties, val::Bool) =
134-
val && push!(Filters.FilterPipeline(p), H5Zblosc.BloscFilter())
135-
set_blosc!(p::Properties, level::Integer) =
136-
push!(Filters.FilterPipeline(p), H5Zblosc.BloscFilter(; level=level))
137-
end
138-
139132
return nothing
140133
end
141134

Diff for: src/properties.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ Properties used when creating a new `Dataset`. Inherits from
451451
The following options are shortcuts for the various filters, and are set-only.
452452
They will be appended to the filter pipeline in the order in which they appear
453453
454-
- `blosc = true | level`: set the [`H5Zblosc.BloscFilter`](@ref) compression
454+
- `blosc = true | level`: set the [`BloscExt.BloscFilter`](@ref) compression
455455
filter; argument can be either `true`, or the compression level.
456456
457457
- `deflate = true | level`: set the [`Filters.Deflate`](@ref) compression

0 commit comments

Comments
 (0)