From 4463848acca0be0da580be4925966cb7ef5eaf8e Mon Sep 17 00:00:00 2001 From: JonasIsensee Date: Thu, 11 Jan 2024 08:56:34 +0100 Subject: [PATCH] New version & changelog (#528) * bump version & changelog * update readme and docs * update ci badge --- CHANGELOG.md | 8 ++++++++ LICENSE.md | 2 +- Project.toml | 2 +- README.md | 9 ++++++++- docs/src/index.md | 10 +++++++++- 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36bfc224..131a7901 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.4.42 + - improvements in time-to-first save/load on julia v1.10 and up + - discourage from using custom serialization to `Array` and stop using it internally + as it cannot properly preserve object identity. + - fix inline group `show` + - fix a bug in group loading for the `IOStream` backend + - reduce invalidations to zero + ## 0.4.41 - fix ntuple type with typevar length - fix OpaqueData test (HDF5 compat) diff --git a/LICENSE.md b/LICENSE.md index 430c9286..35ff55a5 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The JLD2.jl package is licensed under the MIT "Expat" License: -> Copyright (c) 2020-2021: Jonas Isensee, and contributors. +> Copyright (c) 2020-2024: Jonas Isensee, and contributors. > Copyright (c) 2015-2017: Simon Kornblith, Google Inc., and contributors. > > Permission is hereby granted, free of charge, to any person obtaining diff --git a/Project.toml b/Project.toml index c6472873..40f87339 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "JLD2" uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -version = "0.4.41" +version = "0.4.42" [deps] FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" diff --git a/README.md b/README.md index 1d7c6004..7bd99df8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | **Documentation** | **Tests** | **CodeCov** | **Downloads** | |:--------:|:---------------:|:-------:|:---:| -|[![](https://img.shields.io/badge/docs-online-blue.svg)](https://JuliaIO.github.io/JLD2.jl/dev)| [![CI](https://github.com/juliaio/JLD2.jl/workflows/CI/badge.svg?branch=master)](https://github.com/JuliaIO/JLD2.jl/actions) | [![codecov.io](https://codecov.io/github/JuliaIO/JLD2.jl/coverage.svg?branch=master)](https://codecov.io/github/JuliaIO/JLD2.jl?branch=master) | [![JLD2 Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/JLD2)](https://pkgs.genieframework.com?packages=JLD2) | +|[![](https://img.shields.io/badge/docs-online-blue.svg)](https://JuliaIO.github.io/JLD2.jl/dev)| [![CI](https://github.com/JuliaIO/JLD2.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaIO/JLD2.jl/actions/workflows/ci.yml) | [![codecov.io](https://codecov.io/github/JuliaIO/JLD2.jl/coverage.svg?branch=master)](https://codecov.io/github/JuliaIO/JLD2.jl?branch=master) | [![JLD2 Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/JLD2)](https://pkgs.genieframework.com?packages=JLD2) | JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5, without any dependency on the HDF5 C library. JLD2 is able to read most HDF5 files created by other HDF5 implementations supporting HDF5 File Format Specification Version 3.0 (i.e. libhdf5 1.10 or later) and similarly those should be able to read the files that JLD2 produces. JLD2 provides read-only support for files created with the JLD package. @@ -142,6 +142,13 @@ or using slashes as path delimiters: @assert load("example.jld2", "mygroup/mystuff") == 42 ``` +When loading files with nested groups these will be unrolled into paths by default but +yield nested dictionaries but with the `nested` keyword argument. +```julia +load("example.jld2") # -> Dict("mygroup/mystuff" => 42) +load("example.jld2"; nested=true) # -> Dict("mygroup" => Dict("mystuff" => 42)) +``` + ### Custom Serialization The API is simple enough, to enable custom serialization for your type `A` you define diff --git a/docs/src/index.md b/docs/src/index.md index c99201cf..f4625f64 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,6 +1,7 @@ # Julia Data Format - JLD2 -JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5, without any dependency on the HDF5 C library. It typically outperforms [the JLD package](https://github.com/JuliaIO/JLD.jl) (sometimes by multiple orders of magnitude) and often outperforms Julia's built-in serializer. While other HDF5 implementations supporting HDF5 File Format Specification Version 3.0 (i.e. libhdf5 1.10 or later) should be able to read the files that JLD2 produces, JLD2 is likely to be incapable of reading files created or modified by other HDF5 implementations. JLD2 does not aim to be backwards or forwards compatible with the JLD package. +JLD2 saves and loads Julia data structures in a format comprising a subset of HDF5, without any dependency on the HDF5 C library. +JLD2 is able to read most HDF5 files created by other HDF5 implementations supporting HDF5 File Format Specification Version 3.0 (i.e. libhdf5 1.10 or later) and similarly those should be able to read the files that JLD2 produces. JLD2 provides read-only support for files created with the JLD package. ## Reading and writing data @@ -140,6 +141,13 @@ or using slashes as path delimiters: @assert load("example.jld2", "mygroup/mystuff") == 42 ``` +When loading files with nested groups these will be unrolled into paths by default but +yield nested dictionaries but with the `nested` keyword argument. +```julia +load("example.jld2") # -> Dict("mygroup/mystuff" => 42) +load("example.jld2"; nested=true) # -> Dict("mygroup" => Dict("mystuff" => 42)) +``` + ### Unpack.jl API When additionally loading the [UnPack.jl](https://github.com/mauro3/UnPack.jl) package, its `@unpack` and `@pack!` macros can be used to quickly save and load data from the file-like interface. Example: