Code Monkey home page Code Monkey logo

linkeddata's Introduction

Linked Data for Ruby

This is a meta-distribution of RDF.rb including all currently available and usable parsing/serialization extensions, intended to make producing and consuming Linked Data with Ruby as quick & easy as possible.

Gem Version Build Status Gitter chat

Features

The RDF::Raptor gem can be added to add support for high-performance readers and writers using Raptor

Examples

require 'linkeddata'

Documentation

Dependencies

Note, this distribution requires Nokogiri, which makes it not pure-ruby.

Installation

The recommended installation method is via RubyGems. To install the latest official release of the gem, do:

% [sudo] gem install linkeddata

Contributing

This repository uses Git Flow to mange development and release activity. All submissions must be on a feature branch based on the develop branch to ease staging and integration.

  • Do your best to adhere to the existing coding conventions and idioms.
  • Don't use hard tabs, and don't leave trailing whitespace on any line.
  • Do document every method you add using YARD annotations. Read the tutorial or just look at the existing code for examples.
  • Don't touch the .gemspec, VERSION or AUTHORS files. If you need to change them, do so on your private branch only.
  • Do feel free to add yourself to the CREDITS file and the corresponding list in the README. Alphabetical order applies.
  • Do note that in order for us to merge any non-trivial changes (as a rule of thumb, additions larger than about 15 lines of code), we need an explicit public domain dedication on record from you, which you will be asked to agree to on the first commit to a repo within the organization. Note that the agreement applies to all repos in the Ruby RDF organization.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying {file:UNLICENSE} file.

linkeddata's People

Contributors

artob avatar cbeer avatar gkellogg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linkeddata's Issues

Installing linkeddata gem fails with undefined class/module YAML::Syck::DefaultKey

Using jruby-1.6.3 (but it also happens with .1 and .2), I tried:

ian@rowan-15 $ gem install linkeddata
ERROR:  While executing gem ... (ArgumentError)
   undefined class/module YAML::Syck::DefaultKey

Googling around, I see that other gems have been having the same problem, but it's not clear to me what, if any, workaround I can apply locally. Suggestions welcome!

Thanks,
Ian

Inclusion of gem breaks Rails/ActiveRecord

When the linkeddata gem is included in a Rails application, it somehow breaks ActiveRecord Models. I found a workaround (only include what we need instead of this whole distribution) but I wanted to report it because it very strange. I could not believe it myself at first, but its reproducible in a freshly generated app.

Observed Problem: Model-Instances are missing some properties, notably id(!) and in the case of our app also created_at and updated_at timestamps.

Reproduction:

bundle exec rails new myapp # Using rails 6.0.3.1
cd myapp
bin/rails generate model thing
bin/rails db:migrate
bin/rails runner 'Thing.create'

# everything still works, instance has `id`:
bin/rails runner 'puts Thing.first.id != nil'
# -> true

# now add the gem
echo "gem 'linkeddata'" >> Gemfile
bundle
# its broken!
bin/rails runner 'puts Thing.first.id != nil'
# -> false

# just to make sure, yes the data is correct in the db:
bin/rails runner 'puts ActiveRecord::Base.connection.execute "SELECT * from things;"'
# -> {"id"=>1, "created_at"=>"2020-06-16 15:21:56.770811", "updated_at"=>"2020-06-16 15:21:56.770811"}

Build fails on Ruby 1.9.3

The [.travis.yml](https://github.com/ruby-rdf/linkeddata/blob/develop/.travis.yml#L6) for this suggests that Ruby 1.9.3 is supported, but the latest rdf-tabular requires Ruby 2.

I'm dropping support for 1.9.3 in ActiveTriples/ActiveTriples in response to this, but wanted to make you aware of the issue.

allow newer nokogumbo?

linkedddata depends on the gem nokogumbo, at "~> 1.5". https://github.com/ruby-rdf/linkeddata/blob/develop/linkeddata.gemspec#L45

nokogumbo released a 2.0.0 in October 2018, but no app depending upon linkeddata can use them, because it insists on only 1.x.

Would it be possible to update linkeddata to allow nokogumbo 2.x? Possibly in addition to 1.x as well.

Here are the nokogumbo 2.0 release notes . It looks like there are few if any significant backwards incompat changes, so it's possible linkeddata would just work with nokogumbo 2.x as well as 1.x.

Circular dependency linkeddata and rdf-vocab

When I have 'rdf-vocab' in my Gemfile I get this message from bundler:

Your Gemfile requires gems that depend on each other, creating an infinite loop. Please remove either gem 'linkeddata' or gem 'rdf-vocab' and try again.

linkeddata 3.2.1 no longer compatible with Rails older than 6.1, 3.2.0 was

linkeddata 3.2.1 has a (transitive) dependency on psych 4.x. Via yaml-ld (~> 0.0) the only released version of yaml-ld is 0.0.1, which depends on psych (~> 4.0).

Psych 4.x was released with ruby 3.1, although it can be used with older rubies too.

As far as I can tell,Psych 4.x is not compatible with Rails earlier than 6.1 -- Rails 6.0 and earlier are incompatible with psych 4.x. However, linkeddata 3.2.1 requires psych 4.x, via transitive dependency. Therefore, linkeddata 3.2.1 is incompatible with Rails earlier than 6.1.

linkeddata 3.2.0 did not express an explicit dependency on psych, so was compatible with earlier Rails.

Is this intentional/desirable? Can it be fixed?

It's breaking some of our builds at eg samvera/questioning_authority#374. Bundler ought to be smart enough to resolve linkeddata to 3.2.0 and build a consistent tree.... but apparently isn't (these built-in gems are kind of a mess), and even if it was, it would be a shame to be stuck using old linkeddata.

Appreciate any thoughts from maintainers here. @gkellogg ?

I cannot install the gem.

gem install linkeddata
ERROR: Could not find a valid gem 'rdf' (>= 2.2.8, ~> 2.2) in any repository
ERROR: Possible alternatives: rdf

rvm 1.29.2
Ruby 2.3.3
linux ubuntu

Any idea what may cause the issue?

performance issue

Hi,

we have a circleci build running and since a few days we observe that the conversion to turtle and rdf-xml format has degraded.
The conversion to ntriples works fine.

Do the following in our circleci-setup (see https://github.com/Informatievlaanderen/Data.Vlaanderen.be/blob/test/.circleci/config.yml) the following:

gem install linkeddata 
...
rdf serialize --input-format turtle --output-format rdfxml /tmp/workspace/ttl/${model}.ttl -o /tmp/workspace/voc/${model}.rdf

it installs the latest version 3.1.0 of the LinkedData gem.
In another variant of the circleci flow, we convert jsonld->*, and also here we face a performance degradation for converting to turtle and rdf-xml.
For this variant a list of 50 files is converted to nt in 1 minute, however conversion to turtle requires 90 minutes.

Is there a change in the serializers that could explain this big difference?

I tried to get a config with an older version of the rdf-turtle gem, but I did not succeeded yet. Always the latest version 3.1.0 is present. From which I assume that that version will be used to transform to turtle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.