Skip to content

Commit

Permalink
Merge pull request #16319 from ror-community/schema-v2-1
Browse files Browse the repository at this point in the history
Udpate actions to use v2.1 branches
  • Loading branch information
adambuttrick authored Jan 9, 2025
2 parents aff090f + 836f7c8 commit cd44644
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate_relationships.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ 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
curl https://raw.githubusercontent.com/ror-community/curation_ops/refs/heads/schema-v2-1/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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remove_relationships.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install requests==2.23.0
curl https://raw.githubusercontent.com/ror-community/curation_ops/main/remove_relationships/remove_relationships.py -o remove_relationships.py
curl https://raw.githubusercontent.com/ror-community/curation_ops/refs/heads/schema-v2-1/remove_relationships/remove_relationships.py -o remove_relationships.py
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python remove_relationships.py -v 1
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_addresses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ 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
pip install git+https://github.com/ror-community/update_address.git@v2-1-locations
curl https://raw.githubusercontent.com/ror-community/curation_ops/main/update_address_only/update_addresses.py -o update_addresses.py
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python update_addresses.py -v 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
working-directory: ${{ env.WORKING_DIR }}
run: |
python -m pip install --upgrade pip
curl https://raw.githubusercontent.com/ror-community/curation_ops/main/update_related_records/requirements.txt -o requirements.txt
curl https://raw.githubusercontent.com/ror-community/curation_ops/refs/heads/schema-v2-1/update_related_records/requirements.txt -o requirements.txt
pip install -r requirements.txt
curl https://raw.githubusercontent.com/ror-community/curation_ops/main/update_related_records/update_related.py -o update_related.py
curl https://raw.githubusercontent.com/ror-community/curation_ops/refs/heads/schema-v2-1/update_related_records/update_related.py -o update_related.py
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
python update_related.py -v 1
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_last_mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
working-directory: ${{ env.WORKING_DIR }}
run: |
python -m pip install --upgrade pip
curl https://raw.githubusercontent.com/ror-community/curation_ops/main/utilities/update_last_mod/update_last_mod.py -o update_last_mod.py
curl https://raw.githubusercontent.com/ror-community/curation_ops/refs/heads/schema-v2-1/utilities/update_last_mod/update_last_mod.py -o update_last_mod.py
python update_last_mod.py -d ${{ github.event.inputs.date-value }}
- name: commit error file
if: ${{ steps.updatelastmod.outcome != 'success'}}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/validate-dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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 != '' }}"
Expand All @@ -48,16 +49,16 @@ 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
if [[ ${{ github.event.inputs.schema-version }} == 'v1' ]]; then
echo "validating v1"
python run_validations.py -i ../${{ env.WORKING_DIR }}/${{ github.event.inputs.file-name}} -v 1 -s ror_schema.json
fi
if [[ ${{ github.event.inputs.schema-version }} == 'v2' ]]; then
echo "validating v2"
python run_validations.py -i ../${{ env.WORKING_DIR }}/${{ github.event.inputs.file-name}} -v 2 -s ror_schema_v2_0.json
python run_validations.py -i ../${{ env.WORKING_DIR }}/${{ github.event.inputs.file-name}} -v 2 -s ror_schema_v2_1.json
fi
- name: Notify Slack
if: always()
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 != '' }}"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cd44644

Please sign in to comment.