obographs-dev
Crate with definitions of Obographs types and I/O functions.
Typically, the library should be used with serde feature enabled
to support parsing Obographs JSON files.
Therefore, the following should be added into Cargo.toml file:
= { = '0.2.1', = ["serde"]}
Note: Check
crates.iofor the latest version and update0.2.1accordingly.
Examples
Create an Obographs type
The Obographs elements can be created programatically.
For instance, the [obographs::model::Edge] can be created as:
use *;
let edge = Edge ;
Read an Obographs JSON file
With serde feature enabled, we can read a JSON file
into a [obographs::model::GraphDocument] by running:
use GraphDocument;
let toy_hpo_json = "tests/test_data/hp.mini.json";
let graph_document = from_path.expect;
assert_eq!;
Tests and benches
Run tests with:
cargo test --features serde
The benchmarks can be run with:
cargo bench --features serde
Disclaimer
The implementation of the Obographs model is INCOMPLETE. Attributes and components may be missing.