Skip to content

Commit

Permalink
Merge pull request #10924 from obophenotype/refactor-build-system
Browse files Browse the repository at this point in the history
Refactor build pipeline and add synonyms to some translations
  • Loading branch information
matentzn authored Dec 12, 2024
2 parents dc191ea + 3a8e85b commit 79c6839
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
ontology_qc:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: obolibrary/odkfull:v1.5.2
container: obolibrary/odkfull:v1.5.4

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
24 changes: 21 additions & 3 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# More information: https://github.com/INCATools/ontology-development-kit/

# Fingerprint of the configuration file when this Makefile was last generated
CONFIG_HASH= 0fcd636feea85fce01a9e5009487aad06aedf4ba32833cb10c92bcf68fbc2cc2
CONFIG_HASH= 3a5afcd02a25dc79d50036cccc5351438f736858c55ac01f7abd367aa2dd6172


# ----------------------------------------
Expand Down Expand Up @@ -63,7 +63,7 @@ PATTERN_RELEASE_FILES= $(PATTERNDIR)/definitions.owl $(PATTERNDIR)/pattern.

TRANSLATIONSDIR= ../translations
BABELONPY= babelon -q
TRANSLATIONS_OWL=$(TRANSLATIONSDIR)/hp-de.babelon.owl $(TRANSLATIONSDIR)/hp-it.babelon.owl $(TRANSLATIONSDIR)/hp-nl.babelon.owl $(TRANSLATIONSDIR)/hp-nl.synonyms.owl $(TRANSLATIONSDIR)/hp-fr.babelon.owl $(TRANSLATIONSDIR)/hp-fr.synonyms.owl $(TRANSLATIONSDIR)/hp-cs.babelon.owl $(TRANSLATIONSDIR)/hp-cs.synonyms.owl $(TRANSLATIONSDIR)/hp-pt.babelon.owl $(TRANSLATIONSDIR)/hp-pt.synonyms.owl $(TRANSLATIONSDIR)/hp-tr.babelon.owl $(TRANSLATIONSDIR)/hp-zh.babelon.owl $(TRANSLATIONSDIR)/hp-nna.babelon.owl $(TRANSLATIONSDIR)/hp-tw.babelon.owl $(TRANSLATIONSDIR)/hp-dtp.babelon.owl $(TRANSLATIONSDIR)/hp-ja.babelon.owl $(TRANSLATIONSDIR)/hp-es.babelon.owl
TRANSLATIONS_OWL=$(TRANSLATIONSDIR)/hp-de.babelon.owl $(TRANSLATIONSDIR)/hp-de.synonyms.owl $(TRANSLATIONSDIR)/hp-it.babelon.owl $(TRANSLATIONSDIR)/hp-it.synonyms.owl $(TRANSLATIONSDIR)/hp-nl.babelon.owl $(TRANSLATIONSDIR)/hp-nl.synonyms.owl $(TRANSLATIONSDIR)/hp-fr.babelon.owl $(TRANSLATIONSDIR)/hp-fr.synonyms.owl $(TRANSLATIONSDIR)/hp-cs.babelon.owl $(TRANSLATIONSDIR)/hp-cs.synonyms.owl $(TRANSLATIONSDIR)/hp-pt.babelon.owl $(TRANSLATIONSDIR)/hp-pt.synonyms.owl $(TRANSLATIONSDIR)/hp-tr.babelon.owl $(TRANSLATIONSDIR)/hp-tr.synonyms.owl $(TRANSLATIONSDIR)/hp-zh.babelon.owl $(TRANSLATIONSDIR)/hp-zh.synonyms.owl $(TRANSLATIONSDIR)/hp-nna.babelon.owl $(TRANSLATIONSDIR)/hp-tw.babelon.owl $(TRANSLATIONSDIR)/hp-dtp.babelon.owl $(TRANSLATIONSDIR)/hp-ja.babelon.owl $(TRANSLATIONSDIR)/hp-ja.synonyms.owl $(TRANSLATIONSDIR)/hp-es.babelon.owl $(TRANSLATIONSDIR)/hp-es.synonyms.owl
TRANSLATIONS_TSV=$(TRANSLATIONSDIR)/hp-de-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-it-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-nl-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-fr-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-cs-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-pt-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-tr-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-zh-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-nna-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-tw-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-dtp-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-ja-preprocessed.babelon.tsv $(TRANSLATIONSDIR)/hp-es-preprocessed.babelon.tsv
TRANSLATION_FILES=$(TRANSLATIONSDIR)/$(ONT)-all.babelon.tsv $(TRANSLATIONSDIR)/$(ONT)-all.babelon.json

Expand Down Expand Up @@ -690,6 +690,9 @@ TRANSLATE_PREDICATES=rdfs:label
$(TRANSLATIONSDIR)/hp-de.babelon.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-de.babelon.tsv" -O $@

$(TRANSLATIONSDIR)/hp-de.synonyms.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-de.synonyms.tsv" -O $@



$(TRANSLATIONSDIR)/hp-de-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TRANSLATIONSDIR)/hp-de.babelon.tsv
Expand All @@ -709,6 +712,9 @@ $(TRANSLATIONSDIR)/hp-de-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TR
$(TRANSLATIONSDIR)/hp-it.babelon.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-it.babelon.tsv" -O $@

$(TRANSLATIONSDIR)/hp-it.synonyms.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-it.synonyms.tsv" -O $@



