0.2.26-rc1 • Published 5 months ago

@desci-labs/desci-models v0.2.26-rc1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

nodes-models: DeSci Labs Research Object Module

nodes-models is a module within the DeSci Nodes open-source repository that provides a simplified and structured way to manage research artifacts, including data, code, PDFs, and more. This module is designed with a focus on supporting semantic web technologies by enabling JSON-LD through the RO-Crate 1.1 format and planning to support RDF, SPARQL, and more in the future.

The module includes TypeScript interfaces for defining research objects, a conversion script for transforming research objects to and from the RO-Crate format, and sample tests to validate the functionality of the module.

Features

  • TypeScript interfaces for defining research objects with a structured and extensible format.
  • Import and export research objects in the RO-Crate format, supporting JSON-LD.
  • Validate research objects using TypeScript interfaces and the ts-interface-checker package.
  • Support for a wide variety of research artifact types, such as data, code, PDFs, external links, etc.
  • Planned support for RDF, SPARQL, and more semantic web technologies.
  • Planned support for companion tools to vectorize PDF/document text content for LLM consumption.

Getting Started

To get started with the nodes-models module in the DeSci Nodes project, follow the steps below:

Prerequisites

  • Make sure you have Node.js (version 14 or higher) and npm (version 6 or higher) installed.

Installation

  1. Clone the DeSci Labs "nodes" repository:
git clone https://github.com/desci-labs/nodes.git
  1. Install the dependencies:
cd nodes/desci-models
yarn install

Running the Tests

To run the provided tests for the nodes-models module, execute the following command:

yarn test

Usage

Creating a Research Object

Create a research object using the provided TypeScript interfaces in the nodes-models module:

import { ResearchObjectV1 } from './nodes-models/ResearchObject';

const researchObject: ResearchObjectV1 = {
  version: 'desci-nodes-0.2.0',
  title: 'My Research Project',
  // ...
};

Converting a Research Object to and from RO-Crate format

Import the RoCrateTransformer class and use it to convert a research object to and from the RO-Crate format:

import { RoCrateTransformer } from './nodes-models/transformers/RoCrateTransformer';

const transformer = new RoCrateTransformer();
const roCrate = transformer.exportObject(researchObject);
const importedResearchObject = transformer.importObject(roCrate);
0.2.25

7 months ago

0.2.24

7 months ago

0.2.23

8 months ago

0.2.22

9 months ago

0.2.21

9 months ago

0.2.20

10 months ago

0.2.25-rc1

6 months ago

0.2.19

11 months ago

0.2.18

11 months ago

0.2.17

12 months ago

0.2.16

12 months ago

0.2.15

12 months ago

0.2.14

12 months ago

0.2.13

12 months ago

0.2.26-rc1

5 months ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.7-rc1

1 year ago

0.2.7-rc4

1 year ago

0.2.7-rc3

1 year ago

0.2.7-rc6

1 year ago

0.2.7-rc1.5

1 year ago

0.2.7-rc5

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.7-rc2.5

1 year ago

0.2.6-rc1

2 years ago

0.2.5

2 years ago

0.2.4-rc1

2 years ago

0.2.3-rc1

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.22

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago