Skip to content
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

is there a plan to support definition of 'linkML.rules' ? #140

Open
proccaserra opened this issue Jun 4, 2024 · 2 comments
Open

is there a plan to support definition of 'linkML.rules' ? #140

proccaserra opened this issue Jun 4, 2024 · 2 comments

Comments

@proccaserra
Copy link

ancillary question:

is there a roadmap for schemasheet ?

thx

@cmungall
Copy link
Member

cmungall commented Jun 6, 2024

Can you say a bit more about your use case? Rules are a bit analogous to complex OWL axioms using ROBOT templates - you're better off using a data entry form is built for nested structures (i.e directly author in yaml and weave in to schemasheet generated yaml)

However, I can envision scenarios where the schemasheet template editor defines some broad rule patterns, and then the schema author can add these in rows.

E.g

  • if country='US' then code='+1'
  • if country='UK' then code='+44'
  • ...

Could be generalized to

  • if country='{country}' then code='{code}'

(I'm using pseudocode but it should be clear how this maps to linkml rules yaml)

This could go in the header of a country-phone-rules tab, and the person maintaining the schema could have a list of pairs

Is this what you had in mind?

Roadmap: Currently schemamap isn't tracked as part of the main linkml milestones/roadmap, as the functionality is relatively stable, so this issue tracker remains the best way to get a sense of priorities, but we could decide to track it as part of core.

So long as a

@proccaserra
Copy link
Author

Thank you @cmungall

The use case would be to express more complex rules, where a condition met in a slot/attribute of one Class has consequences on the value set associated to a slot in another Class.

  • if slotA='{Class1.slotA}', then slotB='{Class2.slotB}'

But linkml.Rules can only be set (as far as I know) over the attributes of a single Class, hence the question.

I was wondering if rules could then be defined in a separated file and imported (like enums or slot)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants