npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@desci-labs/desci-models

v0.2.19

Published

Data models for DeSci Nodes

Downloads

962

Readme

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);