Skip to content

Commit

Permalink
Merge pull request #998 from INCATools/issue552-custom-robot-reports-…
Browse files Browse the repository at this point in the history
…check

Add convenience check if customised ROBOT report config is out of date and update default config
  • Loading branch information
matentzn authored Feb 25, 2024
2 parents 981a7b6 + d3527de commit fd139a8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/odklite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ RUN wget -nv $ROBOT_JAR \
-O /tools/robot.jar && \
wget -nv https://raw.githubusercontent.com/ontodev/robot/v$ROBOT_VERSION/bin/robot \
-O /tools/robot && \
chmod 755 /tools/robot
chmod 755 /tools/robot &&\
wget -nv https://raw.githubusercontent.com/ontodev/robot/v$ROBOT_VERSION/robot-core/src/main/resources/report_profile.txt \
-O /tools/robot_report_profile.txt

# Install DOSDPTOOLS.
RUN wget -nv https://github.com/INCATools/dosdp-tools/releases/download/v$DOSDP_VERSION/dosdp-tools-$DOSDP_VERSION.tgz && \
Expand Down
7 changes: 7 additions & 0 deletions template/_dynamic_files.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ WARN duplicate_label_synonym
ERROR duplicate_label
WARN duplicate_scoped_synonym
WARN equivalent_pair
WARN equivalent_class_axiom_no_genus
ERROR illegal_use_of_built_in_vocabulary
WARN invalid_xref
ERROR label_formatting
ERROR label_whitespace
Expand All @@ -698,11 +700,16 @@ WARN missing_obsolete_label
ERROR missing_ontology_description
ERROR missing_ontology_license
ERROR missing_ontology_title
WARN missing_subset_declaration
INFO missing_superclass
WARN missing_synonymtype_declaration
ERROR misused_obsolete_label
ERROR misused_replaced_by
ERROR multiple_definitions
ERROR multiple_equivalent_classes
ERROR multiple_equivalent_class_definitions
ERROR multiple_labels
WARN invalid_entity_uri
{%- endif %}
{%- if 'basic' in project.release_artefacts or project.primary_release == 'basic' %}
^^^ src/ontology/keeprelations.txt
Expand Down
12 changes: 12 additions & 0 deletions template/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,18 @@ $(REPORTDIR)/$(SRC)-obo-report.tsv: $(SRCMERGED) | $(REPORTDIR)
$(REPORTDIR)/%-obo-report.tsv: % | $(REPORTDIR)
$(ROBOT) report -i $< $(REPORT_LABEL) $(REPORT_PROFILE_OPTS) --fail-on $(REPORT_FAIL_ON) {% if project.robot_report.use_base_iris %}{% if project.namespaces is not none %}{% for iri in project.namespaces %}--base-iri {{ iri }} {% endfor %}{% else %}--base-iri $(URIBASE)/{{ project.id.upper() }}_ --base-iri $(URIBASE)/{{ project.id }} {% endif %}{% endif -%} --print 5 -o $@

check_for_robot_updates:
{%- if project.robot_report.custom_profile %}
@cut -f2 "/tools/robot_report_profile.txt" | sort > $(TMPDIR)/sorted_tsv2.txt
@cut -f2 "$(ROBOT_PROFILE)" | sort > $(TMPDIR)/sorted_tsv1.txt
@comm -23 $(TMPDIR)/sorted_tsv2.txt $(TMPDIR)/sorted_tsv1.txt > $(TMPDIR)/missing.txt
@echo "Missing tests:"
@cat $(TMPDIR)/missing.txt
@rm $(TMPDIR)/sorted_tsv1.txt $(TMPDIR)/sorted_tsv2.txt $(TMPDIR)/missing.txt $(TMPDIR)/report_profile_robot.txt
{%- else %}
echo "You are not using a custom profile, so you are getting the joy of the latest ROBOT report!"
{% endif %}

# ----------------------------------------
# Release assets
# ----------------------------------------
Expand Down

0 comments on commit fd139a8

Please sign in to comment.