@@ -73,9 +73,10 @@ def convert_tsv_to_linkml(
7373 # Show preview if requested
7474 if preview :
7575 click .echo ("\n === Preview (first 30 lines) ===" )
76- preview_lines = linkml_yaml .split ("\n " )[:30 ]
76+ all_lines = linkml_yaml .split ("\n " )
77+ preview_lines = all_lines [:30 ]
7778 click .echo ("\n " .join (preview_lines ))
78- if len (linkml_yaml . split ( " \n " ) ) > 30 :
79+ if len (all_lines ) > 30 :
7980 click .echo ("..." )
8081
8182 except Exception as e :
@@ -125,9 +126,8 @@ def convert_tsv_to_linkml_enum(
125126
126127 # Process each relationship
127128 for _ , row in object_properties .iterrows ():
128- # Extract the ID number from the full URI
129+ # Use the full URI as the permissible value meaning
129130 id_uri = row ["ID" ]
130- id_uri .split ("/" )[- 1 ]
131131
132132 # Create a code-friendly key from the label
133133 label = str (row ["LABEL" ])
@@ -148,9 +148,6 @@ def convert_tsv_to_linkml_enum(
148148 linkml_enum , default_flow_style = False , sort_keys = False , allow_unicode = True
149149 )
150150
151- # Clean up the YAML formatting
152- yaml_output = yaml_output .replace ("'" , "" ) # Remove unnecessary quotes
153-
154151 # Write to file if specified
155152 if output_file :
156153 with Path (output_file ).open ("w" ) as f :
0 commit comments