From 3989b570ae7190021ca35ebbc4cb81134ac85e8b Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Tue, 24 Sep 2024 17:49:19 -0400 Subject: [PATCH] Remove post_process_rst.py, edit index.md placeholder --- docs/post_process_rst.py | 29 ----------------------------- docs/source/index.md | 18 +++--------------- 2 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 docs/post_process_rst.py diff --git a/docs/post_process_rst.py b/docs/post_process_rst.py deleted file mode 100644 index dc7c10e7..00000000 --- a/docs/post_process_rst.py +++ /dev/null @@ -1,29 +0,0 @@ -# numpydoc ignore=GL08 -import re -import sys -from pathlib import Path - - -def process_rst_file(rst_file): - # numpydoc ignore=GL08 - # Read the content of the rst file - rst_file_path = Path(rst_file) - if rst_file_path.suffix != ".rst": - raise ValueError("Invalid file format. Only .rst files are supported.") - - with open(rst_file_path, "r") as file: - content = file.read() - - # Replace `.. code:: mermaid` with `.. mermaid::` - modified_content = re.sub( - r"\.\.\ code::\ mermaid", ".. mermaid::", content - ) - - # Write the modified content back to the file - with open(rst_file_path, "w") as file: - file.write(modified_content) - - -if __name__ == "__main__": - rst_file = sys.argv[1] - process_rst_file(rst_file) diff --git a/docs/source/index.md b/docs/source/index.md index b8c66bfd..e0692df9 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -1,17 +1,5 @@ -% WARNING + ## Placeholder file -% This `index.rst` file is only a placeholder. Do not edit this file. The final +This `index.md` file is only a placeholder. Do not edit this file. The final `index.md` document is automatically generated via GitHub Actions using the root level `README.md` file: https://github.com/CDCgov/PyRenew/tree/main/README.md -% `index.rst` document is automatically generated via GitHub Actions using the - -% root level `README.md` file: - -% https://github.com/CDCgov/PyRenew/tree/main/README.md - -% - -% Any changes made to this file will be discarted during the next build. The - -% GitHub action building this is in: - -% https://github.com/CDCgov/PyRenew/tree/main/.github/workflows/website.yaml` +Any changes made to this file will be discarted during the next build. The GitHub action that builds the docs is: https://github.com/CDCgov/PyRenew/tree/main/.github/workflows/website.yaml`