Skip to content

Commit

Permalink
Fixes for metadata validation in html output (CLARIAH/clariah-plus#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Aug 24, 2022
1 parent 07540fe commit 7e31712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codemeta/serializers/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def serialize_to_html( g: Graph, res: Union[Sequence,URIRef,None], args: AttribD
else:
index = get_index(g)
template = env.get_template(template)
return template.render(g=g,res=res, SDO=SDO,CODEMETA=CODEMETA, CODEMETAPY=CODEMETAPY, RDF=RDF,RDFS=RDFS,STYPE=SOFTWARETYPES, REPOSTATUS=REPOSTATUS, SKOS=SKOS, get_triples=get_triples, type_label=type_label, css=args.css, contextgraph=contextgraph, URIRef=URIRef, get_badge=get_badge, now=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), index=index, get_interface_types=get_interface_types,baseuri=args.baseuri,baseurl=args.baseurl, toolstore=args.toolstore, get_last_component=get_last_component, is_resource=is_resource, int=int, range=range, Literal=Literal, **kwargs)
return template.render(g=g,res=res, SDO=SDO,CODEMETA=CODEMETA, CODEMETAPY=CODEMETAPY, RDF=RDF,RDFS=RDFS,STYPE=SOFTWARETYPES, REPOSTATUS=REPOSTATUS, SKOS=SKOS, get_triples=get_triples, type_label=type_label, css=args.css, contextgraph=contextgraph, URIRef=URIRef, get_badge=get_badge, now=datetime.now().strftime("%Y-%m-%d %H:%M:%S"), index=index, get_interface_types=get_interface_types,baseuri=args.baseuri,baseurl=args.baseurl, toolstore=args.toolstore, get_last_component=get_last_component, is_resource=is_resource, int=int, range=range, str=str, Literal=Literal, **kwargs)



2 changes: 1 addition & 1 deletion codemeta/templates/validationrating.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% for _,_,review in g.triples((sscres, SDO.review,None)) %}
{% if (review, SDO.name, Literal("Automatic software metadata validation report")) in g %}
{% if str(g.value(review, SDO.name)).startswith("Automatic software metadata validation report") %}
{% if g.value(review, SDO.reviewRating) %}
{% set rating = int(g.value(review, SDO.reviewRating)) %}
<span class="rating{{ rating }}" title="Automatic software metadata rating, click to inspect validation report">
Expand Down

0 comments on commit 7e31712

Please sign in to comment.