From 6a42a8543cb9a2ecdc049f53af591d96681b06e0 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 18:46:52 -0700 Subject: [PATCH 01/11] Added a step to set the python version --- .github/workflows/sphinx.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index ddb5f8d..6bd93ff 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -9,6 +9,10 @@ jobs: contents: write steps: - uses: actions/checkout@v4 + - name: Set Python Version + uses: actions/setup-python@v5 + with: + python-version: '3.10' - name: Build HTML uses: ammaraskar/sphinx-action@master - name: Upload artifacts @@ -18,7 +22,7 @@ jobs: path: docs/_build/html/ - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/docs' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/html From 14aa4bec88e0d8af8a3eeef70b7be347204ae863 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 18:54:21 -0700 Subject: [PATCH 02/11] Trying to trigger the gh-pages build --- docs/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.rst b/docs/index.rst index e68b0a4..603e269 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,6 +7,7 @@ Welcome to Autonomy@SJSU-Robotics's documentation! ================================================== Hi Welcome to documentation +Hello There .. toctree:: :maxdepth: 10 From 1a59e52eacc17f649b736aac436c24ba90f6fd51 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 19:01:32 -0700 Subject: [PATCH 03/11] wrote my own steps to build html --- .github/workflows/sphinx.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 6bd93ff..a208a6a 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -13,8 +13,10 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.10' - - name: Build HTML - uses: ammaraskar/sphinx-action@master + - name: Install requirements + run: pip install -r docs/requirements.txt + - name: Make HTML + run: cd docs & make html - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 56772c6809c61b83e61c8841120ec26ad29696cd Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 19:03:50 -0700 Subject: [PATCH 04/11] Correcting cd statements --- .github/workflows/sphinx.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index a208a6a..c80504a 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -15,8 +15,10 @@ jobs: python-version: '3.10' - name: Install requirements run: pip install -r docs/requirements.txt + - run: cd docs/ - name: Make HTML - run: cd docs & make html + run: make html + - run: cd .. - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 80676b2331058619ebd34cd64a6021edd9af0618 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 19:07:41 -0700 Subject: [PATCH 05/11] Update sphinx.yml --- .github/workflows/sphinx.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index c80504a..4c2c6eb 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -16,6 +16,7 @@ jobs: - name: Install requirements run: pip install -r docs/requirements.txt - run: cd docs/ + - run: ls . - name: Make HTML run: make html - run: cd .. From c3cc691b1a0f7dfcec79f3550a67d55b3ff85cc9 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 19:11:28 -0700 Subject: [PATCH 06/11] Update sphinx.yml --- .github/workflows/sphinx.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 4c2c6eb..cce60ed 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -15,11 +15,9 @@ jobs: python-version: '3.10' - name: Install requirements run: pip install -r docs/requirements.txt - - run: cd docs/ - run: ls . - name: Make HTML - run: make html - - run: cd .. + run: make -C docs/ html - name: Upload artifacts uses: actions/upload-artifact@v4 with: From 43267c70cbe6615e69264a7aace1562ccb3e06d9 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 19:49:38 -0700 Subject: [PATCH 07/11] testing with the a all requirements --- .github/workflows/sphinx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index cce60ed..4072477 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -14,7 +14,7 @@ jobs: with: python-version: '3.10' - name: Install requirements - run: pip install -r docs/requirements.txt + run: pip install -r env_files/all_requirements.txt - run: ls . - name: Make HTML run: make -C docs/ html From f4bdb740799d37b89f5e4039a09aabb39fb2f493 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 20:17:06 -0700 Subject: [PATCH 08/11] Wrote a read me for the documentation site --- docs/README.md | 17 +++++++++++++++++ docs/modules.rst | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..515e5df --- /dev/null +++ b/docs/README.md @@ -0,0 +1,17 @@ +# Using Sphinx to build Doc site + +If you create a new python file, that file will need to be included in the +documentation by running this command + +~~~~~~~~~~~~~~~~~~~~~~~~~bash +sphinx-apidoc -o docs/ . +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Following this or if you only modified a python file instead of created a new +one, then you can locally build the doc site using the following command + +~~~~~~~~~~~~~~~~~~~bash +make -C docs/ html +~~~~~~~~~~~~~~~~~~~ + +this will build the Doc site in `docs/_build/html`. diff --git a/docs/modules.rst b/docs/modules.rst index c7e07d1..ea1aab4 100644 --- a/docs/modules.rst +++ b/docs/modules.rst @@ -1,5 +1,5 @@ -autonomy_setup_test -=================== +urc-intelligent-systems-2023 +============================ .. toctree:: :maxdepth: 4 From 5c999968f63f5854e3afdc89696f7838e389cf27 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 20:22:15 -0700 Subject: [PATCH 09/11] Updated docs README.md --- docs/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 515e5df..1aa9e4d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,14 +4,18 @@ If you create a new python file, that file will need to be included in the documentation by running this command ~~~~~~~~~~~~~~~~~~~~~~~~~bash -sphinx-apidoc -o docs/ . +sphinx-apidoc -o docs/ . # from project root +# or +sphinx-apidoc -o . .. # from docs dir ~~~~~~~~~~~~~~~~~~~~~~~~~ Following this or if you only modified a python file instead of created a new one, then you can locally build the doc site using the following command ~~~~~~~~~~~~~~~~~~~bash -make -C docs/ html +make -C docs/ html # from project root +# or +make html # from docs dir ~~~~~~~~~~~~~~~~~~~ this will build the Doc site in `docs/_build/html`. From 10aa1030c9296ea68036d28a6398dd28b83f2f29 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 20:23:24 -0700 Subject: [PATCH 10/11] Changed workflow to deploy from dev --- .github/workflows/sphinx.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 4072477..a241cef 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -25,7 +25,7 @@ jobs: path: docs/_build/html/ - name: Deploy uses: peaceiris/actions-gh-pages@v3 - if: github.ref == 'refs/heads/docs' + if: github.ref == 'refs/heads/dev' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/html From ba30a6ef429c68db12c44feb23a5c4babacb3bcf Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 30 Mar 2024 20:25:47 -0700 Subject: [PATCH 11/11] Added link to doc site in readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 81c0a04..a49c3fd 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Contains the intelligent systems module and sensor logic for the SJSU Robotics' 3-Wheeled Mars Rover +## [Documentation Site](https://sjsuroboticsteam.github.io/urc-intelligent-systems-2023/index.html) + ## Setup To get started, you will need to install the following dependencies, you can do this by using a virtual environment and the requirements.txt file in the root directory of the project.