Skip to content

Commit

Permalink
Bugfix: slurp docs parents column (#534)
Browse files Browse the repository at this point in the history
* Minor updates
- Delete: unused import
- Add: todo comments

* Slurp docs parents bug
- Bug fix: An issue where a | in the parents column would cause the markdown table to be rendered improperly. For all tables other than ordo, this would result in only 1 of the parents showing. For ordo, it would result in one of the parents populating into the subset column, instead of showing the actual subset.
  • Loading branch information
joeflack4 authored Dec 17, 2024
1 parent 8879acb commit 1d8f07e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripts/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ def slurp_docs():
ontology_name = os.path.basename(path).replace(FILENAME_GLOB_PATTERN[1:], '')
ontology_page_relpath = f'./migrate_{ontology_name.lower()}.md'
df = pd.read_csv(path, sep='\t').fillna('')
# Fix issue where the | in the `parents` column is causing table rendering issues
df['parents'] = df['parents'].apply(lambda x: x.replace('|', ','))
# Individual pages
relpath = os.path.realpath(path).replace(PROJECT_DIR + '/', '')
instantiated_str: str = Template(JINJA_ONTO_PAGES).render(
Expand Down

0 comments on commit 1d8f07e

Please sign in to comment.