-
Notifications
You must be signed in to change notification settings - Fork 7
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
docs: add "how it works" section #57
base: develop
Are you sure you want to change the base?
Changes from 13 commits
5245c35
b9d3a04
2536e97
66d97d7
847a8e9
57e20e2
a147b37
3ad3d13
aa8512f
f57599c
9328135
828a116
9bef630
ec6efe2
062aae5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
1_installation | ||
2_usage_cli | ||
3_usage_api | ||
4_how_it_works | ||
|
||
.. toctree:: | ||
:maxdepth: 5 | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,79 @@ | ||||||
.. | ||||||
Copyright (c) 2024 CRS4 | ||||||
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
you may not use this file except in compliance with the License. | ||||||
You may obtain a copy of the License at | ||||||
|
||||||
http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|
||||||
Unless required by applicable law or agreed to in writing, software | ||||||
distributed under the License is distributed on an "AS IS" BASIS, | ||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
See the License for the specific language governing permissions and | ||||||
limitations under the License. | ||||||
|
||||||
How It Works | ||||||
============ | ||||||
|
||||||
The `rocrate-validator` is designed to validate RO-Crates against predefined | ||||||
*validation profiles*. A validation profile is a set of validation rules, or | ||||||
*checks*, which are applied to the RO-Crate. If the RO-Crate conforms to all | ||||||
the rules, then it is deemed *valid*; otherwise, errors will be generated for | ||||||
each rule that failed to validate. | ||||||
|
||||||
Non-conformance to a rule will result in an *issue*. On the CLI, issues will | ||||||
be presented as error messages, with references to the specific rule which | ||||||
triggered the error. Note that multiple rules may have the same error message, | ||||||
which can result in output with apparently duplicate errors. | ||||||
|
||||||
Naturally, `rocrate-validator` is limited to validating conformance to RO-Crate | ||||||
profiles for which validation rules have been implemented. In the absence of | ||||||
any matching validation profiles, `rocrate-validator` may return an error or | ||||||
request the user to manually select a validation profile to apply. | ||||||
|
||||||
Validation profiles can be related by inheritance -- i.e., where one validation | ||||||
profile extends another one. Normally this happens with profiles that validate | ||||||
conformance to RO-Crate profiles that themselves extend a base profile, such as | ||||||
Workflow Testing RO-Crate, which extends Workflow RO-Crate. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find this remark confusing. I would simply say: "Validation profiles can be related by inheritance -- i.e., where one validation profile extends another one. For instance, Workflow Testing RO-Crate extends Workflow RO-Crate". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in ec6efe2 |
||||||
|
||||||
|
||||||
|
||||||
Validation profile selection | ||||||
---------------------------- | ||||||
|
||||||
* **Automatic Profile Matching** (default): | ||||||
By default, `rocrate-validator` will attempt to select the correct validation | ||||||
profiles for the input RO-Crate based on the `conformsTo` property. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- If a precise match is found for the `conformsTo` property, that profile is selected | ||||||
for validation. | ||||||
|
||||||
- If no precise match is found, the system will: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in ec6efe2 |
||||||
|
||||||
- in **Interactive Mode:** (available only through the CLI) the system | ||||||
will prompt the user to select a profile from the list of candidate | ||||||
profiles; | ||||||
|
||||||
- **Non-Interactive Mode:** the system will use all candidate profiles | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. still unclear There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in ec6efe2 |
||||||
for validation. If no suitable profile is found, the system will use | ||||||
the base `ro-crate` profile as a fallback. | ||||||
|
||||||
* **Profile Versions**: | ||||||
- It may happen that the RO-Crate profile version to which the input | ||||||
RO-Crate `conformsTo` does not match the version of the implemented | ||||||
validation profile. In this case, the validator will validate against the | ||||||
*highest available version* of the profile that is lower than the one | ||||||
requested. Thus, the validator will avoid applying a validation profile | ||||||
that is newer than the `conformsTo` profile. This behaviour can be | ||||||
overridden by manually selecting the desired validation profile (see below). | ||||||
|
||||||
.. note:: | ||||||
Profile versions are identified by matching the trailing version number | ||||||
in the profile identifier, if present. For instance, the identifier for | ||||||
the `ro-crate` profile version **1.0** is `ro-crate-1.0`, while the | ||||||
profile name without a version is simply `ro-crate`. | ||||||
|
||||||
* **Manual Profile Selection**: | ||||||
The user can always override the automatic selection of validation profiles | ||||||
by specifying (via CLI or API) which profile to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove the starting "Naturally, "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in ec6efe2