tno-terminology-design / tev2-tools

The Terminology Engine (v2) is a set of specifications and tools that caters for the creation and maintenance (i.e. curation) of terminologies. This repository contains the sources for the tools.
Apache License 2.0
2 stars 3 forks source link

MRGT produces errors in 'design-methods' repo without useful error messages #2

Closed RieksJ closed 11 months ago

RieksJ commented 1 year ago

I've just

When committing it all, the action-log shows the following:

image

The error message states that the path argument must be a string, but it leaves me clueless about how to resolve this.

Please:

Ca5e commented 1 year ago

The error is caused by the missing navpath property within the SAF, which definitely wasn't clear based on the error message. navpath currently isn't being checked as the specifications specify it is optional. I'll think about the interpretation of the SAF while refactoring, mostly because the function which handles this could possible be reused within all of the tools. This 'thinking' now includes more advanced warnings when certain expected items are missing.

Keeping this issue open until a solution is implemented.

RieksJ commented 1 year ago

The creation of an MRG should not stop because there is no navpath, as its value is a (relative) path to where curated texts will be rendered. If it doesn't exist, we could take this to mean that rendering of curated texts in the scope does not require a navpath, which would imply that the navurl field within the MRG could also remain empty. I would consider this situation worthy of logging, e.g., as a warning.

Ca5e commented 1 year ago

There exists a slight, but noteworthy, difference in not specifying a value for a key, and not specifying the key in a SAF. For instance, if we have website: in the SAF, this is interpreted as website = '', so as an empty string. If, on the other hand, we don't list the key website, then website = undefined. I understand we do not want the navurl MRG entry property to be created when either website or navpath is undefined or is empty, but are there no possible scenarios where we do want the navurl to be created, but without a leading website or the navpath being an empty string? I think setting saf.scope.website and saf.scope.navpath to an empty string when they don't exist may be a more straightforward approach. Meaning we do attempt to create the navurl.

RieksJ commented 1 year ago

I see the difference between undefined and empty string. I would like to decide what to do here based on what the user wants as opposed to what is implemented most easily, because users would do that any number of times whereas implementation, once done, would not.

For now, the experience of how all this would be used in practice is virtually non-existent. That suggests to me that we shouldn't impose all sorts of restrictions on users (curators), yet but warn them about possible problems that might arise. That would typically be something for the integrity-checker tool, but as it doesn't yet exist (and there is no concrete work going on there), I would say that in the meantime, it would be nice if the MRGT would produce such warnings.