-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(opentrons-ai-server): convert rst files to markdown file #15703
Conversation
need to add |
I recommend you export the output to a specific folder not @Elyorcv |
@Elyorcv they would be under |
If there isn't any specific reason, we should add test for the new code. |
This PR get check/js error because the generated markdown-file doesn't follow our formatting-rule. This is another reason that I don't think that the generated markdown file is needed to be in the mono repo. |
A Markdown file is just a different version of RST. So I think it is better to keep it in the monorepo. |
why dont we format according to check/js? @syao1226 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. If we add tests then all good to go
html_file_path = os.path.join(current_dir, "build", "docs", "html", "v2", "index.html") | ||
markdown_file_path = os.path.join(current_dir, "..", "data", f"python_api_{current_version}.md") | ||
reference_file_path = os.path.join(current_dir, "..", "data", "api_version_reference.md") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about if we change like so:
python_api_219_reference.md
python_api_219_docs.md
def get_markdown_format() -> None: | ||
"""Generates a version-aware Markdown file from HTML documentation.""" | ||
current_version = get_latest_version() | ||
command = "pipenv run sphinx-build -b singlehtml ../api/docs/v2 api/utils/build/docs/html/v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change paths with os.path.join
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, well done Shiyao!
re AUTH-541
Overview
Converting an HTML file, which was converted from Python API documents (RST format files), to a markdown file.
Test Plan
Changelog
Review requests
Risk assessment