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

v1.43 #210

Merged
merged 93 commits into from
Mar 22, 2024
Merged

v1.43 #210

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
4847f4a
checkout repo
lizkrznarich Feb 23, 2024
92ab994
checkout repo
lizkrznarich Feb 23, 2024
3bd6063
checkout repo
lizkrznarich Feb 23, 2024
390398c
fix wonky slack msg
lizkrznarich Feb 23, 2024
7a0a203
fix if/else
lizkrznarich Feb 23, 2024
42f05eb
add v2 files for testing
lizkrznarich Mar 6, 2024
2d23092
add support for v2 in validate action
lizkrznarich Mar 12, 2024
18f248f
fix schema file download
lizkrznarich Mar 13, 2024
48d18f9
check validate workflow
lizkrznarich Mar 13, 2024
0f42831
check validate workflow
lizkrznarich Mar 13, 2024
436b763
check validate workflow
lizkrznarich Mar 13, 2024
4701f8c
update update_address action to support v2
lizkrznarich Mar 13, 2024
b9ad435
Apply address changes to files
lizkrznarich Mar 13, 2024
15c377b
Apply address changes to files
lizkrznarich Mar 13, 2024
2030641
add files for testing
lizkrznarich Mar 13, 2024
f190a58
Merge branch 'v2-actions' of github.com:ror-community/dev-ror-records…
lizkrznarich Mar 13, 2024
9a14fbd
use update address from branch
lizkrznarich Mar 13, 2024
da4c663
udpate update_labels action to support v2
lizkrznarich Mar 13, 2024
03002ad
udpate remove_relationships action to support v2
lizkrznarich Mar 13, 2024
5192eed
udpate generate_relationships action to support v2
lizkrznarich Mar 13, 2024
ba69c8a
add latest release files for testing
lizkrznarich Mar 13, 2024
fbbbd62
copy folder hierarchy
lizkrznarich Mar 13, 2024
f7116e0
Apply relationship changes to files
lizkrznarich Mar 13, 2024
4fde38e
Apply relationship changes to files
lizkrznarich Mar 13, 2024
ddf0c5a
fix remove relationships
lizkrznarich Mar 13, 2024
f0ea9e7
Merge branch 'v2-actions' of github.com:ror-community/dev-ror-records…
lizkrznarich Mar 13, 2024
7e95f13
Apply relationship changes to files
lizkrznarich Mar 14, 2024
d5073e4
Apply relationship changes to files
lizkrznarich Mar 14, 2024
ae035f7
fix file paths in update labels
lizkrznarich Mar 14, 2024
1fdc4f3
Merge branch 'v2-actions' of github.com:ror-community/dev-ror-records…
lizkrznarich Mar 14, 2024
2e21733
reset rc-v1.43-v2 files
lizkrznarich Mar 14, 2024
5e48f73
Apply relationship changes to files
lizkrznarich Mar 14, 2024
d697eaa
Apply relationship changes to files
lizkrznarich Mar 14, 2024
3c6ce3f
Apply relationship changes to files
lizkrznarich Mar 14, 2024
b15acf1
reset files for testing
lizkrznarich Mar 14, 2024
b55e003
Apply relationship changes to files
lizkrznarich Mar 14, 2024
75b1746
reset files for testing
lizkrznarich Mar 14, 2024
66db89a
Apply relationship changes to files
lizkrznarich Mar 14, 2024
97d21ef
Apply relationship changes to files
lizkrznarich Mar 14, 2024
7b638f2
Apply relationship changes to files
lizkrznarich Mar 14, 2024
826dd18
Apply relationship changes to files
lizkrznarich Mar 14, 2024
09be4e2
Apply address changes to files
lizkrznarich Mar 14, 2024
072c1bd
Apply address changes to files
lizkrznarich Mar 14, 2024
daace67
reset files for testing
lizkrznarich Mar 15, 2024
a2bae79
add rel file for testing
lizkrznarich Mar 15, 2024
ba1d0d1
Apply relationship changes to files
lizkrznarich Mar 15, 2024
61ed62a
Apply relationship changes to files
lizkrznarich Mar 15, 2024
799dece
Apply relationship changes to files
lizkrznarich Mar 15, 2024
b99eab4
reset files for testing
lizkrznarich Mar 15, 2024
2b2a1b4
Apply relationship changes to files
lizkrznarich Mar 15, 2024
70ef024
Apply relationship changes to files
lizkrznarich Mar 15, 2024
7f3058d
Apply relationship changes to files
lizkrznarich Mar 15, 2024
56fd047
Apply address changes to files
lizkrznarich Mar 15, 2024
6a95246
handle v1 or 2 in manual index
lizkrznarich Mar 15, 2024
b018277
Merge branch 'v2-actions' of github.com:ror-community/dev-ror-records…
lizkrznarich Mar 15, 2024
c6dca85
udpate indexing actions for v2
lizkrznarich Mar 15, 2024
323c3a9
remove branch check from manual index action
lizkrznarich Mar 15, 2024
0944114
update manual index action to validate in either version
lizkrznarich Mar 15, 2024
9a0d0be
add files for testing
lizkrznarich Mar 15, 2024
8785967
add branch ref for validation suite
lizkrznarich Mar 15, 2024
bc3205c
fix version typo
lizkrznarich Mar 15, 2024
fcab809
fix version typo
lizkrznarich Mar 15, 2024
5a78b36
fix version typo
lizkrznarich Mar 15, 2024
2346070
add files for testing
lizkrznarich Mar 15, 2024
989d85d
update generate dump action
lizkrznarich Mar 20, 2024
883a83f
change var name
lizkrznarich Mar 20, 2024
053864b
update main branch dev workflows
lizkrznarich Mar 21, 2024
07ceba4
add files for testing
lizkrznarich Mar 21, 2024
cb5f9eb
Apply relationship changes to files
lizkrznarich Mar 21, 2024
dd038e2
update workflow and reset test files
lizkrznarich Mar 21, 2024
2ebb977
Apply relationship changes to files
lizkrznarich Mar 21, 2024
ca23050
Apply relationship changes to files
lizkrznarich Mar 21, 2024
149d422
Apply relationship changes to files
lizkrznarich Mar 21, 2024
22ce6ff
add bad rels file for testing
lizkrznarich Mar 21, 2024
5bfbd78
update test data
lizkrznarich Mar 22, 2024
484c0ea
update test data
lizkrznarich Mar 22, 2024
734b73e
delete test files
lizkrznarich Mar 22, 2024
c4c30c3
rest files for testing
lizkrznarich Mar 22, 2024
603dfc6
Apply relationship changes to files
lizkrznarich Mar 22, 2024
bff40c1
Apply relationship changes to files
lizkrznarich Mar 22, 2024
490c3f6
Apply relationship changes to files
lizkrznarich Mar 22, 2024
9e7d91f
Apply address changes to files
lizkrznarich Mar 22, 2024
7e429c4
reset files for testing
lizkrznarich Mar 22, 2024
e82cc7e
Apply relationship changes to files
lizkrznarich Mar 22, 2024
baee404
Apply relationship changes to files
lizkrznarich Mar 22, 2024
79d2a48
Apply relationship changes to files
lizkrznarich Mar 22, 2024
2b0205c
Apply address changes to files
lizkrznarich Mar 22, 2024
f3bcc6c
fix dumb geonames issues
lizkrznarich Mar 22, 2024
faa1168
Revert "fix dumb geonames issues"
lizkrznarich Mar 22, 2024
653251b
add files for testing
lizkrznarich Mar 22, 2024
72aba0a
add files for testing
lizkrznarich Mar 22, 2024
ae16548
update branch for validation suite
lizkrznarich Mar 22, 2024
e616942
Merge pull request #209 from ror-community/v1.43
lizkrznarich Mar 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/dev_index_dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
schema-version:
required: true
description: Schema version to index
default: 'test'
type: choice
options:
- v1
Expand Down Expand Up @@ -53,18 +52,19 @@ jobs:
if: github.event.ref == 'refs/heads/dev'
needs: check_permission
steps:
- name: checkout
uses: actions/checkout@v2
- name: Index dump file
id: indexdatadump
run: |
cd .github/workflows
python -m pip install --upgrade pip
pip install requests==2.23.0
if [[ ${{ github.event.inputs.data-env }} == "v1" ]]; then
if [[ ${{ github.event.inputs.schema-version }} == "v1" ]]; then
python index_dump.py -u ${{ secrets.INDEX_DUMP_DEV_API_URL }} -f ${{ github.event.inputs.release-dump }} -e ${{ github.event.inputs.data-env }} -he ${{ secrets.INDEX_DEV_API_HEADERS }}
else
python index_dump.py -u ${{ secrets.INDEX_DUMP_DEV_API_URL_V2 }} -f ${{ github.event.inputs.release-dump }} -e ${{ github.event.inputs.data-env }} -he ${{ secrets.INDEX_DEV_API_HEADERS }}
fi

- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
Expand All @@ -73,5 +73,5 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV full index from dump status: ${{ steps.indexdata.outcome }}. From file: ${{ github.event.inputs.release-dump }}. Schema version: ${{ github.event.inputs.data-env }}. Data env: ${{ github.event.inputs.release-dump }}Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'DEV full index from dump status: ${{ steps.indexdatadump.outcome }}. From file: ${{ github.event.inputs.release-dump }}. Schema version: ${{ github.event.inputs.schema-version }}. Data env: ${{ github.event.inputs.data-env }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

49 changes: 37 additions & 12 deletions .github/workflows/dev_manual_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: DEV manual deploy from dev branch
on:
workflow_dispatch:
inputs:
schema-version:
required: true
description: Schema version
type: choice
options:
- v1
- v2
directory-name:
type: string
required: true
Expand All @@ -15,7 +22,7 @@ env:
jobs:
check_permission:
runs-on: ubuntu-latest
if: github.event.ref == 'refs/heads/dev'
#if: github.event.ref == 'refs/heads/dev'
steps:
- name: Get Permission
uses: octokit/[email protected]
Expand All @@ -34,7 +41,7 @@ jobs:
fi
check_validation:
runs-on: ubuntu-latest
if: github.event.ref == 'refs/heads/dev'
#if: github.event.ref == 'refs/heads/dev'
needs: check_permission
steps:
- name: checkout
Expand All @@ -49,6 +56,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ror-community/validation-suite
ref: schema-v2
path: validation-suite
- name: Validate files
id: validatefiles
Expand All @@ -58,11 +66,22 @@ jobs:
cd validation-suite
python -m pip install --upgrade pip
pip install -r requirements.txt
if [[ -f "../${{ github.event.inputs.directory-name }}/relationships.csv" ]]; then
python run_validations.py -i ../files -f ../${{ github.event.inputs.directory-name }}/relationships.csv -p ../files/ --no-geonames
else
python run_validations.py -i ../files --no-geonames
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
curl https://raw.githubusercontent.com/ror-community/ror-schema/schema-v2/ror_schema.json -o ror_schema.json
if [[ -f "../${{github.event.pull_request.head.ref}}/relationships.csv" ]]; then
python run_validations.py -i ../files -v 1 -s ror_schema.json -f ../${{github.event.pull_request.head.ref}}/relationships.csv -p ../files/ --no-geonames
else
python run_validations.py -i ../files -v 1 -s ror_schema.json --no-geonames
fi
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then
curl https://raw.githubusercontent.com/ror-community/ror-schema/schema-v2/ror_schema_v2_0.json -o ror_schema_v2_0.json
if [[ -f "../${{github.event.pull_request.head.ref}}/relationships.csv" ]]; then
python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -f ../${{github.event.pull_request.head.ref}}/relationships.csv -p ../files/ --no-geonames
else
python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json --no-geonames
fi
fi
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
Expand All @@ -74,7 +93,7 @@ jobs:
text: 'Validation status during DEV manual index: ${{ steps.validatefiles.outcome }}. In directory: ${{ github.event.inputs.directory-name }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
copy-files:
runs-on: ubuntu-latest
if: github.event.ref == 'refs/heads/dev'
#if: github.event.ref == 'refs/heads/dev'
needs: check_validation
steps:
- name: checkout
Expand All @@ -89,8 +108,8 @@ jobs:
run: |
cd ./${{ github.event.inputs.directory-name }}
zip files.zip *.json
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}/files.zip
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}/files.zip
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}-${{ github.event.inputs.schema-version }}/files.zip
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ github.event.inputs.directory-name }}-${{ github.event.inputs.schema-version }}/files.zip
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
Expand All @@ -106,7 +125,13 @@ jobs:
cd .github/workflows
python -m pip install --upgrade pip
pip install requests==2.23.0
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL }} -d ${{ github.event.inputs.directory-name }} -he ${{ secrets.INDEX_DEV_API_HEADERS }}
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL_V1 }} -d ${{ github.event.inputs.directory-name }}-v1 -he ${{ secrets.INDEX_DEV_API_HEADERS }}
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL_V2 }} -d ${{ github.event.inputs.directory-name }}-v2 -he ${{ secrets.INDEX_DEV_API_HEADERS }}
fi

- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
Expand All @@ -115,5 +140,5 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV index status: ${{ steps.indexdata.outcome }}. From directory: ${{ github.event.inputs.directory-name }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'DEV index status: ${{ steps.indexdata.outcome }}. Using version ${{ github.event.inputs.schema-version }}. From directory: ${{ github.event.inputs.directory-name }}-${{ github.event.inputs.schema-version }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

10 changes: 5 additions & 5 deletions .github/workflows/dev_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
run: |
cd ./${{ env.release_branch }}
zip files.zip *.json
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV}}/${{ env.release_branch }}/files.zip
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ env.release_branch }}/files.zip
aws s3 cp files.zip s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV}}/${{ env.release_branch }}-v2/files.zip
aws s3 ls s3://${{ secrets.ROR_DATA_S3_BUCKET_DEV }}/${{ env.release_branch }}-v2/files.zip
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
Expand All @@ -49,14 +49,14 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'Copy status to DEV S3 Bucket: ${{ steps.copyfiles.outcome }}. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'Copy status to DEV S3 Bucket: ${{ steps.copyfiles.outcome }}. Using v2. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
- name: Index file
id: indexdata
run: |
cd .github/workflows
python -m pip install --upgrade pip
pip install requests==2.23.0
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL }} -d ${{ env.release_branch }} -he ${{ secrets.INDEX_DEV_API_HEADERS }}
python index_files.py -u ${{ secrets.INDEX_DEV_API_URL_v2 }} -d ${{ env.release_branch }}-v2 -he ${{ secrets.INDEX_DEV_API_HEADERS }}
- name: Notify Slack
if: always()
uses: edge/simple-slack-notify@master
Expand All @@ -65,5 +65,5 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV index status: ${{ steps.indexdata.outcome }}. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Directory: ${{ env.release_branch }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'DEV index status: ${{ steps.indexdata.outcome }}. Using v2. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Directory: ${{ env.release_branch }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

8 changes: 5 additions & 3 deletions .github/workflows/dev_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: ror-community/validation-suite
ref: schema-v2
path: validation-suite
- name: Validate files
id: validatefiles
Expand All @@ -58,10 +59,11 @@ jobs:
cd validation-suite
python -m pip install --upgrade pip
pip install -r requirements.txt
curl https://raw.githubusercontent.com/ror-community/ror-schema/schema-v2/ror_schema_v2_0.json -o ror_schema_v2_0.json
if [[ -f "../${{github.event.pull_request.head.ref}}/relationships.csv" ]]; then
python run_validations.py -i ../files -f ../${{github.event.pull_request.head.ref}}/relationships.csv -p ../files/ --no-geonames
python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -f ../${{github.event.pull_request.head.ref}}/relationships.csv -p ../files/ --no-geonames
else
python run_validations.py -i ../files --no-geonames
python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json --no-geonames
fi
- name: Notify Slack
if: always()
Expand All @@ -71,5 +73,5 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'Validation status during PR to DEV: ${{ steps.validatefiles.outcome }}. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_HEAD_REF}. In directory: ${env.GITHUB_HEAD_REF}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'Validation status during PR to DEV: ${{ steps.validatefiles.outcome }}. Using v2. On branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_HEAD_REF}. In directory: ${env.GITHUB_HEAD_REF}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'

