Skip to content

Commit

Permalink
Merge pull request #202 from nulib/4673-update-types
Browse files Browse the repository at this point in the history
Updates for the DC API Types package
  • Loading branch information
mbklein committed Apr 29, 2024
2 parents 8c0c583 + 73d4e57 commit 03d3e02
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/production-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
path: "${{ env.TMP_SRCDIR }}"
- uses: actions/setup-node@v3
with:
cache-dependency-path: "${{ env.TMP_SRCDIR }}/package-lock.json"
cache-dependency-path: "${{ env.TMP_SRCDIR }}/node/package-lock.json"
node-version: 16.x
cache: "npm"
- name: Set short git commit SHA
Expand All @@ -46,18 +46,18 @@ jobs:
with:
path: "${{ env.TMP_SRCDIR }}"
- name: Generate Typescript file
working-directory: "${{ env.TMP_SRCDIR }}"
working-directory: "${{ env.TMP_SRCDIR }}/node"
run: |
npm ci
npx openapi-typescript docs/docs/spec/data-types.yaml --output schemas.ts
npx openapi-typescript ../docs/docs/spec/data-types.yaml --output schemas.ts
- name: Checkout nulib/dcapi-types
uses: actions/checkout@v3
with:
path: ${{ env.TMP_DSTDIR }}
ref: ${{ env.TARGET_BRANCH }}
repository: "nulib/dcapi-types"
token: ${{env.GH_TOKEN}}
- run: mv -f "${{ env.TMP_SRCDIR }}/schemas.ts" "${{ env.TMP_DSTDIR }}/schemas.ts"
- run: mv -f "${{ env.TMP_SRCDIR }}/node/schemas.ts" "${{ env.TMP_DSTDIR }}/schemas.ts"
shell: bash
- working-directory: "${{ env.TMP_DSTDIR }}"
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/staging-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch:
jobs:
Push-To-Types-Repo-Staging:
if: github.event.pull_request.merged == true
if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
id-token: write
Expand All @@ -31,26 +31,26 @@ jobs:
path: "${{ env.TMP_SRCDIR }}"
- uses: actions/setup-node@v3
with:
cache-dependency-path: "${{ env.TMP_SRCDIR }}/package-lock.json"
cache-dependency-path: "${{ env.TMP_SRCDIR }}/node/package-lock.json"
node-version: 16.x
cache: "npm"
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
with:
path: "${{ env.TMP_SRCDIR }}"
path: "${{ env.TMP_SRCDIR }}/node"
- name: Generate Typescript file
working-directory: "${{ env.TMP_SRCDIR }}"
working-directory: "${{ env.TMP_SRCDIR }}/node"
run: |
npm ci
npx openapi-typescript docs/docs/spec/data-types.yaml --output schemas.ts
npx openapi-typescript ../docs/docs/spec/data-types.yaml --output schemas.ts
- name: Checkout dcapi-types
uses: actions/checkout@v3
with:
path: ${{ env.TMP_DSTDIR }}
ref: ${{ env.TARGET_BRANCH }}
repository: ${{env.TYPES_REPO}}
- run: mv -f "${{ env.TMP_SRCDIR }}/schemas.ts" "${{ env.TMP_DSTDIR }}/schemas.ts"
- run: mv -f "${{ env.TMP_SRCDIR }}/node/schemas.ts" "${{ env.TMP_DSTDIR }}/schemas.ts"
shell: bash
- name: Set GitHub Deploy Key
uses: webfactory/ssh-agent@v0.5.3
Expand Down
10 changes: 10 additions & 0 deletions docs/docs/spec/data-types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,14 @@ components:
description: An account of the resource.
items:
type: string
embedding:
type: array
description: Vector representation of the resource's location in the repository's semantic space.
items:
type: number
embedding_model:
type: string
description: The name of the inference model used to generate the `embedding` from the resource's content.
file_sets:
type: array
description: File sets associated with the resource.
Expand Down Expand Up @@ -749,6 +757,8 @@ components:
- cultural_context
- date_created
- description
- embedding
- embedding_model
- file_sets
- folder_name
- folder_number
Expand Down

0 comments on commit 03d3e02

Please sign in to comment.