From c88ad155b191f20afac6748d127b150afe386989 Mon Sep 17 00:00:00 2001 From: lizkrznarich Date: Wed, 4 Dec 2024 15:10:42 -0600 Subject: [PATCH] update workflow files to use v2.1 branches --- .github/workflows/dev_manual_index.yml | 9 +++++---- .github/workflows/dev_pull_request.yml | 6 +++--- .github/workflows/generate_dump.yml | 1 + .github/workflows/update_addresses.yml | 4 ++-- .github/workflows/validate.yml | 17 +++++++++-------- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dev_manual_index.yml b/.github/workflows/dev_manual_index.yml index 842ab2f88..4693b81b0 100644 --- a/.github/workflows/dev_manual_index.yml +++ b/.github/workflows/dev_manual_index.yml @@ -56,6 +56,7 @@ jobs: uses: actions/checkout@v2 with: repository: ror-community/validation-suite + ref: schema-2-1 path: validation-suite - name: Validate files id: validatefiles @@ -66,7 +67,7 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then - curl https://raw.githubusercontent.com/ror-community/ror-schema/master/ror_schema.json -o ror_schema.json + curl https://raw.githubusercontent.com/ror-community/ror-schema/refs/heads/schema-v2-1/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 @@ -74,11 +75,11 @@ jobs: fi fi if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then - curl https://raw.githubusercontent.com/ror-community/ror-schema/master/ror_schema_v2_0.json -o ror_schema_v2_0.json + curl https://raw.githubusercontent.com/ror-community/ror-schema/refs/heads/schema-v2-1/ror_schema_v2_1.json -o ror_schema_v2_1.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 + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.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 + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json --no-geonames fi fi - name: Notify Slack diff --git a/.github/workflows/dev_pull_request.yml b/.github/workflows/dev_pull_request.yml index 97be333a5..4239eb9d3 100644 --- a/.github/workflows/dev_pull_request.yml +++ b/.github/workflows/dev_pull_request.yml @@ -58,11 +58,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/master/ror_schema_v2_0.json -o ror_schema_v2_0.json + curl https://raw.githubusercontent.com/ror-community/ror-schema/refs/heads/schema-v2-1/ror_schema_v2_1.json -o ror_schema_v2_1.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 + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.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 + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json --no-geonames fi - name: Notify Slack if: always() diff --git a/.github/workflows/generate_dump.yml b/.github/workflows/generate_dump.yml index 5116f63c7..7372229e6 100644 --- a/.github/workflows/generate_dump.yml +++ b/.github/workflows/generate_dump.yml @@ -43,6 +43,7 @@ jobs: with: repository: ror-community/curation_ops token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + ref: schema-v2-1 path: ./curation_ops - name: Set up Python environment uses: actions/setup-python@v2 diff --git a/.github/workflows/update_addresses.yml b/.github/workflows/update_addresses.yml index 82cf7489a..0ba124ae5 100644 --- a/.github/workflows/update_addresses.yml +++ b/.github/workflows/update_addresses.yml @@ -37,8 +37,8 @@ jobs: run: | python -m pip install --upgrade pip pip install requests==2.23.0 - pip install git+https://github.com/ror-community/update_address.git - curl https://raw.githubusercontent.com/ror-community/curation_ops/main/update_address_only/update_addresses.py -o update_addresses.py + pip install git+https://github.com/ror-community/update_address.git@v2-1-locations + curl https://raw.githubusercontent.com/ror-community/curation_ops/refs/heads/schema-v2-1/update_address_only/update_addresses.py -o update_addresses.py if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then python update_addresses.py -v 1 fi diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5e47293db..eca49c8d1 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -36,6 +36,7 @@ jobs: uses: actions/checkout@v2 with: repository: ror-community/validation-suite + ref: schema-2-1 path: validation-suite - name: Get directory name if: "${{ github.event.inputs.directory-name != '' }}" @@ -52,8 +53,8 @@ jobs: cd validation-suite python -m pip install --upgrade pip pip install -r requirements.txt - curl https://raw.githubusercontent.com/ror-community/ror-schema/master/ror_schema.json -o ror_schema.json - curl https://raw.githubusercontent.com/ror-community/ror-schema/master/ror_schema_v2_0.json -o ror_schema_v2_0.json + curl https://raw.githubusercontent.com/ror-community/ror-schema/refs/heads/schema-v2-1/ror_schema.json -o ror_schema.json + curl https://raw.githubusercontent.com/ror-community/ror-schema/refs/heads/schema-v2-1/ror_schema_v2_1.json -o ror_schema_v2_1.json ls ../files/ if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then echo "validating v1" @@ -84,22 +85,22 @@ jobs: if [[ ${{ github.event.inputs.skip-geonames }} == true ]]; then if [[ ${{ github.event.inputs.with-relationship }} == true ]]; then if [[ -f "../${{ env.WORKING_DIR }}/relationships.csv" ]]; then - python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -f ../${{ env.WORKING_DIR }}/relationships.csv -p ../files/ --no-geonames + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json -f ../${{ env.WORKING_DIR }}/relationships.csv -p ../files/ --no-geonames else - python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -p ../files/ --no-geonames + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json -p ../files/ --no-geonames fi elif [[ ${{ github.event.inputs.with-relationship }} == false ]]; then - python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json --no-geonames + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json --no-geonames fi else if [[ ${{ github.event.inputs.with-relationship }} == true ]]; then if [[ -f "../${{ env.WORKING_DIR }}/relationships.csv" ]]; then - python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -f ../${{ env.WORKING_DIR }}/relationships.csv -p ../files/ + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json -f ../${{ env.WORKING_DIR }}/relationships.csv -p ../files/ else - python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json -p ../files/ + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json -p ../files/ fi elif [[ ${{ github.event.inputs.with-relationship }} == false ]]; then - python run_validations.py -i ../files -v 2 -s ror_schema_v2_0.json + python run_validations.py -i ../files -v 2 -s ror_schema_v2_1.json fi fi fi