$(TRANSLATIONSDIR)/hp-it-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TRANSLATIONSDIR)/hp-it.babelon.tsv
Expand Down Expand Up @@ -816,6 +822,9 @@ $(TRANSLATIONSDIR)/hp-pt-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TR
$(TRANSLATIONSDIR)/hp-tr.babelon.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-tr.babelon.tsv" -O $@

$(TRANSLATIONSDIR)/hp-tr.synonyms.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-tr.synonyms.tsv" -O $@



$(TRANSLATIONSDIR)/hp-tr-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TRANSLATIONSDIR)/hp-tr.babelon.tsv
Expand All @@ -835,6 +844,9 @@ $(TRANSLATIONSDIR)/hp-tr-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TR
$(TRANSLATIONSDIR)/hp-zh.babelon.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-zh.babelon.tsv" -O $@

$(TRANSLATIONSDIR)/hp-zh.synonyms.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-zh.synonyms.tsv" -O $@



$(TRANSLATIONSDIR)/hp-zh-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TRANSLATIONSDIR)/hp-zh.babelon.tsv
Expand Down Expand Up @@ -909,7 +921,10 @@ $(TRANSLATIONSDIR)/hp-dtp-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(T


$(TRANSLATIONSDIR)/hp-ja.babelon.tsv:
wget "https://raw.githubusercontent.com/ogishima/HPO-Japanese/master/HPO-japanese.alpha.21Jul2023.tsv" -O $@
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-ja.babelon.tsv" -O $@

$(TRANSLATIONSDIR)/hp-ja.synonyms.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-ja.synonyms.tsv" -O $@



Expand All @@ -930,6 +945,9 @@ $(TRANSLATIONSDIR)/hp-ja-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TR
$(TRANSLATIONSDIR)/hp-es.babelon.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-es.babelon.tsv" -O $@

$(TRANSLATIONSDIR)/hp-es.synonyms.tsv:
wget "https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-es.synonyms.tsv" -O $@



$(TRANSLATIONSDIR)/hp-es-preprocessed.babelon.tsv: $(TRANSLATIONS_ONTOLOGY) $(TRANSLATIONSDIR)/hp-es.babelon.tsv
Expand Down
1 change: 0 additions & 1 deletion src/ontology/build-without-imports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ echo docker pull obolibrary/odkfull:$ODK

ODK_TAG=$ODK sh run.sh make hpoa_clean -B
test -f tmp/hpo-annotation-data/README.md
ODK_TAG=$ODK sh run.sh make MIR=false IMP=false prepare_release -B
ODK_TAG=$ODK sh run.sh make MIR=false IMP=false babelon prepare_release -B
ODK_TAG=$ODK sh run.sh make hpoa -B
ODK_TAG=$ODK sh run.sh make hpo_diff -B
14 changes: 13 additions & 1 deletion src/ontology/hp-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,17 @@ babelon_translation_group:
products:
- id: hp-de
auto_translate: FALSE
include_robot_template_synonyms: TRUE
maintenance: mirror
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-de.synonyms.tsv
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-de.babelon.tsv
language: de
- id: hp-it
auto_translate: FALSE
include_robot_template_synonyms: TRUE
maintenance: mirror
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-it.babelon.tsv
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-it.synonyms.tsv
language: it
- id: hp-nl
include_robot_template_synonyms: TRUE
Expand All @@ -142,13 +146,17 @@ babelon_translation_group:
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-pt.babelon.tsv
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-pt.synonyms.tsv
- id: hp-tr
include_robot_template_synonyms: TRUE
language: tr
maintenance: mirror
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-tr.babelon.tsv
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-tr.synonyms.tsv
- id: hp-zh
include_robot_template_synonyms: TRUE
language: zh
maintenance: mirror
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-zh.babelon.tsv
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-zh.synonyms.tsv
- id: hp-nna
language: nna
maintenance: mirror
Expand All @@ -162,13 +170,17 @@ babelon_translation_group:
maintenance: mirror
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-dtp.babelon.tsv
- id: hp-ja
include_robot_template_synonyms: TRUE
language: ja
maintenance: mirror
mirror_babelon_from: https://raw.githubusercontent.com/ogishima/HPO-Japanese/master/HPO-japanese.alpha.21Jul2023.tsv
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-ja.babelon.tsv
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-ja.synonyms.tsv
- id: hp-es
include_robot_template_synonyms: TRUE
language: es
maintenance: mirror
mirror_babelon_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-es.babelon.tsv
mirror_synonyms_from: https://raw.githubusercontent.com/obophenotype/hpo-translations/main/babelon/hp-es.synonyms.tsv
robot_report:
release_reports: True
fail_on : ERROR
Expand Down
2 changes: 2 additions & 0 deletions src/ontology/hp.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -637,3 +637,5 @@ $(TMPDIR)/hp-%-merged.owl: hp-base.owl tmp/%.owl
mappings:
$(MAKE_FAST) ../mappings/hp-snomed.lexmatch.sssom.tsv

babelon:
pip install -U babelon==0.3.4 --break-system-packages
2 changes: 2 additions & 0 deletions src/translations/hp-es.synonyms.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
subject_id translation_value comment
ID AL oboInOwl:hasExactSynonym@es
2 changes: 2 additions & 0 deletions src/translations/hp-it.synonyms.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
subject_id translation_value comment
ID AL oboInOwl:hasExactSynonym@it
2 changes: 2 additions & 0 deletions src/translations/hp-tr.synonyms.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
subject_id translation_value comment
ID AL oboInOwl:hasExactSynonym@tr

0 comments on commit 79c6839

Please sign in to comment.