Skip to content

Commit f317b93

Browse files
committed
add some linkml dev notes
1 parent e27cb3c commit f317b93

File tree

1 file changed

+37
-0
lines changed
  • rocrate_validator/profiles/workflow-ro-crate-linkml

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Development notes for LinkML Workflow RO-Crate profile
2+
3+
## Setup
4+
1. Create a folder for the profile under `rocrate_validator/profiles`
5+
1. Copy across `profile.ttl` from another profile & update that metadata for the new profile.
6+
In particular, change the token for the profile to a new and unique name, e.g.
7+
`prof:hasToken "workflow-ro-crate-linkml"`. This is the name which can be used to
8+
select the profile using `--profile-identifier` argument
9+
1. Create a `profile-name.yaml` file - this is where you will write the LinkML.
10+
1. Create a test folder for the profile under `tests/integration/profiles`
11+
1. Copy the style of other profiles' tests to build up a test suite for the profile.
12+
Add any required RO-Crate test data under `tests/crates/` and create corresponding
13+
classes in `tests/ro_crates.py` which can be used to fetch the data during the tests
14+
15+
## Converting LinkML to SHACL
16+
17+
```
18+
linkml generate shacl --include-annotations --non-closed workflow-ro-crate.yaml > workflow-ro-crate.ttl
19+
```
20+
21+
## Error message "The requirement check cannot be None"
22+
23+
Occurred intermittently when running the validator on test cases - the first run would be fine, but later runs would then have this error. It's something to do with how the SHACL checks are instantiated in Python. Maybe a caching issue?
24+
25+
Resolved by ensuring generated SHACL uses non-closed shapes (which should be the case in most profiles?) Not sure why this works.
26+
27+
```
28+
[2024-10-10 15:22:13,315] WARNING in models: Unexpected error during check <rocrate_validator.requirements.shacl.checks.SHACLCheck object at 0x7f4e2195aea0> - PropertyShape -
29+
mainEntity of Main Workflow entity existence: Check if the Main Workflow is specified through a `mainEntity` property in the root data entity (2807297706545425892) - PropertyShape - mainEntity of
30+
Main Workflow entity existence: Check if the Main Workflow is specified through a `mainEntity` property in the root data entity (2807297706545425892). Exception: The requirement check cannot be
31+
None
32+
[2024-10-10 15:22:13,316] WARNING in models: Consider reporting this as a bug.
33+
[2024-10-10 15:22:13,629] WARNING in models: Unexpected error during check <rocrate_validator.requirements.shacl.checks.SHACLCheck object at 0x7f4e2195acf0> - PropertyShape -
34+
mainEntity of RootDataEntity: Check if the Main Workflow is specified through a `mainEntity` property in the root data entity (2807297706545425892) - PropertyShape - mainEntity of RootDataEntity:
35+
Check if the Main Workflow is specified through a `mainEntity` property in the root data entity (2807297706545425892). Exception: The requirement check cannot be None
36+
[2024-10-10 15:22:13,629] WARNING in models: Consider reporting this as a bug.
37+
```

0 commit comments

Comments
 (0)