Skip to content

Commit

Permalink
- Update testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
haideriqbal committed Aug 30, 2024
1 parent 0eb6ac1 commit 79a6dae
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
69 changes: 69 additions & 0 deletions dev-testing/teststack-mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash

if [ $# == 0 ]; then
echo "Usage: $0 <rel_json_config_url> <rel_output_dir>"
echo "If <rel_json_config_url> is a file it will read and load this single configuration."
echo "If <rel_json_config_url> as a directory, it will read and load all json configuration in the directory and
subdirectories."
exit 1
fi

config_url=$1
out_dir=$2

# Create or clean output directory
if [ -d "$out_dir" ]; then
echo "$out_dir already exists and will now be cleaned."
rm -Rf $out_dir/*
else
echo "$out_dir does not exist and will now be created."
mkdir "$out_dir"
fi

function process_config {
echo "process_config param1="$1
echo "process_config param2="$2

local config_url=$1
local out_dir=$2


if [ -d "$config_url" ]; then
echo "$config_url is a directory. Processing config files in $config_url"
local basename=$(basename $config_url)
echo "basename for config_url="$basename
local out_dir_basename=$out_dir/$basename
mkdir $out_dir_basename
for filename in $config_url/*.json; do
echo "filename="$filename
process_config $filename $out_dir_basename
done
for dir in $config_url/*/; do
process_config $dir $out_dir_basename
done
elif [ -f "$config_url" ]; then
echo "$config_url is a file. Processing single config file."
local basename=$(basename $config_url .json)

local relative_out_dir=$out_dir/$basename
mkdir $relative_out_dir

local absolute_out_dir=$(realpath -q $relative_out_dir)
echo "absolute_out_dir="$absolute_out_dir

$OLS4_HOME/dataload/create_datafiles.sh $config_url $absolute_out_dir --noDates

$OLS4_HOME/dev-testing/load_test_into_solr.sh $absolute_out_dir
else
echo "$config_url does not exist."
fi
}

$OLS4_HOME/dev-testing/clean-neo4j.sh
$OLS4_HOME/dev-testing/clean-solr.sh
$OLS4_HOME/dev-testing/start-solr.sh

process_config $config_url $out_dir