18 changes: 15 additions & 3 deletions .github/workflows/generate_dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Create data dump
on:
workflow_dispatch:
inputs:
schema-version:
required: true
description: Release schema version
type: choice
options:
- v1
- v2
new-release:
type: string
description: Name of the directory that the new release is located in
Expand Down Expand Up @@ -35,7 +42,7 @@ jobs:
with:
repository: ror-community/curation_ops
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
ref: dump-csv
ref: v2-crosswalk
path: ./curation_ops
- name: Set up Python environment
uses: actions/setup-python@v2
Expand All @@ -45,7 +52,12 @@ jobs:
id: gendumpscript
run: |
cd ./curation_ops/generate_dump/
python generate_dump.py -r ${{github.event.inputs.new-release}} -e ${{github.event.inputs.prev-release}} -i '../../ror-records-test' -o '../../ror-records-test'
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python generate_dump.py -r ${{github.event.inputs.new-release}} -e ${{github.event.inputs.prev-release}} -i '../../ror-records-test' -o '../../ror-records-test' -v 1
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then
python generate_dump.py -r ${{github.event.inputs.new-release}} -e ${{github.event.inputs.prev-release}} -i '../../ror-records-test' -o '../../ror-records-test' -v 2
fi
- name: cat error file
if: ${{ steps.gendumpscript.outcome != 'success'}}
run: |
Expand Down Expand Up @@ -73,4 +85,4 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV Data dump ${{github.event.inputs.new-release}} generation status: ${{ steps.commitdumpfile.outcome }} Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
text: 'DEV Data dump ${{github.event.inputs.new-release}} generation status: ${{ steps.commitdumpfile.outcome }}. Using base version ${{ github.event.inputs.schema-version }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}'
20 changes: 16 additions & 4 deletions .github/workflows/generate_relationships.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Create relationships
on:
workflow_dispatch:
inputs:
schema-version:
required: true
description: Schema version
type: choice
options:
- v1
- v2
directory-name:
type: string
description: Name of parent directory containing records to generate relationships for. Needed only if different from branch name.
Expand Down Expand Up @@ -30,8 +37,13 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install requests==2.23.0
curl https://raw.githubusercontent.com/ror-community/curation_ops/main/generate_relationships/generate_relationships.py -o generate_relationships.py
python generate_relationships.py relationships.csv
curl https://raw.githubusercontent.com/ror-community/curation_ops/v2-crosswalk/generate_relationships/generate_relationships.py -o generate_relationships.py
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python generate_relationships.py relationships.csv -v 1
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then
python generate_relationships.py relationships.csv -v 2
fi
- name: commit error file
if: ${{ steps.genrelshp.outcome != 'success'}}
working-directory: ${{ env.WORKING_DIR }}
Expand All @@ -42,7 +54,7 @@ jobs:
if: ${{ steps.genrelshp.outcome == 'success'}}
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: ${{ env.WORKING_DIR }}/**.json
file_pattern: ${{ env.WORKING_DIR }}/*/*.json
commit_message: Apply relationship changes to files
- name: Set env variable for notification
if: always()
Expand All @@ -61,4 +73,4 @@ jobs:
with:
channel: '#ror-curation-releases'
color: 'good'
text: 'DEV relationship generation status: ${env.VALIDATION_STATUS}. Branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Directory: ${{ env.WORKING_DIR }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID} for more details'
text: 'DEV relationship generation status: ${env.VALIDATION_STATUS}. Using version ${{ github.event.inputs.schema-version }}. Branch: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/tree/${env.GITHUB_REF_NAME}. Directory: ${{ env.WORKING_DIR }}. Please check: ${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID} for more details'
1 change: 1 addition & 0 deletions .github/workflows/index_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def main():
dataenv = args.dataenv
headers = args.headers
full_url = os.path.join(url, filename, dataenv)
print(full_url)
response = send_request(full_url, headers)
if not(response.ok):
print(response.text)
Expand Down
Loading
Loading