Skip to content

Suite of libraries that developers can use to simplify working with ontologies.

License

Notifications You must be signed in to change notification settings

bpatelicent/rdf-libraries

 
 

Repository files navigation

rdf-libraries

Simple client-side library exported as a JavaScript package, for working with ontologies.

This is a monorepo, which contains sub-packages:

Install

This monorepo's sub-packages are published to https://www.npmjs.com/org/telicent-oss:

yarn install @telicent-oss/ontologyservice

Usage

A simple example:

import OntologyService from "@telicent-oss/ontologyservice";

const ontologyService = new OntologyService(
  "http://localhost:3030/",
  "ontology"
);

const diagrams = await ontologyService.getAllDiagrams();

For more info, see API section.

See local development notes

Local development

Requires nx.

Some useful nx commands

# For all impacted packages
npx nx affected:build # build
npx nx affected:test # test
npx nx affected:generate-docs # gen docs
# For individual packages
cd rdfservice && npx nx build # Build
cd ontologyservice && npx nx test # Test
cd catalogservice && npx nx lint # Lint

To dev workflow multiple package:

cd ./packages/RdfService; # In producer package...
echo "console.log('hi');" >> ./src/index.ts; # ...edit producer feature
cd - && cd ./packages/OntologyService; # In consumer package...
echo "test('hi', () => expect(logSpy).toHaveBeenCalledWith('hi'));" \
  >> ./src/index.test.ts;  # ...edit consumer test
npx nx affected:build # Build affected
npx nx affected:test # Test affected

Build all packages simultaneously:

npx nx run-many -t build

Developer notes:

  • WARNING: import x from '.' can cause problems. Instead use import x from './index'
  • If changing code then all commands must be run via nx else it will use the old code in node_modules
  • nx commands can be run from any sub-directory and will resolve as if run on monorepo root
  • More nx documentation at: https://nx.dev/ai-chat

API

About

Suite of libraries that developers can use to simplify working with ontologies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.6%
  • JavaScript 5.3%
  • Shell 0.1%