Developer API
NetworkFileFormat is a developer extension interface. It is stable for packages that add an importer, but applications should normally use one of the concrete formats documented on the API page.
Extending an importer
To support another serialized reaction-network format:
- Define a concrete subtype of
NetworkFileFormat. - Implement
ReactionNetworkImporters.loadrxnetwork(::YourFormat, input; kwargs...). - Return a Catalyst
ReactionSystem; forwardnameand other supported keywords to theReactionSystemconstructor where applicable. - Document the accepted
input, the file-format rules, and any metadata the importer adds to the returned system.
The generic loadrxnetwork function is the extension point. Extensions must not overload a concrete built-in importer type or rely on parser internals.
ReactionNetworkImporters.NetworkFileFormat — Type
NetworkFileFormatAbstract developer interface for reaction-network file-format selectors.
Extension rules
- Define a concrete subtype for each supported external format.
- Extend
loadrxnetworkfor that subtype and the format's input. - Return a Catalyst
ReactionSystem; do not mutate parser-global state. - Keep format-specific parser helpers private. Downstream packages should only rely on this type and
loadrxnetwork.
Fields
Concrete subtypes may store format-specific configuration. The built-in selectors are fieldless.
Examples
using ReactionNetworkImporters
struct ExampleFormat <: ReactionNetworkImporters.NetworkFileFormat end
ExampleFormat() isa ReactionNetworkImporters.NetworkFileFormat
# output
true