Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenience check if customised ROBOT report config is out of date and update default config #998

Merged
merged 4 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading