From 3ad59ec08c12faf5aa8fd494db512588646eb4f6 Mon Sep 17 00:00:00 2001 From: josePereiro Date: Sun, 11 Feb 2024 16:28:31 -0500 Subject: [PATCH 1/3] Fix Annotation parsing issue --- src/utils.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.jl b/src/utils.jl index ec052ef..b3e73d8 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -40,7 +40,9 @@ function parse_annotations_or_notes(x) for (k, vs) in x if isa(vs, String) a_or_n[k] = String[vs] - else + elseif isa(vs, AbstractDict) + a_or_n[k] = String[string(p) for p in collect(vs)] + elseif isa(vs, AbstractVector) a_or_n[k] = String[v for v in vs] end end From 3caf9812f0755aba2e5ecb67935f7eb9441c4250 Mon Sep 17 00:00:00 2001 From: Jose Antonio Pereiro Morejon <44244693+josePereiro@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:36:34 -0500 Subject: [PATCH 2/3] Update src/utils.jl Co-authored-by: Mirek Kratochvil --- src/utils.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index b3e73d8..aa913fb 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -40,10 +40,8 @@ function parse_annotations_or_notes(x) for (k, vs) in x if isa(vs, String) a_or_n[k] = String[vs] - elseif isa(vs, AbstractDict) + elseif isa(vs, AbstractDict) || isa(vs, AbstractVector) a_or_n[k] = String[string(p) for p in collect(vs)] - elseif isa(vs, AbstractVector) - a_or_n[k] = String[v for v in vs] end end return a_or_n From d7e589143c9936f1701ab2c02148eefabdf6d4ba Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sat, 2 Mar 2024 17:36:13 +0100 Subject: [PATCH 3/3] work around the coverage reporting changes in julia-1.10 --- src/grr_utils.jl | 2 +- src/interface.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grr_utils.jl b/src/grr_utils.jl index cfa6dec..eb9da5d 100644 --- a/src/grr_utils.jl +++ b/src/grr_utils.jl @@ -24,7 +24,7 @@ const grr_grammar = begin p(m[i]) || break last = i end - last + return last end # eat one of keywords diff --git a/src/interface.jl b/src/interface.jl index d9c128d..d25b33a 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -210,7 +210,7 @@ function Base.convert(::Type{JSONFBCModel}, mm::A.AbstractFBCModel) I, V = findnz(S[:, ri]) res["metabolites"] = Dict{String,Float64}([met_ids[ii] => vv for (ii, vv) in zip(I, V)]) - res + identity(res) end for (ri, rid) in enumerate(rxn_ids) ]