Nuclear Pumpkin Mocha

    This package has been deprecated

    Author message:

    RATT has migrated to the Triply NPM registry. Please contact support@triply.cc for more details

    @triply/ratt
    TypeScript icon, indicating that this package has built-in type declarations

    4.2.1 • Public • Published

    RATT

    RDF all the things

    RDF all the things

    For users of RATT

    Installing

    You can install ratt as a dependency of your typescript or javascript project using yarn:

    yarn add @triplydb/ratt

    Running

    You can execute your ratt script like this:

    $ yarn exec ratt <compiled ratt-file.json>

    For developers of RATT

    Installation

    $ yarn install
    $ yarn run build

    Running the RATT CLI locally

    $ node ./lib/runner/cli.js <ratt-file>

    To publish a new version:

    • Run npm version [patch|minor|major]
    yarn's new version plugin does more than we want. We just want to modify the package.json file. I.e., just use npm
    - The CI will automatically publish the NPM package

    Increasing memory usage

    To increase the memory usage of RATT, export the following environment variable before calling the RATT runner:

    export NODE_OPTIONS=--max-old-space-size=8192  # increase max memory to 8GB
    

    Creating vocabularies

    You can create new vocabulary files by running the following command:

    yarn create-vocabs

    This requires that a file called .envrc-private is added with the following content:

    #!/bin/bash
    export TRIPLYDB_VOCAB_TOKEN=# Your https://triplydb.com token

    To include your modifications in a RATT release, use the following procedure:

    • Make your changes to the create-vocabs (src/bin/create-vocabs.ts) script:

      • Add the vocabulary you want to add to the jobs list. The list is alphabetically sorted.
      • To add a Job, create an entry with the following fields:
      alias: {
        // The name of the account in TriplyDB.com that publishes the vocabulary.
        account: string; 
        // The name of the dataset in TriplyDB.com, if this is different from the job alias.
        dataset?: string; 
        /** 
         * If the vocabulary alias cannot act as an object name in TypeScript, specify a different object name.
         * For example, `void` is a keyword in TypeScript, so the object name is set to `VoID` instead.
         */
        objectName?: string;
        // The IRI prefix that indicates the namespace for te vocabulary.
        prefix: string; 
      }
      • Results in for example:
      sdo: {
        account: "none",
        dataset: "sdo",
        prefix: "https://schema.org/",
      },
      
    • Run the script (yarn build && yarn create-vocabs )

    • Commit your changes in a feature branch

    • Make a merge request in gitlab for that feature branch

    • Ask a developer to review, merge, and make a new release

    Keywords

    none

    Install

    npm i @triply/ratt

    DownloadsWeekly Downloads

    378

    Version

    4.2.1

    License

    UNLICENSED

    Unpacked Size

    14.4 MB

    Total Files

    818

    Last publish

    Collaborators

    • gerwinbosch
    • laurens.rietveld