From 6bdade827baf34e78600cbcb0f66c12143563873 Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Wed, 7 Sep 2022 14:40:10 -0500 Subject: [PATCH 1/9] symlink ror_schema from submodule --- .gitmodules | 3 +++ ror-schema | 1 + src/jsonSchema/rorSchema/index.ts | 2 +- src/jsonSchema/rorSchema/ror_schema.json | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 160000 ror-schema create mode 120000 src/jsonSchema/rorSchema/ror_schema.json diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6838295 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ror-schema"] + path = ror-schema + url = https://github.com/ror-community/ror-schema diff --git a/ror-schema b/ror-schema new file mode 160000 index 0000000..bfcf7b7 --- /dev/null +++ b/ror-schema @@ -0,0 +1 @@ +Subproject commit bfcf7b7288e0c944a882afdcd81419e4e03e8ccb diff --git a/src/jsonSchema/rorSchema/index.ts b/src/jsonSchema/rorSchema/index.ts index c743b56..f9e24c8 100644 --- a/src/jsonSchema/rorSchema/index.ts +++ b/src/jsonSchema/rorSchema/index.ts @@ -1,4 +1,4 @@ -import schema from './schema.json' +import schema from './ror_schema.json' import data from './data.json' import uischema from './uischema.json' import { UISchemaElement, JsonSchema } from '@jsonforms/core' diff --git a/src/jsonSchema/rorSchema/ror_schema.json b/src/jsonSchema/rorSchema/ror_schema.json new file mode 120000 index 0000000..ca580b8 --- /dev/null +++ b/src/jsonSchema/rorSchema/ror_schema.json @@ -0,0 +1 @@ +../../../ror-schema/ror_schema.json \ No newline at end of file From f970be433cf02400e84e75e77caaf0cb43afb7bb Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Thu, 8 Sep 2022 15:14:55 -0500 Subject: [PATCH 2/9] update UI schema --- src/jsonSchema/rorSchema/uischema.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/jsonSchema/rorSchema/uischema.json b/src/jsonSchema/rorSchema/uischema.json index cbe4b1f..5097b20 100644 --- a/src/jsonSchema/rorSchema/uischema.json +++ b/src/jsonSchema/rorSchema/uischema.json @@ -26,7 +26,8 @@ }, { "type": "Control", - "scope": "#/properties/wikipedia_url" + "scope": "#/properties/status", + "label": "Status" } ] }, @@ -47,6 +48,15 @@ "options": { "genList": true } + } + ] + }, + { + "type": "HorizontalLayout", + "elements": [ + { + "type": "Control", + "scope": "#/properties/wikipedia_url" }, { "type": "Control", From 17f0a93f9e83808ac6a2f67abdf573d96bf06df9 Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Thu, 8 Sep 2022 18:28:38 -0500 Subject: [PATCH 3/9] move status field to top of record --- ror-schema | 2 +- src/jsonSchema/rorSchema/uischema.json | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/ror-schema b/ror-schema index bfcf7b7..112d0c3 160000 --- a/ror-schema +++ b/ror-schema @@ -1 +1 @@ -Subproject commit bfcf7b7288e0c944a882afdcd81419e4e03e8ccb +Subproject commit 112d0c3c1c3f5320da7c30737b348678b9cb583a diff --git a/src/jsonSchema/rorSchema/uischema.json b/src/jsonSchema/rorSchema/uischema.json index 5097b20..266f765 100644 --- a/src/jsonSchema/rorSchema/uischema.json +++ b/src/jsonSchema/rorSchema/uischema.json @@ -329,16 +329,6 @@ } ] }, - { - "type": "VerticalLayout", - "elements": [ - { - "type": "Control", - "label": "Status", - "scope": "#/properties/status" - } - ] - }, { "type": "VerticalLayout", "elements": [ From bd715852d51bb247ce0be21921b00657159f878f Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Thu, 8 Sep 2022 18:30:29 -0500 Subject: [PATCH 4/9] remove manually-added schema file --- src/jsonSchema/rorSchema/schema.json | 455 --------------------------- 1 file changed, 455 deletions(-) delete mode 100644 src/jsonSchema/rorSchema/schema.json diff --git a/src/jsonSchema/rorSchema/schema.json b/src/jsonSchema/rorSchema/schema.json deleted file mode 100644 index 2bc5869..0000000 --- a/src/jsonSchema/rorSchema/schema.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "additionalProperties": false, - "properties": { - "ip_addresses": { - "type": "array", - "default": [] - }, - "aliases": { - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "acronyms": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - }, - "links": { - "type": "array", - "default": [], - "items": { - "type": "string" - } - }, - "country": { - "type": "object", - "additionalProperties": false, - "properties": { - "country_code": { - "type": "string", - "minLength": 2, - "maxLength": 2, - "readOnly": true - }, - "country_name": { - "type": "string", - "readOnly": true - } - }, - "required": ["country_code", "country_name"] - }, - "name": { - "$ref": "#/definitions/non-empty-string" - }, - "wikipedia_url": { - "type": ["null","string"], - "default": null - - }, - "addresses": { - "type": "array", - "maxItems": 1, - "minItems": 1, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "geonames_city" - ], - "properties": { - "geonames_city": { - "type": "object", - "additionalProperties": false, - "required": [ - "id" - ], - "properties": { - "id": { - "title": "Location ID", - "type": "integer" - }, - "city": { - "type": "string", - "readOnly": true - }, - "license": { - "type": "object", - "additionalProperties": false, - "default": {}, - "properties": { - "attribution": { - "readOnly": true, - "type": "string", - "default": "Data from geonames.org under a CC-BY 3.0 license" - }, - "license": { - "type": "string", - "readOnly": true, - "default": "http://creativecommons.org/licenses/by/3.0/" - } - }, - "required": [ - "attribution", - "license" - ] - }, - "geonames_admin1": { - "type": "object", - "additionalProperties": false, - "properties": { - "ascii_name": { - "readOnly": true, - "type": ["string","null"], - "default": null - }, - "name": { - "readOnly": true, - "type": ["string","null"], - "default": null - }, - "id": { - "readOnly": true, - "type": ["integer","null"], - "default": null - }, - "code": { - "readOnly": true, - "type": ["string","null"], - "default": null - } - } - }, - "geonames_admin2": { - "type": "object", - "additionalProperties": false, - "properties": { - "ascii_name": { - "readOnly": true, - "type": ["string","null"], - "default": null - }, - "name": { - "readOnly": true, - "type": ["string","null"], - "default": null - }, - "id": { - "readOnly": true, - "type": ["integer","null"], - "default": null - }, - "code": { - "readOnly": true, - "type": ["string","null"], - "default": null - } - } - }, - "nuts_level1": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": [ - "null", - "string" - ], - "default": null - }, - "code": { - "type": [ - "null", - "string" - ], - "default": null - } - }, - "required": [ - "code", - "name" - ] - }, - "nuts_level2": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": [ - "null", - "string" - ], - "default": null - }, - "code": { - "type": [ - "null", - "string" - ], - "default": null - } - }, - "required": [ - "code", - "name" - ] - }, - "nuts_level3": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": [ - "null", - "string" - ], - "default": null - }, - "code": { - "type": [ - "null", - "string" - ], - "default": null - } - }, - "required": [ - "code", - "name" - ] - } - } - }, - "lat": { - "type": "number", - "readOnly": true - }, - "lng": { - "type": "number", - "readOnly": true - }, - "city": { - "type": "string", - "readOnly": true - }, - "state_code": { - "type": [ - "null", - "string" - ], - "readOnly": true, - "default": null - }, - "state": { - "readOnly": true, - "type": [ - "null", - "string" - ], - "default": null - }, - "country_geonames_id": { - "type": "integer", - "readOnly": true - }, - "primary": { - "type": "boolean", - "default": false - }, - "postcode": { - "type": [ - "null", - "string" - ], - "default": null - }, - "line": { - "type": [ - "null", - "string" - ], - "default": null - } - } - } - }, - "types": { - "type": "array", - "description": "Institutional Types", - "items": { - "type": "string", - "enum": [ - "Education", - "Healthcare", - "Company", - "Archive", - "Nonprofit", - "Government", - "Facility", - "Other" - ] - } - }, - "external_ids": { - "type": "object", - "default": {}, - "additionalProperties": true, - "title": "External IDs", - "properties": { - "GRID": { - "type": "object", - "title": "GRID", - "additionalProperties": false, - "properties": { - "preferred": { - "type": [ - "null", - "string" - ], - "default": null - }, - "all": { - "type": [ - "null", - "string" - ] - } - } - }, - "ISNI": { - "type": "object", - "title": "ISNI", - "additionalProperties": false, - "properties": { - "preferred": { - "type": [ - "null", - "string" - ], - "default": null - }, - "all": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "FundRef": { - "type": "object", - "title": "FunderRef", - "additionalProperties": false, - "properties": { - "preferred": { - "type": [ - "null", - "string" - ], - "default": null - }, - "all": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Wikidata": { - "type": "object", - "title": "Wikidata", - "additionalProperties": false, - "properties": { - "preferred": { - "type": [ - "null", - "string" - ], - "default": null - }, - "all": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "established": { - "type": ["null", "number"], - "default": null - }, - "relationships": { - "type": "array", - "default": [], - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": ["Related", "Parent", "Child"] - }, - "id": { - "type": "string", - "pattern": "^https://ror.org/0[a-z|0-9]{8}$" - }, - "label": { - "$ref": "#/definitions/non-empty-string" - } - }, - "required": ["id", "label", "type"] - } - }, - "email_address": { - "type": ["null", "string"], - "default": null - }, - "id": { - "type": "string", - "pattern": "^https://ror.org/0[a-z|0-9]{8}$", - "readOnly": true, - "default": "https://ror.org/012xzy7a9" - }, - "labels": { - "type": "array", - "default": [], - "items": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "iso639": { - "type": "string", - "minLength": 2, - "maxLength": 2 - } - }, - "required": ["label", "iso639"] - } - }, - "status": { - "type": "string", - "enum": ["active"], - "readOnly": true, - "default": "active" - } - }, - "definitions": { - "non-empty-string": { - "type": "string", - "minLength": 1 - } - }, - "required": ["name", "types"] -} From 062717351eacdd8ecd5efc45848a9fadefba975b Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Thu, 8 Sep 2022 18:48:20 -0500 Subject: [PATCH 5/9] update dev deploy to pull ror-schema --- .github/workflows/dev.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index c8e489b..1d38f6c 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -17,6 +17,10 @@ jobs: - uses: actions/checkout@v2 - name: Install run: npm ci + - name: Pull ROR Schema + run: | + cd ror-schema; + git pull origin dev - name: Build run: | cp src/env.dev.ts src/env.ts; From d570bb8ff13ebccddf6a6d5e12eb5df4b9687ca1 Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Thu, 8 Sep 2022 18:54:21 -0500 Subject: [PATCH 6/9] update dev deploy to pull ror-schema --- .github/workflows/dev.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 1d38f6c..e864616 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -5,7 +5,6 @@ on: - "dev" paths-ignore: - '**/README.md' - - '**/workflows/**' jobs: run: runs-on: ubuntu-latest From f6bc2d00ae0ae0a15f31b48b3041332c6e0c1beb Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Thu, 8 Sep 2022 19:04:05 -0500 Subject: [PATCH 7/9] update submodules during deploy --- .github/workflows/dev.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index e864616..81e7a4b 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -18,8 +18,9 @@ jobs: run: npm ci - name: Pull ROR Schema run: | + git submodule update --init --recursive; cd ror-schema; - git pull origin dev + git checkout dev - name: Build run: | cp src/env.dev.ts src/env.ts; From f0912c7715be2fd26a9225e514bccbc5e71abc7b Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Tue, 6 Dec 2022 13:31:06 -0500 Subject: [PATCH 8/9] udpate stating and prod workflows to pull ror schema --- .github/workflows/release.yml | 5 +++++ .github/workflows/staging.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f5e9d3..7e7765f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,11 @@ jobs: - uses: actions/checkout@v2 - name: Install run: npm ci + - name: Pull ROR Schema + run: | + git submodule update --init --recursive; + cd ror-schema; + git checkout master - name: Build run: | cp src/env.prod.ts src/env.ts; diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index e872aba..bdac0ca 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -17,6 +17,11 @@ jobs: - uses: actions/checkout@v2 - name: Install run: npm ci + - name: Pull ROR Schema + run: | + git submodule update --init --recursive; + cd ror-schema; + git checkout master - name: Build run: | cp src/env.staging.ts src/env.ts; From bb15a06366d2b62c3c8c809be9a97363e7561a71 Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Tue, 6 Dec 2022 13:48:58 -0500 Subject: [PATCH 9/9] remove ignore for workflow files --- .github/workflows/staging.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index bdac0ca..bc2a20f 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -5,7 +5,6 @@ on: - "staging" paths-ignore: - '**/README.md' - - '**/workflows/**' jobs: run: runs-on: ubuntu-latest