Skip to content

Commit c2373b7

Browse files
committed
Addressing python version for ontospy doc
1 parent f1d9af8 commit c2373b7

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ jobs:
7272
curl -sL https://raw.githubusercontent.com/ontodev/robot/master/bin/robot > robot
7373
chmod +x robot
7474
75+
- name: Set up Python
76+
uses: actions/setup-python@v5
77+
with:
78+
python-version: '3.11'
79+
7580
- name: Install Python packages
7681
run: |
7782
python -m pip install --upgrade pip
78-
pip install rdflib dotenv pylode==3.2.1 ontospy==2.1.1
83+
pip install rdflib dotenv pylode==3.2.1 "ontospy[HTML]"
7984
8085
- name: Validate ontology profile
8186
id: profile

src/scripts/ontology_build.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ def generate_ontospy_docs(outdir):
5656
index_file = os.path.join(ontospy_outdir, "index.html")
5757
try:
5858
subprocess.run([
59-
"ontospy",
60-
"gendocs",
61-
"-o", ontospy_outdir,
62-
"-n", # no-browser flag
63-
os.path.join(ONTO_DIR, ONTO_FILE)
59+
"python",
60+
"-c",
61+
"import sys, configparser; configparser.SafeConfigParser = getattr(configparser, 'SafeConfigParser', configparser.ConfigParser); sys.argv=['ontospy','gendocs','-o','{}','--nobrowser','{}']; from ontospy.cli import main_cli; main_cli()".format(ontospy_outdir, os.path.join(ONTO_DIR, ONTO_FILE)),
6462
], check=True, capture_output=True)
6563
print(f"Ontospy documentation generated at {ontospy_outdir}")
6664
except FileNotFoundError:

0 commit comments

Comments
 (0)