$OLS4_HOME/dev-testing/load_test_into_neo4j.sh $out_dir
$OLS4_HOME/dev-testing/start-neo4j.sh

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
":START_ID",":TYPE",":END_ID","_json"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym","http://www.w3.org/2000/01/rdf-schema#subPropertyOf","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym","directParent","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasExactSynonym","http://www.w3.org/2000/01/rdf-schema#subPropertyOf","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasExactSynonym","directParent","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym","http://www.w3.org/2000/01/rdf-schema#subPropertyOf","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym","directParent","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym","http://www.w3.org/2000/01/rdf-schema#subPropertyOf","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
"oio+property+http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym","directParent","oio+property+http://www.geneontology.org/formats/oboInOwl#hasSynonym","{}"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"id:ID",":LABEL","_json"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"id:ID",":LABEL","_json","iri","numberOfIndividuals:string[]","linkedEntities:string[]","ontology_purl:string[]","numDescendants:string[]","numberOfProperties:string[]","numberOfClasses:string[]","language:string[]","numHierarchicalDescendants:string[]","isObsolete:string[]","label:string[]","importsFrom:string[]","type:string[]","directAncestor:string[]","exportsTo:string[]","base_uri:string[]","http__//www.w3.org/2000/01/rdf-schema#comment:string[]","imported:string[]","numberOfEntities:string[]","ontologyId:string[]","http__//www.w3.org/2000/01/rdf-schema#label:string[]","definition:string[]","http__//www.w3.org/1999/02/22-rdf-syntax-ns#type:string[]"
"oio+ontology+http://www.geneontology.org/formats/oboInOwl","Ontology","{""ontologyId"":""oio"",""importsFrom"":[],""exportsTo"":[""gitissue502""],""iri"":""http://www.geneontology.org/formats/oboInOwl"",""ontology_purl"":""https://gist.githubusercontent.com/haideriqbal/4a2b1a9aa81d9fa26cae81e0b0b7730b/raw/527665128b9be9d7d6133f9a796379600151c737/oboInOwl.owl"",""base_uri"":[""http://www.geneontology.org/formats/oboInOwl#""],""type"":[""ontology""],""definition"":[{""type"":[""literal""],""value"":""OBO Format metamodel. This meta-ontology is self-describing. OBO metamodel properties are described using OBO metamodel properties""},{""type"":[""literal""],""value"":""\n This is an OWL translation of an ontology whose native representational form is .obo. The translation was performed using the oboInOwl xslt library. For details, see http://www.berkeleybop.org/obo-conv.cgi\n ""}],""directAncestor"":[],""http://www.w3.org/1999/02/22-rdf-syntax-ns#type"":""http://www.w3.org/2002/07/owl#Ontology"",""http://www.w3.org/2000/01/rdf-schema#comment"":[{""type"":[""literal""],""value"":""OBO Format metamodel. This meta-ontology is self-describing. OBO metamodel properties are described using OBO metamodel properties""},{""type"":[""literal""],""value"":""\n This is an OWL translation of an ontology whose native representational form is .obo. The translation was performed using the oboInOwl xslt library. For details, see http://www.berkeleybop.org/obo-conv.cgi\n ""}],""http://www.w3.org/2000/01/rdf-schema#label"":{""type"":[""literal""],""value"":""""},""imported"":false,""isObsolete"":false,""label"":{""type"":[""literal""],""value"":""""},""language"":{""type"":[""literal""],""value"":""en""},""numDescendants"":0.0,""numHierarchicalDescendants"":0.0,""numberOfClasses"":{""type"":[""literal""],""value"":""12""},""numberOfEntities"":{""type"":[""literal""],""value"":""56""},""numberOfIndividuals"":{""type"":[""literal""],""value"":""0""},""numberOfProperties"":{""type"":[""literal""],""value"":""44""},""searchableAnnotationValues"":[false,{""type"":[""literal""],""value"":""en""},{""type"":[""literal""],""value"":""12""},{""type"":[""literal""],""value"":""56""},{""type"":[""literal""],""value"":""0""},{""type"":[""literal""],""value"":""44""}],""linkedEntities"":{""http://www.w3.org/2000/01/rdf-schema#comment"":{""definedBy"":[""rdfs""],""numAppearsIn"":2.0,""hasLocalDefinition"":false,""label"":{""type"":[""literal""],""value"":""comment""},""curie"":{""type"":[""literal""],""value"":""RDFS:comment""},""type"":[""property"",""entity""]},""http://www.w3.org/2000/01/rdf-schema#label"":{""definedBy"":[""rdfs""],""numAppearsIn"":3.0,""hasLocalDefinition"":false,""label"":{""type"":[""literal""],""value"":""label""},""curie"":{""type"":[""literal""],""value"":""RDFS:label""},""type"":[""property"",""entity""]}}}","http://www.geneontology.org/formats/oboInOwl","0","","https://gist.githubusercontent.com/haideriqbal/4a2b1a9aa81d9fa26cae81e0b0b7730b/raw/527665128b9be9d7d6133f9a796379600151c737/oboInOwl.owl","0.0","44","12","en","0.0","false","","","ontology","","gitissue502","http://www.geneontology.org/formats/oboInOwl#","OBO Format metamodel. This meta-ontology is self-describing. OBO metamodel properties are described using OBO metamodel properties|
This is an OWL translation of an ontology whose native representational form is .obo. The translation was performed using the oboInOwl xslt library. For details, see http://www.berkeleybop.org/obo-conv.cgi
","false","56","oio","","OBO Format metamodel. This meta-ontology is self-describing. OBO metamodel properties are described using OBO metamodel properties|
This is an OWL translation of an ontology whose native representational form is .obo. The translation was performed using the oboInOwl xslt library. For details, see http://www.berkeleybop.org/obo-conv.cgi
","http://www.w3.org/2002/07/owl#Ontology"
Loading

0 comments on commit 79a6dae

Please sign in to comment.