Skip to content

Commit

Permalink
debug: check with latex
Browse files Browse the repository at this point in the history
  • Loading branch information
Revathyvenugopal162 committed Apr 4, 2024
2 parents bbb1c17 + c7a9adf commit 29b23e6
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ updates:
schedule:
interval: "weekly"
assignees:
- "ansys/pymechanical-maintainers"
- "pyansys-ci-bot"
commit-message:
prefix: "MAINT"
labels:
Expand Down Expand Up @@ -58,6 +58,8 @@ updates:
directory: "/"
schedule:
interval: "weekly"
assignees:
- "pyansys-ci-bot"
labels:
- "maintenance"
- "dependencies"
Expand Down
10 changes: 5 additions & 5 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ clean-except-examples:

# customized to build the pdf rather than using latexpdf due to various issues
# with our docs like GIFs being written as PNG.
# pdf:
# @$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
# (test -f $(BUILDDIR)/latex/*.pdf && echo pdf exists) || exit 1

pdf:
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
(test -f $(BUILDDIR)/latex/*.pdf && echo pdf exists) || exit 1

simple-pdf:
@$(SPHINXBUILD) -M simplepdf "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
(test -f $(BUILDDIR)/simplepdf/*.pdf && echo pdf exists) || exit 1
1 change: 1 addition & 0 deletions doc/changelog.d/677.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: Assign ci bot for dependabot PR
1 change: 1 addition & 0 deletions doc/changelog.d/678.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINT: Bump the doc group with 1 update
22 changes: 11 additions & 11 deletions doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set LINKCHECKDIR=\%BUILDDIR%\linkcheck
if "%1" == "" goto help
if "%1" == "clean" goto clean
if "%1" == "pdf" goto pdf
@REM if "%1" == "simple-pdf" goto simple-pdf
if "%1" == "simple-pdf" goto simple-pdf
if "%1" == "linkcheck" goto linkcheck

%SPHINXBUILD% >NUL 2>NUL
Expand All @@ -38,17 +38,17 @@ rmdir /s /q %BUILDDIR% > /NUL 2>&1
for /d /r %SOURCEDIR% %%d in (_autosummary) do @if exist "%%d" rmdir /s /q "%%d"
goto end

@REM :pdf
@REM %SPHINXBUILD% -M latex %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
@REM cd "%BUILDDIR%\latex"
@REM for %%f in (*.tex) do (
@REM pdflatex "%%f" --interaction=nonstopmode)
@REM if NOT EXIST ansys-mechanical-core.pdf (
@REM Echo "no pdf generated!"
@REM exit /b 1)
@REM Echo "pdf generated!"

:pdf
%SPHINXBUILD% -M latex %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
cd "%BUILDDIR%\latex"
for %%f in (*.tex) do (
pdflatex "%%f" --interaction=nonstopmode)
if NOT EXIST ansys-mechanical-core.pdf (
Echo "no pdf generated!"
exit /b 1)
Echo "pdf generated!"

:simple-pdf
%SPHINXBUILD% -M simplepdf %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
cd "%BUILDDIR%\simplepdf"
if NOT EXIST ansys-mechanical-core.pdf (
Expand Down
8 changes: 4 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import os
import warnings

from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_black
from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_black, ansys_logo_white, ansys_logo_white_cropped, latex, watermark
from sphinx_gallery.sorting import FileNameSortKey

import ansys.mechanical.core as pymechanical
Expand Down Expand Up @@ -181,7 +181,7 @@
html_theme = "ansys_sphinx_theme"
html_logo = pyansys_logo_black
html_context = {
"github_user": "pyansys",
"github_user": "ansys",
"github_repo": "pymechanical",
"github_version": "main",
"doc_path": "doc/source",
Expand Down Expand Up @@ -232,9 +232,9 @@
# Output file base name for HTML help builder.
htmlhelp_basename = "pymechanicaldoc"


latex_additional_files = [watermark, ansys_logo_white, ansys_logo_white_cropped]
# -- Options for LaTeX output ------------------------------------------------
latex_elements = {}
latex_elements = {"preamble": latex.generate_preamble(html_title)}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tests = [
]
doc = [
"Sphinx==7.2.6",
"ansys-sphinx-theme==0.15.0",
"ansys-sphinx-theme==0.15.1",
"grpcio==1.62.1",
"imageio-ffmpeg==0.4.9",
"imageio==2.34.0",
Expand Down

0 comments on commit 29b23e6

Please sign in to comment.