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

The grammar should return clean objects #66

Open
cmungall opened this issue Mar 21, 2024 · 0 comments
Open

The grammar should return clean objects #66

cmungall opened this issue Mar 21, 2024 · 0 comments
Milestone

Comments

@cmungall
Copy link
Contributor

Currently the grammar yields linkml instances like:

NodeRename(id='CHANGE:001', type='NodeRename', ...,` old_value=Token('SINGLE_QUOTE_LITERAL', "'nuclear envelope'"), new_value=Token('SINGLE_QUOTE_LITERAL', "'foo bar'")`

No need for this

Also the rendered json is:

{
  "id": "CHANGE:001",
  "type": "NodeRename",
  "old_value": "'nuclear envelope'",
  "new_value": "'foo bar'",
  "about_node": "GO:0005635",
  "about_node_representation": "curie",
  "@type": "NodeRename"
}

The single quotes are not necessary. It's already a string field.

Currently downstream code such as OAK has a workaround for this:

https://github.com/INCATools/ontology-access-kit/blob/8da76e19698058b43c4ae4ba2b5bcda35a1c851a/src/oaklib/utilities/kgcl_utilities.py#L99-L123

In theory this should still work with clean code but we should still wait until 1.0.0

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

Successfully merging a pull request may close this issue.

1 participant