GithubHelp home page GithubHelp logo

rubensworks / earl-badge.js Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 396 KB

Creates SVG badges for EARL files

License: MIT License

JavaScript 3.46% TypeScript 96.54%
earl rdf tests badge svg hacktoberfest

earl-badge.js's Introduction

EARL-Badge.js

Build status Coverage Status npm version

This tool creates SVG badges for EARL test reports, for representing the specification compliance of a certain tool. These badges represent the percentage of passed tests for a specification's test suite for a given tool.

For example, a badge representing the JSON-LD 1.1 spec compliance could look as follows:

EARL badge example

These EARL reports can be generated using a variety of tools in different programming languages, such as rdf-test-suite.js.

Installation

Global

This allows the tool to be used from the CLI.

$ yarn global add earl-badge

or

$ npm install -g earl-badge

Local

This allows the tool to be used as a library.

$ yarn add earl-badge

or

$ npm install earl-badge

Usage

This tool can either be used to generate SVG files from command line, or from code.

CLI

This tool assumes that you have an EARL test report file for a tool.

Assuming that you have an EARL file at mytool-earl.ttl, where your tool is identified in the EARL file by http://example.org/mytool, and your tool implements the JSON-LD 1.1 specification, you can execute this tool as follows:

$ earl-badge "JSON-LD 1.1" http://example.org/mytool mytool-earl.ttl

This tool supports EARL files in most RDF serializations, as long as they are supported by rdf-parse.

Code

The SVG generation can also be called from code as follows:

import { BadgeGeneratorEarl } from "earl-badge";

const svgString = await new BadgeGeneratorEarl().createSvgBadge({
  filePath: 'mytool-earl.ttl',
  specName: 'JSON-LD 1.1',
  testSubject: 'http://example.org/mytool',
});

License

This software is written by Ruben Taelman.

This code is released under the MIT license.

earl-badge.js's People

Contributors

greenkeeper[bot] avatar renovate-bot avatar renovate[bot] avatar rubensworks avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

earl-badge.js's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • rdf-object ^1.1.1
  • rdf-parse ^1.2.0
  • @types/jest ^26.0.0
  • @types/minimist ^1.2.0
  • @types/n3 ^1.1.4
  • coveralls ^3.0.0
  • jest ^26.0.0
  • jest-rdf ^1.3.0
  • manual-git-changelog ^1.0.1
  • pre-commit ^1.2.2
  • ts-jest ^26.0.0
  • tslint ^6.0.0
  • tslint-eslint-rules ^5.3.1
  • typescript ^4.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

An in-range update of coveralls is breaking the build 🚨

The devDependency coveralls was updated from 3.0.7 to 3.0.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/coveralls-3.0.8 at 100.0% (Details).

Commits

The new version differs by 24 commits.

There are 24 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/n3 is breaking the build 🚨

The devDependency @types/n3 was updated from 1.1.3 to 1.1.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/n3 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.