Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate USGS-NGGDPP/mdEditor-keywords Repository #44

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-syntax-import-attributes"]
}
18 changes: 6 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 2021
},
"env": {
"browser": true,
"commonjs": true,
"node": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:promise/recommended",
"plugin:prettier/recommended"
],
"plugins": ["prettier"],
"parserOptions": {
"ecmaVersion": 2021
},
"rules": {
"comma-dangle": ["error", "only-multiline"],
"indent": ["error", 2, { "SwitchCase": 1 }],
"no-console": "off",
"quotes": ["error", "single"],
"semi": ["error", "always"]
"prettier/prettier": ["error"]
}
}
41 changes: 41 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- master

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Create Tag
id: create_tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Read version from package.json
version=$(node -p "require('./package.json').version")
version_tag="v$version"
echo "Version from package.json: $version_tag"
echo "version=$version_tag" >> $GITHUB_OUTPUT
git tag $version_tag
git push origin $version_tag

- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.create_tag.outputs.version }}
name: Release ${{ steps.create_tag.outputs.version }}
body: Automated release for version ${{ steps.create_tag.outputs.version }}.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/generate-keywords.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/test-resources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: test-resources
run-name: Testing keywords and thesaurus configuration files
on:
push:
jobs:
test-resources:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: yarn install

- name: Run tests
run: yarn test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ typings/
#generated files
/lib/js
/dist

# gnis data
harvesters/gnis/data/
8 changes: 6 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid"
}
16 changes: 5 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,14 @@
Major refactoring of the mdKeywords repository.

- Remove dependency on mdProfiles
- Harvester driven from local (in-repository) configuration files
- List of vocabularies to harvest are now in configuration files and not pulled from profiles
- Remove harvesters - they have moved to https://github.com/USGS-NGGDPP/mdEditor-keywords
- Update the manifest.json schema
- Updates to resources from source updates
- Remove json/ directory
- Remove non-default thesaurus configurations and keywords files
- Remove all extra manifest and test files
- Separate thesaurus configuration files for each vocabulary
- Add keywordsUrl to thesaurus configuration files

## [v3.0.1](https://github.com/adiwg/mdKeywords/tree/v3.0.1)

[Full Changelog](https://github.com/adiwg/mdKeywords/compare/v3.0.0...v3.0.1)

- Refactor GCMD harvester script
- Add harvester control process to build all GCMD vocabularies from configuration files
- Add custom vocabularies for the USGS [National Geological and Geophysical Data Preservation Program](https://www.usgs.gov/programs/national-geological-and-geophysical-data-preservation-program) (NGGDPP) to the default vocabulary configuration file (to assist USGS with a time sensitive need).
- Fix id in schemas

## [v3.0.0](https://github.com/adiwg/mdKeywords/tree/v3.0.0)

Expand Down
172 changes: 0 additions & 172 deletions conf/gcmd-vocabularies.json

This file was deleted.

Loading
Loading