Skip to content

GROM is a gem created by the Parliamentary Digital Service to take ntriple files representing graph data and deserialise them into ruby objects.

License

Notifications You must be signed in to change notification settings

ukparliament/grom

Repository files navigation

Graph Object Mapper (GROM)

GROM is a gem created by the Parliamentary Digital Service to take ntriple files representing graph data and deserialise them into ruby objects.

Build Status Test Coverage License

NOTE: This gem is in active development and is likely to change at short notice. It is not recommended that you use this in any production environment.

Contents

Requirements

GROM requires the following:

Installation

gem 'grom'

Usage

This gem's main function is taking an ntriple data stream and deserialising it into linked Grom::Node objects.

file = File.read('people_members_current.nt')
data_stream = StringIO.new(file)

objects = Grom::Reader.new(data_stream).objects #=> [<#Grom::Node ...>, <#Grom::Node ...>, ...]

Note that ntriple data streams cannot contain a predicate named 'type', as this word is reserved for RDF types.

Getting Started with Development

To clone the repository and set up the dependencies, run the following:

git clone https://github.com/ukparliament/grom.git
cd grom
bundle install

Running the tests

We use RSpec as our testing framework and tests can be run using:

bundle exec rake

Contributing

If you wish to submit a bug fix or feature, you can create a pull request and it will be merged pending a code review.

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Ensure your changes are tested using Rspec
  6. Create a new Pull Request

License

grom is licensed under the MIT.

Logo design by Anna Vámos.

About

GROM is a gem created by the Parliamentary Digital Service to take ntriple files representing graph data and deserialise them into ruby objects.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published