Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
modify workflow files and scripts to account for new quantities file
  • Loading branch information
jsimonclark committed Sep 8, 2024
1 parent 9978776 commit 713c09c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
--skip test_quantity_dimension \
--configfile=.github/utils/emmocheck_config.yml \
electrochemicalquantities.ttl
elif [ -f "modules/electrochemistry-quantities.ttl" ]; then
elif [ -f "modules/quantities.ttl" ]; then
emmocheck --verbose --url-from-catalog \
--skip test_namespace \
--skip test_quantity_dimension \
--configfile=.github/utils/emmocheck_config.yml \
modules/electrochemistry-quantities.ttl
modules/quantities.ttl
else
echo "electrochemicalquantities.ttl or modules/electrochemistry-quantities.ttl not found!"
echo "electrochemicalquantities.ttl or modules/quantities.ttl not found!"
exit 1
fi
12 changes: 6 additions & 6 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ jobs:
# For older versions
python docs/scripts/apply_foops_recommendations.py electrochemicalquantities.ttl electrochemicalquantities-foops.ttl
sudo cp "electrochemicalquantities-foops.ttl" "docs/_build/html/versions/$TAG/electrochemicalquantities.ttl"
elif [ -f "modules/electrochemistry-quantities.ttl" ]; then
elif [ -f "modules/quantities.ttl" ]; then
# For newer versions
python docs/scripts/apply_foops_recommendations.py modules/electrochemistry-quantities.ttl electrochemistry-quantities-foops.ttl
sudo cp "electrochemistry-quantities-foops.ttl" "docs/_build/html/versions/$TAG/electrochemistry-quantities.ttl"
python docs/scripts/apply_foops_recommendations.py modules/quantities.ttl quantities-foops.ttl
sudo cp "quantities-foops.ttl" "docs/_build/html/versions/$TAG/quantities.ttl"
else
echo "File not found!"
exit 1
Expand All @@ -125,9 +125,9 @@ jobs:
if [ -f "electrochemicalquantities.ttl" ]; then
python docs/scripts/apply_foops_recommendations.py electrochemicalquantities.ttl electrochemicalquantities-foops.ttl
sudo cp "electrochemicalquantities-foops.ttl" "docs/_build/html/electrochemicalquantities.ttl"
elif [ -f "modules/electrochemistry-quantities.ttl" ]; then
python docs/scripts/apply_foops_recommendations.py modules/electrochemistry-quantities.ttl electrochemistry-quantities-foops.ttl
sudo cp "electrochemistry-quantities-foops.ttl" "docs/_build/html/electrochemistry-quantities.ttl"
elif [ -f "modules/quantities.ttl" ]; then
python docs/scripts/apply_foops_recommendations.py modules/quantities.ttl quantities-foops.ttl
sudo cp "quantities-foops.ttl" "docs/_build/html/quantities.ttl"
else
echo "Electrochemical quantities file not found!"
exit 1
Expand Down
5 changes: 3 additions & 2 deletions docs/scripts/ttl_to_rst.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from rdflib import Graph
import os



Expand Down Expand Up @@ -142,8 +143,8 @@ def rendering_workflow():
# Check for old structure (root directory)
if os.path.isfile("./electrochemicalquantities.ttl"):
ttl_modules.append({"section title": "Quantities used in Electrochemistry", "path": "./electrochemicalquantities.ttl"})
elif os.path.isfile("./modules/electrochemistry-quantities.ttl"):
ttl_modules.append({"section title": "Quantities used in Electrochemistry", "path": "./modules/electrochemistry-quantities.ttl"})
elif os.path.isfile("./modules/quantities.ttl"):
ttl_modules.append({"section title": "Quantities used in Electrochemistry", "path": "./modules/quantities.ttl"})
else:
raise FileNotFoundError("No suitable TTL file found for electrochemical quantities.")

Expand Down

0 comments on commit 713c09c

Please sign in to comment.