Skip to content

Commit 039fa1c

Browse files
Copilotrdhyee
andauthored
Fix broken vocabulary links by restoring generation from TTL sources (#46)
* Initial plan * Fix vocabulary generation script to use Python instead of vocab command Co-authored-by: rdhyee <[email protected]> * Update vocabulary links in models/index.qmd to point to generated files Co-authored-by: rdhyee <[email protected]> * Fix vocabulary links to point to .html files instead of .qmd sources Co-authored-by: rdhyee <[email protected]> * Remove generated files from git, update .gitignore, and clean up script Co-authored-by: rdhyee <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: rdhyee <[email protected]>
1 parent 2600f54 commit 039fa1c

File tree

4 files changed

+15
-13
lines changed

4 files changed

+15
-13
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ uv.lock
33
plantuml-images
44
docs
55

6+
# Generated vocabulary documentation (but keep readme.md files)
7+
models/generated/vocabularies/*.qmd
8+
models/generated/vocabularies/*.md
9+
!models/generated/vocabularies/readme.md
10+
models/generated/extensions/*.md
11+
!models/generated/extensions/readme.md
12+
613
# Large data files
714
*.parquet
815

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
this folder contains markdown output for extension vocabularies
1+
this folder contains markdown output for extension vocabularies

models/index.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ The iSamples taxonomies are used to characterize three fundamental concepts pert
3737

3838
Three taxonomies are currently defined :
3939

40-
[Material Sample (specimen) Type Vocabulary](https://isamplesorg.github.io/metadata/vocabularies/specimentype.html)
40+
[Material Sample (specimen) Type Vocabulary](generated/vocabularies/material_sample_object_type.html)
4141

42-
[Materials Vocabulary](https://isamplesorg.github.io/metadata/vocabularies/materialtype.html)
42+
[Materials Vocabulary](generated/vocabularies/material_type.html)
4343

44-
[Sampled Feature (context) Type vocabulary](https://isamplesorg.github.io/metadata/vocabularies/sampledfeature.html)
44+
[Sampled Feature (context) Type vocabulary](generated/vocabularies/sampled_feature_type.html)
4545

4646

scripts/generate_vocab_docs.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
# get the core sample type vocabularies
88
SCRIPT_FOLDER="$(dirname ${0})"
9-
#SOURCE_BASE="https://raw.githubusercontent.com/isamplesorg/metadata/develop/src/vocabularies/"
109

1110
SOURCE_BASE="https://raw.githubusercontent.com/isamplesorg/vocabularies/main/vocabulary/"
1211

@@ -16,8 +15,7 @@ mkdir -p "${DEST_FOLDER}"
1615
for src in ${SOURCES[@]}; do
1716
fname="${src%%.*}.qmd"
1817
echo "Generating ${fname}..."
19-
# python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
20-
vocab markdown "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
18+
python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
2119
done
2220

2321
#
@@ -35,8 +33,7 @@ mkdir -p "${DEST_FOLDER}"
3533
for src in ${SOURCES[@]}; do
3634
fname="${src%%.*}.md"
3735
echo "Generating ${fname}..."
38-
# python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
39-
vocab markdown "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
36+
python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
4037
done
4138

4239
SOURCE_BASE="https://raw.githubusercontent.com/isamplesorg/metadata_profile_archaeology/main/vocabulary/"
@@ -46,8 +43,7 @@ mkdir -p "${DEST_FOLDER}"
4643
for src in ${SOURCES[@]}; do
4744
fname="${src%%.*}.md"
4845
echo "Generating ${fname}..."
49-
# python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
50-
vocab markdown "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
46+
python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
5147
done
5248

5349
SOURCE_BASE="https://raw.githubusercontent.com/isamplesorg/metadata_profile_biology/main/vocabulary/"
@@ -57,8 +53,7 @@ mkdir -p "${DEST_FOLDER}"
5753
for src in ${SOURCES[@]}; do
5854
fname="${src%%.*}.md"
5955
echo "Generating ${fname}..."
60-
# python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
61-
vocab markdown "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
56+
python "${SCRIPT_FOLDER}/vocab2md.py" "${SOURCE_BASE}${src}" > "${DEST_FOLDER}${fname}"
6257
done
6358

6459
echo "Done."

0 commit comments

Comments
 (0)