taxon_reporter

taxon_reporter is a Ruby gem that supports collecting data from a variety of biodiversity source about a given taxon and its descendants

Continuous Integration Status Coverage Status CodePolice Dependency Status

Installing

Add this line to your application's Gemfile:

gem 'taxon_reporter'

And then execute:

$ bundle

Or install it yourself as:

$ gem install taxon_reporter

Running Tests

bundle exec rake

Usage

To get a TaxonReporter::Report about a taxon:

report = TaxonReporter.report("Giraffa")

TaxonReporter::Report

Report#fields - Array of TaxonReporter::Fields
Report#taxons - Array of TaxonReporter::Taxons

TaxonReporter::Field

Field#source - String. Should be unique for each data source.
Field#name - Name of Field.  Should be unique given a source.
Field#id - Unique combination of source and name
Field#merge_values - Default method for merging values for this Field.

TaxonReporter::Taxon

Taxon#new(records=[]) - records should be a list of TaxonReporter::Records.
Taxon#add_record(record) - Adds a single TaxonReporter::Record.
Taxon#fields - Array of TaxonReporter::Fields associated with this taxon.
Taxon#values(field) - Merge of all the values (typically a Set) for the given TaxonReporter::Field

TaxonReporter::Record

Record#field - Associated TaxonReporter::Field
Record#values - Values (typically a Set)

Updating the Gem

gem build taxon_reporter.gemspec
gem push taxon_reporter-0.0.1.gem

Also look at .travis.yml file for more information

Code: Nathan Wilson,Dmitry Mozzherin

Copyright (c) 2014 Marine Biological Laboratory. See LICENSE for further details.