Skip to content

Commit

Permalink
update workflow files to use v2.1 branches
Browse files Browse the repository at this point in the history
  • Loading branch information
lizkrznarich committed Dec 4, 2024
1 parent aa215d9 commit c88ad15
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/dev_manual_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -66,19 +67,19 @@ 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
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/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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dev_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate_dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_addresses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 c88ad15

Please sign in to comment.