Create widoco mockup#440
Conversation
b820d86 to
601b73c
Compare
There was a problem hiding this comment.
Looks good. This nerd sniped me to look into how the json-ld could be formatted more nicely so that the templates don't need to run these queries using for loops. A modified owl2json.py could look like this.
I also tried to change the templates to use this alternative json-ld structure using AI. This worked and approximately halved all the templates in size while being much faster to generate and still having the same result (from what I can tell). I added a pull request with the changes so that it is clear how this could look.
|
|
||
| # Load the OWL file (RDF/XML format) | ||
| g = Graph() | ||
| g.parse("PaNET.owl", format="xml") # Replace with your file path |
There was a problem hiding this comment.
I know this file existed in an earlier version, but now it no longer does in the _data directory. Maybe remove the PaNET.json and PaNET_metadata.json generation? Or run these conversions conditionally?
There was a problem hiding this comment.
You are absolutely right. I do not use the unreasoned owl anymore. And I also figured out that the author information etc from PaNET_metadata are also included in the owl files. So only the conversion of PaNET_reasoned.owl is needed.
| {% assign output = include.text | replace: "\n", "<br><br>" %} | ||
| {% comment %} | ||
| The assign command is in principal correct; I tested it with other strings. | ||
| However, this replace does not work. why? | ||
| {% endcomment %} |
There was a problem hiding this comment.
This works when having an actual newline in instead of \n here.
| {% assign output = include.text | replace: "\n", "<br><br>" %} | |
| {% comment %} | |
| The assign command is in principal correct; I tested it with other strings. | |
| However, this replace does not work. why? | |
| {% endcomment %} | |
| {% assign output = include.text | replace: ' | |
| ', '<br>' %} |
There was a problem hiding this comment.
A simple approach for styling the other things in the abstract would be like this:
{%- assign output = output | replace: 'https://expands.eu/', '<a href="https://expands.eu/">https://expands.eu/</a>' -%}
{%- assign output = output | replace: 'https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology', '<a href="https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology">https://github.com/ExPaNDS-eu/ExPaNDS-experimental-techniques-ontology</a>' -%}
{%- assign output = output | replace: 'https://doi.org/10.1107/S1600577525005272', '<a href="https://doi.org/10.1107/S1600577525005272">https://doi.org/10.1107/S1600577525005272</a>' -%}
{%- assign output = output | replace: 'https://doi.org/10.5281/zenodo.4806026', '<a href="https://doi.org/10.5281/zenodo.4806026">https://doi.org/10.5281/zenodo.4806026</a>' -%}
{%- assign output = output | replace: '<br>Purpose<br>', '<br><strong>Purpose</strong><br>' -%}
{%- assign output = output | replace: '<br>Design philosophy<br>', '<br><strong>Design philosophy</strong><br>' -%}There was a problem hiding this comment.
Wow! Looks great!
ac5bb5f to
2f94904
Compare
|
@eilmiv Thanks for your suggestions. I updated the code following your more simple comments. Maybe the detailed workover you suggested should be part of a dedicated merge request? |
Yes, if you want to go in that direction. |
paulmillar
left a comment
There was a problem hiding this comment.
I don't think it makes sense to commit docs/_data/PaNET_reasoned.json and PaNET_reasoned.owl into git. These should be (auto-)generated.
9eaaff7 to
ecbcfa3
Compare
ecbcfa3 to
cfd988e
Compare
Work in Progress! ToDo: see pink, italic text on webpage, marked as paragraph of class comment. Motivation The possbilities to customize the Ontology Specification created with widoco are very limited. However, it would be great to adapt the style of the generated page (colors, font, ...), but also the displayed content (adding links to PaN Finder and PaN Training to each term). Modification We can recreate the widoco page using jekyll pages based on the PaNET output: PaNET_reasoned.owl. Result The new page is fully customizable by us. Related Issues Related to pan-ontologies#399 Webpage: Display subclasses with label Motivation The list of subclasses on the ontology specification webpage is currently displayed by their IRI, which is not human-friendly. Modification The corresponding label of a technique is now displayed instead of the IRI. Result More human friendly design Webpage: Add equivalent classes Motivation The widoco pages give an overview of the equivalent classes of a technique. This feature should also be provided in the new version of the Ontology Specification page. Modification A function has been added that finds the checks if a term has equivalent classes and displays them then. The list of equivalent classes is connected by an id, which makes the identification (IRI and label) of a term more complicated than for subclasses. Result The equivalent classes are properly displayed including links Webpage: correct the list for has-super-classes Motivation The list previously given under "has subclass" is actually the list for "has super-class". The reason for this confusion is the list in the json file labeled "subClassOf". Modification The headline has been corrected. Result The list is now under the correct heading. Add 'has subclass' information on webpage Motivation The subclasses of a given class provide more context and more detailed information and should be available on the ontology specification page (previous widoco). Modification The information on the subclasses of a class are only indirectly given, only the superclasses are provided explicitly in PaNET_reasoned.owl. A for loop has been created that inspects all classes if they have a superclass that corresponds to the target class. Result The subclasses are provided. Improved website layout: colors and indentation To reduce the number of colors on the page, the background color of detail and overview boxes was set to white (instead of light gray). The indentation of the alt-label list was removed. Update Acronym on webpage The spelling of "PaNET" has been updated from (PANET) in the header and title of the webpage. Add 2nd group of equivalent terms on webpage Motivation After handling the equivalent descriptions of a term with intersections (AND), I recognized that a second group exists. This group is described by restrictions (SOME). Modification I added a second function to the "is equivalent to" section that handles the second type of equivalence. Result Complete description of equivalence. Minor clean up of ontology specification page Deleting some div and p. Removing colons. Add accordion menu for superclasses, supclasses equivalent classes Motviation The detailed information on the techniques can be overwhelming. The initial input should be reduced. Modification The details on super- and subclasses as well as equivalent classes are now hidded in accordions and can be extended on user request. Result Cleaner design. Overview box: highlighted alphabetical sections Motivation The overview box for techniques is currently very crowded and overwhelming by presenting all terms (alphabetically) in a justification block without visual separation Modification A script was added that adds the letter with which the terms of the next block start. Result Clearer layout removed some comments onof ontopages Cleanup Abstract of ontology specification page Init detail boxes for object properties Motivation The detailed information on the existing object properties will be displayed in dedicated boxes. Thes are highly similar to the detail boxes for classes. However, the footer part needs to display different aspects. Modification The include function(?) _includes/create_detail_box.html has been renamed to highlight its purpose to display class details. A second function has been created that highlights the aspects of object properties. Currently, the five foreseen parts are only placeholders. Add range and domain of object properties on onto spec page Add info on super properties on onto spec page Add info on characteristics of object properties on onto spec page Add sub-properties to obj properties of onto spec page Examples for Annoation Properties added on onto spec page Refine section headers on onto spec page Adapted font size of boxes on onto spec page Improved spacing on onto spec page Slightly improving spacing on onto spec page Improve bg color of detail box on onto spec page Rename onto spec file Motivation I want to integrate the work on the ontology specification page into the actual docs folder. The working document was labeled index.html so far, which is already in use in the docs folder. Therefore, renaming was necessary. Modification Renamed `onto_spec_page/index.html` to `onto_spec_page/ontology_specificaitons.html`. Integrate the onto specification page into the docs folder Motivation Previously, the development of the onto spec page has been performed in a separate folder. To display the page along with the other content, the page needs to be merged into the docs folder. Modification The ontology_specifications.html has been moved to the docs folder, along with all relevant files to define style elements and provide content. A dedicated item has been added to the navigation bar. Result The ontology specification page is integrated in the webpage. Update visible comments on onto spec page Motivation The onto spec page is still work in progress and contains visible comments on upcoming tasks (to do). Modification These comments have been updated to make them more professional Use of artifacts to generate jekyll Motivation To create the jekyll webpages, currently a hard copy of PaNET_reasoned.owl is provided in the docs folder. This file will always be stored in the git history and consume memory. A more elegant approach is to use artifacts instead. Modification The pipeline was updated to download the artifact of PaNET.owl and PaNET_reasoned.owl as provided by the build-panet step (Archive generated PaNET). Subsequently this file is copied to the jekyll folder and will be used by the ontology_specification.html. The old pipeline and old files were deleted. Result Cleaner data structure
cfd988e to
7092f3e
Compare
Motivation
The possbilities to customize the Ontology Specification created with widoco are very limited. However, it would be great to adapt the style of the generated page (colors, font, ...), but also the displayed content (adding links to PaN Finder and PaN Training to each term).
@paulmillar investigated the possibility to contribute to the widoco repo, but this seems to be very complicated.
Alternatively, we can recreate the page using jekyll pages based on the PaNET output: PaNET_reasoned.owl. The initial effort to generate such a page is relatively high as many information are listed implicitly (only SubclassOf explicitly given, but not SubclassFrom, etc). However, we can customize every aspect of the page ourselves.
Modification
A mockup of the widoco page has been created and is publicly available in parallel to the widoco page; "Browse PaNET (new)" and "Browse PaNET (old)".
Result
Currently, the many of the main features from widoco are already available, however some are still missing (indicated by comments on the page). Especially, the visual webVOWL representation is missing.
Related Issues
contributes to #399