diff --git a/Project.toml b/Project.toml index 8fa5ad39710be812814dfebe3887531544e3a3bc..4de1265cbe11ceba8c2499f44e6ce6052e7634fe 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PlanarLarvae" uuid = "c2615984-ef14-4d40-b148-916c85b43307" authors = ["François Laurent", "Institut Pasteur"] -version = "0.11.1" +version = "0.11.2" [deps] DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" @@ -20,6 +20,7 @@ StructTypes = "856f2bd8-1eba-4b0a-8007-ebc267875bd4" [compat] julia = "1.6" +Meshes = "< 0.30.0" [extras] LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" diff --git a/src/Datasets.jl b/src/Datasets.jl index 2b171bff4020ab29a523d89dbf9fab13ff5f9fb5..2f1d85c3200f2dfbfc29e674e3d17b73c2534850 100644 --- a/src/Datasets.jl +++ b/src/Datasets.jl @@ -1254,7 +1254,7 @@ function getdependencies(run::Run, filepath=nothing) deps = String[] for dep in object_or_array_of_objects(run.attributes[:dependencies]) datafile = dep[:filename] - if !isfile(datafile) + if !isnothing(filepath) dirpath = isdir(filepath) ? filepath : dirname(filepath) datafile = joinpath(dirpath, datafile) end diff --git a/src/Formats.jl b/src/Formats.jl index 7a39e9ad89b90ef1458b504c2bc67f862653c55c..81834c20c7ed36c194fa5f0e9c901b6c97dc4b0f 100644 --- a/src/Formats.jl +++ b/src/Formats.jl @@ -689,13 +689,13 @@ The returned array of files can be muted. """ find_associated_files(file::String) = find_associated_files(preload(file)) -function find_associated_files(files::Vector{String}) - unique(find_associated_files.(files)) do f +function find_associated_files(files::AbstractVector) + unique(Iterators.flatmap(find_associated_files, files)) do f f.source end end -find_associated_files(file) = PreloadedFile[file] +find_associated_files(file::PreloadedFile) = PreloadedFile[file] function find_associated_files(file::JSONLabels) getdependencies!(file)