Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
brianorwhatever committed Sep 13, 2023
0 parents commit cc592d5
Show file tree
Hide file tree
Showing 41 changed files with 5,976 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm install
npm run build
npm install -g
npm test
55 changes: 55 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Deploy Docusaurus to GitHub Pages'
on:
push:
branches:
- main
paths:
- docs/**
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:

jobs:
deploy:
defaults:
run:
shell: bash
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: docs
# Terminology reference resolution
- name: Install TRRT
run: npm install -g @tno-terminology-design/[email protected]
- name: Run TRRT
run: trrt --output . --scopedir __tests__/content '**/*.md' --force

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs
- name: Build website
run: yarn build
working-directory: docs

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
# user_name: github-actions[bot]
# user_email: 41898282+github-actions[bot]@users.noreply.github.com
22 changes: 22 additions & 0 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish package to GitHub Packages
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@tno-terminology-design'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/test-docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Test docusaurus deployment'
on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
test-deploy:
# defaults:
# run:
# shell: bash
# working-directory: docs
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: docs
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./docs
- name: Test build website
run: yarn build
working-directory: ./docs
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Machine Readable Glossary Tool (MRGT)

## Overview

The **Machine Readable Glossary Tool (MRGT)** generates a Machine Readable Glossary (MRG) for each of the versions of the terminology that are maintained with that scope by reading the SAF. There is more information about here:
- [overview of the TEv2 tools](https://tno-terminology-design.github.io/tev2-specifications/docs/tev2-overview) of which the TRRT is a part.

## Installation

Install from the command line and make globally available.

```bash
npm install @aviarytech/mrgt -g
```

## Calling the Tool

The behavior of the MRGT can be configured per call e.g. by a configuration file and/or command-line parameters. The command-line syntax is as follows:

```bash
mrgt [ <paramlist> ]
```

The MRGT takes in the following parameters:

| Flags | Description | Required |
|--------------------------|-----------------------------------------------------------------------------------|:--------:|
| -c, --config \<path> | Path (including the filename) of the tool's (YAML) configuration file | No |
| -s, --scopedir \<path> | Path of the scope directory where the SAF is located | Yes |
| -v, --vsntag \<vsntag> | Version tag for which the MRG will be generated. When omitted, an MRG will be generated for every version of the terminology that is specified in the versions section of the SAF | No |
| -e, --onNotExist \<action> | Specifies the action to take if a vsntag was specified but wasn't found in the SAF. Default is 'throw'. Options: 'throw', 'warn', 'log', 'ignore' | No |


18 changes: 18 additions & 0 deletions __tests__/.github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm install
npm run build
npm install -g
npm test
55 changes: 55 additions & 0 deletions __tests__/.github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Deploy Docusaurus to GitHub Pages'
on:
push:
branches:
- main
paths:
- docs/**
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
workflow_dispatch:

jobs:
deploy:
defaults:
run:
shell: bash
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: docs
# Terminology reference resolution
- name: Install TRRT
run: npm install -g @tno-terminology-design/[email protected]
- name: Run TRRT
run: trrt --output . --scopedir __tests__/content '**/*.md' --force

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: docs
- name: Build website
run: yarn build
working-directory: docs

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
# user_name: github-actions[bot]
# user_email: 41898282+github-actions[bot]@users.noreply.github.com
22 changes: 22 additions & 0 deletions __tests__/.github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish package to GitHub Packages
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@tno-terminology-design'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions __tests__/.github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29 changes: 29 additions & 0 deletions __tests__/.github/workflows/test-docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Test docusaurus deployment'
on:
pull_request:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
test-deploy:
# defaults:
# run:
# shell: bash
# working-directory: docs
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: docs
- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: ./docs
- name: Test build website
run: yarn build
working-directory: ./docs
Loading

0 comments on commit cc592d5

Please sign in to comment.