ro-crate icon indicating copy to clipboard operation
ro-crate copied to clipboard

Soften Profile inheritence rules

Open stain opened this issue 2 years ago • 6 comments

In some cases, such as Workflow Run Crate there are multiple profiles that are related with inheritance.

There are also less strict inheritance profiles such as https://trefx.uk/trusted-wfrun-crate/0.3/

This section now makes it softer how to list multiple profiles, they are suggestions rather than enforcing any hierarchy.

stain avatar May 23 '23 01:05 stain

Didn't we decide to remove all this from 1.2? @stain

ptsefton avatar Jul 27 '23 20:07 ptsefton

This needs to be moved to a different document, right?

ptsefton avatar Sep 28 '23 21:09 ptsefton

Remove inheritance, at best "referenced/suggested" profiles.

stain avatar Feb 08 '24 08:02 stain

Decision 2024-04-11: Not do formal inheritance system at RO-Crate level yet before we have tried out how it works with actual implementations (e.g. SHACL, Crate-O modes) -- then facilitate them.

stain avatar Apr 11 '24 08:04 stain

I have finally managed to tidy up the profile section.

Changes:

  • Merged to latest master (but pending #296 with retrieval section moved out from here)
  • Use only rdfs:Class and rdf:Property, documented as Schema.org style schemas
  • Inheritance across profiles now only "Multiple Profiles" as suggestions of conformance only
  • Renamed section "Shared contextual entities from a Profile Crate"
  • Examples expanded following @simleo's suggestion

stain avatar Apr 26 '24 00:04 stain

Suggestion in call 2024-04-25 @CaroleGoble was to also look at Delegation pattern:

  • https://en.wikipedia.org/wiki/Delegation_pattern
  • https://refactoring.guru/replace-delegation-with-inheritance
  • https://stackoverflow.com/questions/832536/when-to-use-delegation-instead-of-inheritance
  • https://www.jetbrains.com/help/idea/replace-inheritance-with-delegation.html

In a sense we use delegation pattern in https://trefx.uk/5s-crate/0.4/#referencing-a-workflow-crate as instead of subclassing Workflow RO-Crate, it references the Workflow RO-Crate by URL -- one crate to another. I've documented this pattern in #296.

This would make the resulting 5s-crate as Workflow Run Crate not conform to any strict inheritance rules, as it would not have the usual ComputationalWorkflow etc. and so should not itself declare conformsTo the Workflow RO-Crate (which we would have to then make Workflow RO-Crate indirection also be a workflow language!).

Note a side issue: at the moment that 5s-crate is in that case purposefully ignoring the MUST of conformsTo requirements -- we can argue over that separately!

stain avatar Apr 26 '24 00:04 stain

@simleo Good to go..?

stain avatar May 20 '24 19:05 stain

@simleo Good to go..?

AFAICT, yes

simleo avatar May 21 '24 15:05 simleo