Commit 8efebe39 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

clean up the converter types

Paul reported in #64 that empty parameter list actually causes this to break
because the generated Any can't downcast to String automagically, which should
be fixed.
parent 0949dfac
......@@ -24,7 +24,9 @@ A converter that runs the SBML conversion routine, with specified conversion
options. The argument is a vector of pairs to allow specifying the order of
conversions.
"""
libsbml_convert(conversion_options::Vector{Pair{String,Dict{String,String}}}) =
libsbml_convert(
conversion_options::AbstractVector{Pair{String,AbstractDict{String,String}}},
) =
doc -> begin
for (converter, options) in conversion_options
props = ccall(sbml(:ConversionProperties_create), VPtr, ())
......@@ -55,8 +57,9 @@ Quickly construct a single run of a `libsbml` converter from keyword arguments.
readSBML("example.xml", libsbml_convert("stripPackage", package="layout"))
```
"""
libsbml_convert(converter::String; kwargs...) =
libsbml_convert([converter => Dict(string(k) => string(v) for (k, v) in kwargs)])
libsbml_convert(converter::String; kwargs...) = libsbml_convert([
converter => Dict{String,String}(string(k) => string(v) for (k, v) in kwargs),
])
"""
convert_simplify_math
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment