diff --git a/Project.toml b/Project.toml index effa5eff15d35ac9c190c55746c892cf5c09d516..14fa5dfeab20062d91a0927f8d803c4d3b42e14f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TaggingBackends" uuid = "e551f703-3b82-4335-b341-d497b48d519b" authors = ["François Laurent", "Institut Pasteur"] -version = "0.15" +version = "0.15.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/pyproject.toml b/pyproject.toml index 1b0e1297778318b18d3468c56e17abb79b80523d..7445c9c4fbf8ad4b8f2ac8811a4842a190fe08c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "TaggingBackends" -version = "0.15" +version = "0.15.1" description = "Backbone for LarvaTagger.jl tagging backends" authors = ["François Laurent"] diff --git a/src/LarvaDatasets.jl b/src/LarvaDatasets.jl index 1c1291682409dff8154b2078cac0d432400d24be..8188429153f1f25c3387aee6a23d671981116271 100644 --- a/src/LarvaDatasets.jl +++ b/src/LarvaDatasets.jl @@ -540,7 +540,7 @@ Known issue: ASCII-compatible string attributes are ASCII encoded and deserializ by the *h5py* Python library. """ function write_larva_dataset_hdf5(output_dir::String, - input_data::Union{String, <:AbstractVector}, + input_data::Union{Repository, String, <:AbstractVector}, window_length::Int=20; labels::Union{Nothing, <:AbstractVector{String}}=nothing, labelpointers::Union{Nothing, <:AbstractDict{String, Vector{Tuple{Int, Int, Int}}}}=nothing, @@ -619,7 +619,7 @@ function new_write_larva_dataset_hdf5(output_dir, input_data; @assert !isnothing(frameinterval) window = TimeWindow(window_length * frameinterval, round(Int, 1 / frameinterval); maggotuba_compatibility=past_future_extensions) - index = if startswith(balancing_strategy, "max:") + index = if !isnothing(balancing_strategy) && startswith(balancing_strategy, "max:") # `includeall` not supported maxcount = parse(Int, balancing_strategy[5:end]) capacitysampling(labels, maxcount; seed=seed)