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

VSKit - description newline replacement #691

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/oaklib/utilities/subsets/value_set_expander.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ def _generate_permissible_value(
enum_definition: EnumDefinition = None,
) -> PermissibleValue:
definition = oi.definition(curie)
# \n can break some downstream tooling like LinkML's gen-pydantic (v1.6.6)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be fixed in the tooling, as newlines are valid (if unusual) in textual elements. But we can merge this for now

if definition is not None:
definition = definition.replace("\n", " ")
label = oi.label(curie)
pv_formula = enum_definition.pv_formula if enum_definition else None
if str(pv_formula) == "CURIE":
Expand Down