From 206e55ec04c057dca58ce4403f01aa4cd148be82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 16:45:33 +0200 Subject: [PATCH 01/15] feat(docs): implemented action --- .github/workflows/documentation.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..8ce5cef --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,27 @@ +name: documentation + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Install dependencies + run: | + pip install sphinx furo myst_parser + - name: Sphinx build + run: | + sphinx-build doc _build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: _build/ + force_orphan: true From 971b7a1ea4c03f9e7e44af1bcd308496885bbabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 17:46:32 +0200 Subject: [PATCH 02/15] feat(docs): implemented initial doc configurations --- doc/Makefile | 14 ++++++++++++++ doc/conf.py | 20 ++++++++++++++++++++ doc/index.rst | 12 ++++++++++++ doc/make.bat | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/conf.py create mode 100644 doc/index.rst create mode 100644 doc/make.bat diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..8d437f2 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,14 @@ +# Minimal makefile for Sphinx documentation + +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = ../ +BUILDDIR = _build + +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/doc/conf.py b/doc/conf.py new file mode 100644 index 0000000..ac51ea5 --- /dev/null +++ b/doc/conf.py @@ -0,0 +1,20 @@ +project = "Manim Studio" +copyright = "Kovács Bálint-Hunor" +author = "Kovács Bálint-Hunor" +release = "0.1" + + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ["myst_parser"] + +templates_path = ["_templates"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = "furo" +html_static_path = ["_static"] diff --git a/doc/index.rst b/doc/index.rst new file mode 100644 index 0000000..b43c05e --- /dev/null +++ b/doc/index.rst @@ -0,0 +1,12 @@ +.. Example documentation master file, created by + sphinx-quickstart on Sat Sep 23 20:35:12 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to ManimStudio's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000..b4f380c --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd \ No newline at end of file From 93952a60e9dd982c042f580ddca3c8ac6df7d739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 17:49:31 +0200 Subject: [PATCH 03/15] fix(docs): fixing github pages --- .github/workflows/documentation.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 8ce5cef..a8808ca 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -19,9 +19,6 @@ jobs: sphinx-build doc _build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: - publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: _build/ - force_orphan: true + publish_dir: ./_build/html From 1f41c3157ba3251c8de0bfadac4d3d88aa92ba1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 17:52:22 +0200 Subject: [PATCH 04/15] fix(docs): publish directory location path --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index a8808ca..a758683 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -21,4 +21,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_build/html + publish_dir: ./_build/ From 0d6e1569b5e66e6de0bae28b915f820897f1bc91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 17:58:35 +0200 Subject: [PATCH 05/15] fix(docs): trying to fix Sphinx autodoc --- doc/conf.py | 3 ++- doc/index.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index ac51ea5..aa5b3d1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -7,7 +7,8 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = ["myst_parser"] +sourcedir = "./" +extensions = ["myst_parser", "sphinx.ext.autodoc"] templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] diff --git a/doc/index.rst b/doc/index.rst index b43c05e..9a82a95 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -10,3 +10,4 @@ Welcome to ManimStudio's documentation! :maxdepth: 2 :caption: Contents: + main From f78592602fe41a9cf232b81f731f61297526553f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:01:39 +0200 Subject: [PATCH 06/15] fix(docs): trying to fix autodoc generation --- doc/conf.py | 2 +- doc/index.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index aa5b3d1..44c2d47 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -7,7 +7,7 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -sourcedir = "./" +sourcedir = "../" extensions = ["myst_parser", "sphinx.ext.autodoc"] templates_path = ["_templates"] diff --git a/doc/index.rst b/doc/index.rst index 9a82a95..a96ee7b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -11,3 +11,5 @@ Welcome to ManimStudio's documentation! :caption: Contents: main + form + form_ui From 966918ca3b9c89591dcfbfb9b2cb55d7472e66de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:08:33 +0200 Subject: [PATCH 07/15] fix(docs): trying to fix empty documentation problem --- .github/workflows/documentation.yml | 1 + doc/conf.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index a758683..73ce9ae 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,6 +16,7 @@ jobs: pip install sphinx furo myst_parser - name: Sphinx build run: | + cd $GITHUB_WORKSPACE # Change to the root directory sphinx-build doc _build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 diff --git a/doc/conf.py b/doc/conf.py index 44c2d47..aa5b3d1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -7,7 +7,7 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -sourcedir = "../" +sourcedir = "./" extensions = ["myst_parser", "sphinx.ext.autodoc"] templates_path = ["_templates"] From 4ef1b5efce80c978ad6521b6856cb6ed47c89b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:11:12 +0200 Subject: [PATCH 08/15] fix(docs): working on project building problems --- .github/workflows/documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 73ce9ae..9331041 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,6 +17,7 @@ jobs: - name: Sphinx build run: | cd $GITHUB_WORKSPACE # Change to the root directory + ls -R # Print the directory contents for debugging sphinx-build doc _build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 From 3adcee1b8c292af1090705d625571931d2daa7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:13:00 +0200 Subject: [PATCH 09/15] fix(docs): fixing sphinx errors --- doc/Makefile | 2 +- doc/index.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 8d437f2..f88d33c 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,7 +2,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = ../ +SOURCEDIR = ./ BUILDDIR = _build help: diff --git a/doc/index.rst b/doc/index.rst index a96ee7b..366d26d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -4,7 +4,7 @@ contain the root `toctree` directive. Welcome to ManimStudio's documentation! -=================================== +======================================= .. toctree:: :maxdepth: 2 From 5ea88c9a07b7fe2c6544ad68ca1b4253de1ae749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:25:30 +0200 Subject: [PATCH 10/15] fix(docs): trying to fix autodoc problems --- doc/main.rst | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/main.rst diff --git a/doc/main.rst b/doc/main.rst new file mode 100644 index 0000000..b244b72 --- /dev/null +++ b/doc/main.rst @@ -0,0 +1,5 @@ +main module +=========== + +.. automodule:: main + :members: From f92a1bb5b8aeab9650bdf5bc6c6ae7457eb3acc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:36:01 +0200 Subject: [PATCH 11/15] fix(docs): trying to fix autodoc generation --- doc/conf.py | 5 +++++ doc/form.rst | 5 +++++ doc/index.rst | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 doc/form.rst diff --git a/doc/conf.py b/doc/conf.py index aa5b3d1..c623130 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,3 +1,8 @@ +import os +import sys + +sys.path.insert(0, os.path.abspath("..")) + project = "Manim Studio" copyright = "Kovács Bálint-Hunor" author = "Kovács Bálint-Hunor" diff --git a/doc/form.rst b/doc/form.rst new file mode 100644 index 0000000..95511fc --- /dev/null +++ b/doc/form.rst @@ -0,0 +1,5 @@ +form module +=========== + +.. automodule:: form + :members: diff --git a/doc/index.rst b/doc/index.rst index 366d26d..ff2fe4f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,4 +12,3 @@ Welcome to ManimStudio's documentation! main form - form_ui From 21ff47a4a3f951d73d3a77af892ecffb3c842b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 18:41:03 +0200 Subject: [PATCH 12/15] fix(docs): working on dependency errors --- .github/workflows/documentation.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9331041..2660976 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -14,6 +14,7 @@ jobs: - name: Install dependencies run: | pip install sphinx furo myst_parser + pip install -r requirements.txt - name: Sphinx build run: | cd $GITHUB_WORKSPACE # Change to the root directory From d06679d20a5b89198009b8c7ac641d341b220b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 19:06:23 +0200 Subject: [PATCH 13/15] fix(docs): fixed auto generation for documentation --- .github/workflows/documentation.yml | 3 +-- .gitignore | 3 +++ doc/form.rst | 5 ----- {doc => docs}/Makefile | 0 {doc => docs}/conf.py | 1 - docs/form_ui.rst | 7 +++++++ {doc => docs}/index.rst | 11 +++++++++-- {doc => docs}/main.rst | 2 ++ {doc => docs}/make.bat | 0 9 files changed, 22 insertions(+), 10 deletions(-) delete mode 100644 doc/form.rst rename {doc => docs}/Makefile (100%) rename {doc => docs}/conf.py (97%) create mode 100644 docs/form_ui.rst rename {doc => docs}/index.rst (75%) rename {doc => docs}/main.rst (59%) rename {doc => docs}/make.bat (100%) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 2660976..5583a37 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -18,8 +18,7 @@ jobs: - name: Sphinx build run: | cd $GITHUB_WORKSPACE # Change to the root directory - ls -R # Print the directory contents for debugging - sphinx-build doc _build + sphinx-build docs _build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: diff --git a/.gitignore b/.gitignore index 30f22fe..27b9e7c 100644 --- a/.gitignore +++ b/.gitignore @@ -176,3 +176,6 @@ build*/ *.qmlproject.user.* *.ui.user *.ui.user.* + +# Sphinx documentation +_build/ diff --git a/doc/form.rst b/doc/form.rst deleted file mode 100644 index 95511fc..0000000 --- a/doc/form.rst +++ /dev/null @@ -1,5 +0,0 @@ -form module -=========== - -.. automodule:: form - :members: diff --git a/doc/Makefile b/docs/Makefile similarity index 100% rename from doc/Makefile rename to docs/Makefile diff --git a/doc/conf.py b/docs/conf.py similarity index 97% rename from doc/conf.py rename to docs/conf.py index c623130..f6ae284 100644 --- a/doc/conf.py +++ b/docs/conf.py @@ -12,7 +12,6 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -sourcedir = "./" extensions = ["myst_parser", "sphinx.ext.autodoc"] templates_path = ["_templates"] diff --git a/docs/form_ui.rst b/docs/form_ui.rst new file mode 100644 index 0000000..3913a40 --- /dev/null +++ b/docs/form_ui.rst @@ -0,0 +1,7 @@ +form_ui module +============== + +.. automodule:: form_ui + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/index.rst b/docs/index.rst similarity index 75% rename from doc/index.rst rename to docs/index.rst index ff2fe4f..047a834 100644 --- a/doc/index.rst +++ b/docs/index.rst @@ -9,6 +9,13 @@ Welcome to ManimStudio's documentation! .. toctree:: :maxdepth: 2 :caption: Contents: + + main + form_ui - main - form +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/doc/main.rst b/docs/main.rst similarity index 59% rename from doc/main.rst rename to docs/main.rst index b244b72..eed5135 100644 --- a/doc/main.rst +++ b/docs/main.rst @@ -3,3 +3,5 @@ main module .. automodule:: main :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/doc/make.bat b/docs/make.bat similarity index 100% rename from doc/make.bat rename to docs/make.bat From b502afd6241d3e3b468a3180a349e5e4301a3c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 19:13:21 +0200 Subject: [PATCH 14/15] fix(docs): working on documentation generation fix --- .github/workflows/documentation.yml | 4 +--- docs/index.rst | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 5583a37..99a50e6 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -16,9 +16,7 @@ jobs: pip install sphinx furo myst_parser pip install -r requirements.txt - name: Sphinx build - run: | - cd $GITHUB_WORKSPACE # Change to the root directory - sphinx-build docs _build + run: sphinx-build docs _build - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: diff --git a/docs/index.rst b/docs/index.rst index 047a834..2d5ee24 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,4 +18,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` -* :ref:`search` From 276ee12d7f01b000c73224003bc1b3e9e5e3e48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kov=C3=A1cs=20B=C3=A1lint=20Hunor?= Date: Thu, 4 Jan 2024 19:22:08 +0200 Subject: [PATCH 15/15] fix(docs): working on documentation fix --- .github/workflows/documentation.yml | 2 ++ docs/conf.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 99a50e6..b25594f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -11,6 +11,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 + - name: Install System Dependencies + run: sudo apt-get install -y libegl1-mesa - name: Install dependencies run: | pip install sphinx furo myst_parser diff --git a/docs/conf.py b/docs/conf.py index f6ae284..cdc37cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,14 @@ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = ["myst_parser", "sphinx.ext.autodoc"] +extensions = [ + "myst_parser", + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", + "sphinx.ext.napoleon", + "sphinx.ext.intersphinx", + "sphinx.ext.todo", +] templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] @@ -23,3 +30,6 @@ html_theme = "furo" html_static_path = ["_static"] + +# autodoc_mock_imports = ["main", "form_ui"] +intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}