From 052105b167368f685e9cf3e5e7a84e29d5383fc6 Mon Sep 17 00:00:00 2001 From: Revisto Date: Fri, 25 Jul 2025 22:09:19 +0330 Subject: [PATCH 01/13] Add rtl Sphinx fork checkout and installation steps to build workflow --- .github/workflows/build-and-deploy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 1cc8411..fa59ce3 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -32,6 +32,18 @@ jobs: with: python-version: '3.11' + - name: Checkout custom Sphinx fork + uses: actions/checkout@v4 + with: + repository: Revisto/sphinx + ref: rtl-support + path: sphinx-rtl + + - name: Install custom Sphinx + run: | + cd sphinx-rtl + pip install -e . + - name: Setup virtual environment run: make venv working-directory: ./Doc From 082466eb2f077d52a06a7827c50cc25f8e7d3e82 Mon Sep 17 00:00:00 2001 From: Revisto Date: Fri, 25 Jul 2025 22:42:04 +0330 Subject: [PATCH 02/13] Enable RTL support for Farsi documentation builds --- .github/workflows/build-and-deploy.yml | 2 +- Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index fa59ce3..3eee0b7 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -61,7 +61,7 @@ jobs: uses: sphinx-doc/github-problem-matcher@v1.1 - name: Build documentation - run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -W --keep-going" html + run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D is_rtl=True -W --keep-going" html working-directory: ./Doc - name: Setup Pages diff --git a/Makefile b/Makefile index 6a1c5a6..bb1bbf5 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,7 @@ all: ensure_prerequisites -D latex_engine=xelatex \ -D latex_elements.inputenc= \ -D latex_elements.fontenc= \ + -D is_rtl=True \ $(ADDITIONAL_ARGS)' \ SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \ $(MODE) From e613ae06d9b91688a37db2f718e4317296e7d09d Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 21:32:23 +0330 Subject: [PATCH 03/13] Update Sphinx build options to support RTL for Farsi documentation --- .github/workflows/build-and-deploy.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 3eee0b7..ee82137 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -61,7 +61,7 @@ jobs: uses: sphinx-doc/github-problem-matcher@v1.1 - name: Build documentation - run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D is_rtl=True -W --keep-going" html + run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D html_theme_options.is_rtl=True -W --keep-going" html working-directory: ./Doc - name: Setup Pages diff --git a/Makefile b/Makefile index bb1bbf5..e199dda 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ all: ensure_prerequisites -D latex_engine=xelatex \ -D latex_elements.inputenc= \ -D latex_elements.fontenc= \ - -D is_rtl=True \ + -D html_theme_options.is_rtl=True \ $(ADDITIONAL_ARGS)' \ SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \ $(MODE) From 0285e62b4f2846bbefe0b686069152d0b5184083 Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 21:39:57 +0330 Subject: [PATCH 04/13] Refactor Sphinx installation in build workflow to use the Doc virtual environment and add verification step --- .github/workflows/build-and-deploy.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ee82137..1300a6f 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -39,15 +39,21 @@ jobs: ref: rtl-support path: sphinx-rtl - - name: Install custom Sphinx - run: | - cd sphinx-rtl - pip install -e . - - name: Setup virtual environment run: make venv working-directory: ./Doc + - name: Install custom Sphinx in Doc venv + run: | + cd sphinx-rtl + ../Doc/venv/bin/pip install -e . + + - name: Verify custom Sphinx installation + run: | + ../Doc/venv/bin/sphinx-build --version + echo "Sphinx location:" + ../Doc/venv/bin/python -c "import sphinx; print(sphinx.__file__)" + - name: Checkout translation files uses: actions/checkout@v4 with: From f307d217bbca500b72b8f8fb07aa45af2ca17d5f Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 21:42:07 +0330 Subject: [PATCH 05/13] Remove verification step for custom Sphinx installation in build workflow --- .github/workflows/build-and-deploy.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 1300a6f..d545529 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -48,12 +48,6 @@ jobs: cd sphinx-rtl ../Doc/venv/bin/pip install -e . - - name: Verify custom Sphinx installation - run: | - ../Doc/venv/bin/sphinx-build --version - echo "Sphinx location:" - ../Doc/venv/bin/python -c "import sphinx; print(sphinx.__file__)" - - name: Checkout translation files uses: actions/checkout@v4 with: From 1451968804b3f713b6b208754fc6cc4efbf8cb01 Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:05:12 +0330 Subject: [PATCH 06/13] Remove installation step for custom Sphinx in build workflow (to see if error still exists) --- .github/workflows/build-and-deploy.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index d545529..ae735a7 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -43,11 +43,6 @@ jobs: run: make venv working-directory: ./Doc - - name: Install custom Sphinx in Doc venv - run: | - cd sphinx-rtl - ../Doc/venv/bin/pip install -e . - - name: Checkout translation files uses: actions/checkout@v4 with: From 0141647bfc39b99f1889380304d7903b60296aef Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:28:20 +0330 Subject: [PATCH 07/13] Remove checkout step for custom Sphinx fork in build workflow --- .github/workflows/build-and-deploy.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index ae735a7..8691321 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -32,17 +32,14 @@ jobs: with: python-version: '3.11' - - name: Checkout custom Sphinx fork - uses: actions/checkout@v4 - with: - repository: Revisto/sphinx - ref: rtl-support - path: sphinx-rtl - - name: Setup virtual environment run: make venv working-directory: ./Doc + - name: Install custom Sphinx in Doc venv + run: | + ../Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@sphinx-rtl + - name: Checkout translation files uses: actions/checkout@v4 with: From b5ba2fa77dfa3cc1393bc2fb78b2136850f90de3 Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:33:55 +0330 Subject: [PATCH 08/13] Fix path to Sphinx installation in build workflow --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 8691321..886a23b 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -38,7 +38,7 @@ jobs: - name: Install custom Sphinx in Doc venv run: | - ../Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@sphinx-rtl + ./Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@sphinx-rtl - name: Checkout translation files uses: actions/checkout@v4 From 549fcf888d5b0674f41a5320d45b512a75b9d8ae Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:47:28 +0330 Subject: [PATCH 09/13] Fix Sphinx installation reference in build workflow --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 886a23b..a34d0fb 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -38,7 +38,7 @@ jobs: - name: Install custom Sphinx in Doc venv run: | - ./Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@sphinx-rtl + ./Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@rtl-support - name: Checkout translation files uses: actions/checkout@v4 From a2251b7fbd3f87924c200f783b0c90dee48208bf Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:52:58 +0330 Subject: [PATCH 10/13] Update Python version to 3.13 in build workflow --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index a34d0fb..a8782e4 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.13' - name: Setup virtual environment run: make venv From f4156f2234e09e8ff415f58198d5f61d541aad2e Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:53:59 +0330 Subject: [PATCH 11/13] Update push branch filter to allow all branches in build workflow --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index a8782e4..699b092 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -5,7 +5,7 @@ on: - cron: '0 2 * * *' push: branches: - - 3.13 + - '*' workflow_dispatch: permissions: From 826be1b1fd7a5a45356203d447d303f30b034e1f Mon Sep 17 00:00:00 2001 From: Revisto Date: Sun, 27 Jul 2025 22:57:37 +0330 Subject: [PATCH 12/13] Enhance Sphinx build options to include additional extensions for improved documentation generation --- .github/workflows/build-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 699b092..5a90421 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -53,7 +53,7 @@ jobs: uses: sphinx-doc/github-problem-matcher@v1.1 - name: Build documentation - run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D html_theme_options.is_rtl=True -W --keep-going" html + run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D html_theme_options.is_rtl=True -D extensions=audit_events,availability,c_annotations,changes,implementation_detail,issue_role,lexers,misc_news,pydoc_topics,pyspecific,sphinx.ext.coverage,sphinx.ext.doctest,sphinx.ext.extlinks,notfound.extension,sphinxext.opengraph,python_docs_theme -W --keep-going" html working-directory: ./Doc - name: Setup Pages From 39d4dedcc1955e7b50238e200463398814816169 Mon Sep 17 00:00:00 2001 From: Revisto Date: Mon, 28 Jul 2025 23:33:18 +0330 Subject: [PATCH 13/13] Update Sphinx installation to specific version and simplify build options --- .github/workflows/build-and-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 5a90421..a3cce8f 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -38,7 +38,7 @@ jobs: - name: Install custom Sphinx in Doc venv run: | - ./Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@rtl-support + ./Doc/venv/bin/pip install git+https://github.com/revisto/sphinx.git@stable/v8.2.3-rtl - name: Checkout translation files uses: actions/checkout@v4 @@ -53,7 +53,7 @@ jobs: uses: sphinx-doc/github-problem-matcher@v1.1 - name: Build documentation - run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D html_theme_options.is_rtl=True -D extensions=audit_events,availability,c_annotations,changes,implementation_detail,issue_role,lexers,misc_news,pydoc_topics,pyspecific,sphinx.ext.coverage,sphinx.ext.doctest,sphinx.ext.extlinks,notfound.extension,sphinxext.opengraph,python_docs_theme -W --keep-going" html + run: make -e SPHINXOPTS="--color -D language='fa' -D gettext_allow_fuzzy_translations=1 -D html_theme_options.is_rtl=True -W --keep-going" html working-directory: ./Doc - name: Setup Pages