obographs-dev
Crate with definitions of Obographs types and I/O functions.
Examples
How to use
Obographs-dev is deployed on crates.io, so including in a project is really easy.
Just add the following into your Cargo.toml file:
= "0.2.1"
Note: Check
crates.iofor the latest version and update0.2.1accordingly.
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
The serde feature is enabled by default,
to support reading a JSON file into a [obographs::model::GraphDocument]:
use GraphDocument;
let toy_hpo_json = "tests/test_data/hp.mini.json";
let graph_document = from_path.expect;
assert_eq!;
Tests and benches
Run the unit, integration, and documentation tests with:
cargo test
The benchmarks can be run with:
cargo bench
Disclaimer
The implementation of the Obographs model is INCOMPLETE. Attributes and components may be missing.