Skip to content

Commit

Permalink
[DOC] add GitHub ID hyperlinks in estimator table (#5916)
Browse files Browse the repository at this point in the history
This PR adds hyperlinks to the GitHub IDs in author and maintainer
fields in the estimator table.
  • Loading branch information
fkiraly committed Feb 10, 2024
1 parent 603f93b commit dfed3b3
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions docs/source/conf.py
Expand Up @@ -324,13 +324,26 @@ def _process_author_info(author_info):
Multiple author names will be separated by a comma,
with the final name always preceded by "&".
"""
if isinstance(author_info, list):
if len(author_info) > 1:
return ", ".join(author_info[:-1]) + " & " + author_info[-1]
else:
return author_info[0]
if isinstance(author_info, str) and author_info.lower() == "sktime developers":
link = (
'<a href="https://www.sktime.net/en/stable/about/team.html">'
"sktime developers</a>"
)
return link

if not isinstance(author_info, list):
author_info = [author_info]

def _add_link(github_id_str):
link = '<a href="https://www.github.com/{0}">{0}</a>'.format(github_id_str)
return link

author_info = [_add_link(author) for author in author_info]

if len(author_info) > 1:
return ", ".join(author_info[:-1]) + " & " + author_info[-1]
else:
return author_info
return author_info[0]

def _does_not_start_with_underscore(input_string):
return not input_string.startswith("_")
Expand Down

0 comments on commit dfed3b3

Please sign in to comment.