Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/edmcouncil/idmp into IDMP…
Browse files Browse the repository at this point in the history
…-735
  • Loading branch information
ElisaKendall committed Oct 23, 2024
2 parents e5856c0 + fe0d123 commit c8168ca
Show file tree
Hide file tree
Showing 22 changed files with 0 additions and 1,505 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/unit_tests_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ on:
push:
pull_request:
branches: ["master"]
workflow_dispatch:
inputs:
gsrs_version:
description: "GSRS dataset version"
required: false
gsrs_cache_rebuild:
description: "Whether to rebuild cache"
required: false

permissions:
contents: read
Expand Down Expand Up @@ -49,64 +41,3 @@ jobs:
with:
name: merged-ontology
path: AboutIDMPDev-ReferenceIndividuals.ttl
GSRS:
runs-on: ubuntu-latest
env:
GSRS_VERSION: ${{ inputs.gsrs_version || '2023-12-14' }}
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
cache: "maven"
- name: Install Dependencies & Prepare IDMP Ontologies
run: |
./etc/unit_tests/dependencies.sh
- name: GSRS Cache
id: gsrs-caches
uses: actions/cache@v4
with:
path: |
gsrs-transformed.ttl
key: gsrs-public-data-${{ env.GSRS_VERSION }}|transformation-files-${{ hashFiles('etc/transformation/GSRS/*.rqg') }}
- name: Download and Extract GSRS Version ${{ env.GSRS_VERSION }}
if: steps.gsrs-caches.outputs.cache-hit != 'true' || inputs.gsrs_cache_rebuild == 'true'
run: |
url=https://gsrs.ncats.nih.gov/downloads/dump-public-${{ env.GSRS_VERSION }}.gsrs
sudo wget --no-verbose -m -nH -nd -O public_data.gz $url
gunzip public_data.gz
jq -c -s '.' public_data > public_data.json
- name: Transform GSRS
if: steps.gsrs-caches.outputs.cache-hit != 'true' || inputs.gsrs_cache_rebuild == 'true'
run: |
queries=(gsrs-public-data-identifiers gsrs-public-data-names gsrs-public-data-relationships gsrs-public-data-substances)
for query in "${queries[@]}"; do
echo "Transforming $query.rqg"
java -Xmx8G -jar sparql-generate.jar -l INFO -q etc/transformation/GSRS/$query.rqg -o $query.ttl
done
result=gsrs-transformed.ttl
rm -rf $result
for query in "${queries[@]}"; do
cat $query.ttl >>$result
done
- name: Combine GSRS with IDMP
run: |
source_files=(gsrs-transformed.ttl AboutIDMPDev-ReferenceIndividuals.ttl)
output_file=gsrs-final.ttl
# Loop through the source files and append their contents to the output file
for file in "${source_files[@]}"; do
cat $file >> $output_file
done
- name: Run unit tests using Apache Jena
run: |
java -Xmx8G -jar etc/unit_tests/target/unit-test-runner-1.0.jar \
-ontology_location ./gsrs-final.ttl \
-root_folder etc/unit_tests/ \
-cq_source etc/CQ/Example/ \
-config_file configs/gsrs_tests_config.yaml
if [ $? != 0 ];
then
exit $?
fi
19 changes: 0 additions & 19 deletions etc/transformation/GSRS/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions etc/transformation/GSRS/_common.sh

This file was deleted.

141 changes: 0 additions & 141 deletions etc/transformation/GSRS/gsrs-public-data-identifiers.rqg

This file was deleted.

63 changes: 0 additions & 63 deletions etc/transformation/GSRS/gsrs-public-data-names.rqg

This file was deleted.

Loading

0 comments on commit c8168ca

Please sign in to comment.