#obo #ontology #serde #obofoundry #foundry

obofoundry

Structures to deserialize OBO Foundry listings into

7 releases (4 breaking)

✓ Uses Rust 2018 edition

0.5.0 Feb 28, 2020
0.4.0 Sep 28, 2019
0.3.0 Aug 7, 2019
0.2.0 Jun 11, 2019
0.1.2 Mar 31, 2019

#36 in Science

Download history 12/week @ 2019-11-29 26/week @ 2019-12-06 341/week @ 2019-12-13 3/week @ 2019-12-20 6/week @ 2019-12-27 9/week @ 2020-01-03 112/week @ 2020-01-10 83/week @ 2020-01-17 13/week @ 2020-01-24 4/week @ 2020-01-31 36/week @ 2020-02-07 3/week @ 2020-02-14 31/week @ 2020-02-21 57/week @ 2020-02-28 14/week @ 2020-03-06 22/week @ 2020-03-13

231 downloads per month
Used in 2 crates

MIT license

20KB
316 lines

obofoundry.rs Star me

Structures to deserialize OBO Foundry listings into.

TravisCI Codecov License Source Crate Documentation Changelog

Usage

Add the obofoundry crate to the Cargo.toml manifest, as well as either serde_yaml or serde_json:

[dependencies]
obofoundry = "0.1"
serde_yaml = "0.8"

Then use the serde framework to load the listings:

extern crate obofoundry;
extern crate serde_yaml;

let yaml_data = include_str!("...");
let foundry: obofoundry::Foundry = serde_yaml::from_str(&yml).unwrap();

It's also possible to use an HTTP library to load the listings from the OBO Foundry website directly, for instance using reqwest:

extern crate obofoundry;
extern crate reqwest;
extern crate serde_yaml;

let url = "http://www.obofoundry.org/registry/ontologies.yml";

let mut res = reqwest::get(url).unwrap();
let mut yml = String::new();
res.read_to_string(&mut yml);

let foundry: obofoundry::Foundry = serde_yaml::from_str(&yml).unwrap();

Examples

See the online documentation at docs.rs for more examples.

Changelog

This project adheres to Semantic Versioning and provides a changelog in the Keep a Changelog format.

Dependencies

~2.5MB
~67K SLoC