Skip to content

Commit 217d58f

Browse files
Bump version 0.63.4
1 parent f5fac3f commit 217d58f

File tree

10 files changed

+63
-69
lines changed

10 files changed

+63
-69
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
PYANSYS_OFF_SCREEN: True
1717
DOCKER_PACKAGE: ghcr.io/pyansys/pymapdl/mapdl
1818
DOCKER_IMAGE_VERSION_DOCS_BUILD: v22.2.0
19+
DOCUMENTATION_CNAME: "mapdl.docs.pyansys.com"
1920
# Following env vars when changed will "reset" the mentioned cache,
2021
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
2122
# You should go up in number, if you go down (or repeat a previous value)
@@ -117,15 +118,6 @@ jobs:
117118
steps:
118119
- uses: actions/checkout@v3
119120

120-
# used for documentation deployment
121-
- name: Get Bot Application Token
122-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
123-
id: get_workflow_token
124-
uses: peter-murray/workflow-application-token-action@v1
125-
with:
126-
application_id: ${{ secrets.BOT_APPLICATION_ID }}
127-
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }}
128-
129121
- name: Setup Python
130122
uses: actions/[email protected]
131123
with:
@@ -186,7 +178,7 @@ jobs:
186178
- name: Cache docs build directory
187179
uses: actions/cache@v3
188180
with:
189-
path: doc/build
181+
path: doc/_build
190182
key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
191183
restore-keys: |
192184
doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}
@@ -201,43 +193,28 @@ jobs:
201193
202194
- name: Install Docs Build Requirements
203195
run: |
204-
pip install -r requirements/requirements_docs.txt
196+
pip install -r requirements/requirements_doc.txt
205197
206198
- name: Build Documentation
207199
run: |
208200
xvfb-run make -C doc html SPHINXOPTS="-j auto -W --keep-going"
209201
210-
- name: Zip documentation
211-
run: |
212-
cd doc/build/html
213-
zip -r PyMAPDL_documentation.zip *
214-
215202
- name: Upload HTML Documentation
216203
uses: actions/upload-artifact@v3
217204
with:
218-
name: HTML-Documentation
219-
path: doc/build/html/PyMAPDL_documentation.zip
205+
name: documentation-html
206+
path: doc/_build/html
220207
retention-days: 7
221208

222-
- name: Deploy
223-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
224-
uses: JamesIves/[email protected]
225-
with:
226-
repository-name: pyansys/pymapdl-docs
227-
token: ${{ steps.get_workflow_token.outputs.token }}
228-
branch: gh-pages
229-
folder: doc/build/html
230-
clean: true
231-
232209
- name: Build PDF Documentation
233210
working-directory: doc
234211
run: make pdf
235212

236213
- name: Upload PDF Documentation
237214
uses: actions/upload-artifact@v3
238215
with:
239-
name: PDF-Documentation
240-
path: doc/build/latex/pymapdl*.pdf
216+
name: documentation-pdf
217+
path: doc/_build/latex/pymapdl*.pdf
241218
retention-days: 7
242219

243220
- name: Display files structure
@@ -266,7 +243,7 @@ jobs:
266243
- name: Tar logs
267244
if: always()
268245
run: |
269-
cp -f doc/build/latex/*.log ./logs-build-docs/
246+
cp -f doc/_build/latex/*.log ./logs-build-docs/
270247
cp log.txt ./logs-build-docs/
271248
tar cvzf ./logs-build-docs.tgz ./logs-build-docs
272249
@@ -284,7 +261,7 @@ jobs:
284261
- name: List main files
285262
if: always()
286263
run: |
287-
if compgen -G 'doc/build/latex/*.log' > /dev/null ;then for f in doc/build/latex/*.log; do echo "::group:: Output latex log file $f" && cat $f && echo "::endgroup::" ; done; fi
264+
if compgen -G 'doc/_build/latex/*.log' > /dev/null ;then for f in doc/_build/latex/*.log; do echo "::group:: Output latex log file $f" && cat $f && echo "::endgroup::" ; done; fi
288265
if compgen -G './logs-build-docs/*.err' > /dev/null ;then for f in ./logs-build-docs/*.err; do echo "::group:: Error file $f" && cat $f && echo "::endgroup::" ; done; fi
289266
if compgen -G './logs-build-docs/*.log' > /dev/null ;then for f in ./logs-build-docs/*.log; do echo "::group:: Log file $f" && cat $f && echo "::endgroup::" ; done; fi
290267
if compgen -G './logs-build-docs/*.out' > /dev/null ;then for f in ./logs-build-docs/*.out; do echo "::group:: Output file $f" && cat $f && echo "::endgroup::" ; done; fi
@@ -454,3 +431,17 @@ jobs:
454431
overwrite: "{
455432
title: `Release FAILED!`,
456433
}"
434+
435+
upload_docs_release:
436+
name: "Upload release documentation"
437+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
438+
runs-on: ubuntu-latest
439+
needs: [Release]
440+
steps:
441+
- name: Deploy the stable documentation
442+
uses: pyansys/actions/doc-deploy-stable@v2
443+
with:
444+
cname: ${{ env.DOCUMENTATION_CNAME }}
445+
token: ${{ secrets.GITHUB_TOKEN }}
446+
python-version: '3.10'
447+

.github/workflows/nightly-doc-build.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v3
2121

22-
# used for documentation deployment
23-
- name: Get Bot Application Token
24-
id: get_workflow_token
25-
uses: peter-murray/workflow-application-token-action@v1
26-
with:
27-
application_id: ${{ secrets.BOT_APPLICATION_ID }}
28-
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }}
29-
3022
- name: Setup Python
3123
uses: actions/[email protected]
3224
with:
@@ -65,15 +57,6 @@ jobs:
6557
pip install -r requirements/requirements_docs.txt
6658
xvfb-run make -C doc html
6759
68-
- name: Deploy
69-
uses: JamesIves/[email protected]
70-
with:
71-
repository-name: pyansys/pymapdl-dev-docs
72-
token: ${{ steps.get_workflow_token.outputs.token }}
73-
BRANCH: gh-pages
74-
FOLDER: doc/build/html
75-
CLEAN: true
76-
7760
- name: Display files structure
7861
if: always()
7962
run: |
@@ -133,4 +116,4 @@ jobs:
133116
steps: ${{ toJson(steps) }}
134117
overwrite: "{
135118
title: `${workflow} failed.`,
136-
}"
119+
}"

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
"--force-sort-within-sections",
1414
"--skip-glob", "*__init__.py",
1515
]
16-
- repo: https://gitlab.com/PyCQA/flake8
16+
- repo: https://github.com/PyCQA/flake8
1717
rev: 3.9.2
1818
hooks:
1919
- id: flake8

doc/Makefile

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
SPHINXOPTS = -j auto
66
SPHINXBUILD = sphinx-build
77
SOURCEDIR = source
8-
BUILDDIR = build
8+
BUILDDIR = _build
9+
LINKCHECKDIR = $(BUILDDIR)/linkcheck
910

1011
# Put it first so that "make" without argument is like "make help".
1112
help:
@@ -36,8 +37,13 @@ clean-except-examples:
3637
pdf:
3738
@$(SPHINXBUILD) -M latex "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3839
python validate_png.py # clean-up GIFs mislabeled as PNG
39-
cd build/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
40-
(test -f build/latex/*.pdf && echo pdf exists) || exit 1
40+
cd $(BUILDDIR)/latex && latexmk -r latexmkrc -pdf *.tex -interaction=nonstopmode || true
41+
(test -f $(BUILDDIR)/latex/*.pdf && echo pdf exists) || exit 1
42+
43+
checklinks:
44+
$(SPHINXBUILD) -b linkcheck $(SPHINXOPTS) $(LINKCHECKDIR)
45+
@echo
46+
@echo "Check finished. Report is in $(LINKCHECKDIR)."
4147

4248
# manually deploy to https://github.com/pyansys/pymapdl-docs
4349
# WARNING: Use with care as this overwrites history of gh-pages
@@ -47,12 +53,12 @@ deploy:
4753
@echo "This overwrites the history of gh-pages."
4854
@echo "Are you sure? [y/N] " && read ans && [ $${ans:-N} = y ]
4955
@echo "Deploying..."
50-
touch build/html/.nojekyll
51-
echo "mapdldocs.pyansys.com" >> build/html/CNAME
52-
cd build/html && git init
53-
cd build/html && git add .
54-
cd build/html && git checkout -b gh-pages
55-
cd build/html && git commit -am "manual build"
56-
cd build/html && git remote add origin https://github.com/pyansys/pymapdl-docs
57-
cd build/html && git push -u origin gh-pages --force
58-
rm -rf build/html/.git
56+
touch $(BUILDDIR)/html/.nojekyll
57+
echo "mapdl.docs.pyansys.com" >> build/html/CNAME
58+
cd $(BUILDDIR)/html && git init
59+
cd $(BUILDDIR)/html && git add .
60+
cd $(BUILDDIR)/html && git checkout -b gh-pages
61+
cd $(BUILDDIR)/html && git commit -am "manual build"
62+
cd $(BUILDDIR)/html && git remote add origin https://github.com/pyansys/pymapdl-docs
63+
cd $(BUILDDIR)/html && git push -u origin gh-pages --force
64+
rm -rf $(BUILDDIR)/html/.git

doc/make.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ if "%SPHINXBUILD%" == "" (
88
set SPHINXBUILD=sphinx-build
99
)
1010
set SOURCEDIR=source
11-
set BUILDDIR=build
11+
set BUILDDIR=_build
12+
set LINKCHECKDIR=\%BUILDDIR%\linkcheck
1213

1314
if "%1" == "" goto help
1415
if "%1" == "clean" goto clean

doc/source/conf.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
import warnings
55

6-
from ansys_sphinx_theme import pyansys_logo_black
6+
from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_black
77
import numpy as np
88
import pyvista
99
from sphinx_gallery.sorting import FileNameSortKey
@@ -45,6 +45,7 @@
4545

4646
# The short X.Y version
4747
release = version = __version__
48+
cname = os.getenv("DOCUMENTATION_CNAME", "nocname.com")
4849

4950

5051
# -- General configuration ---------------------------------------------------
@@ -106,7 +107,7 @@
106107
}
107108

108109
# Favicon
109-
html_favicon = "favicon.png"
110+
html_favicon = ansys_favicon
110111

111112
# notfound.extension
112113
notfound_template = "404.rst"
@@ -188,6 +189,18 @@
188189
"additional_breadcrumbs": [
189190
("PyAnsys", "https://docs.pyansys.com/"),
190191
],
192+
"icon_links": [
193+
{
194+
"name": "Support",
195+
"url": "https://github.com/pyansys/pymapdl/discussions",
196+
"icon": "fa fa-comment fa-fw",
197+
},
198+
],
199+
"switcher": {
200+
"json_url": f"https://{cname}/release/versions.json",
201+
"version_match": get_version_match(__version__),
202+
},
203+
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
191204
}
192205

193206
# -- Options for HTMLHelp output ---------------------------------------------

doc/source/favicon.png

-6.5 KB
Binary file not shown.

doc/validate_png.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from PIL import Image
1010

1111
this_path = os.path.dirname(os.path.abspath(__file__))
12-
check_path = os.path.join(this_path, "build", "latex")
12+
check_path = os.path.join(this_path, "_build", "latex")
1313
if not os.path.isdir(check_path):
1414
raise FileNotFoundError(f"Invalid path {check_path}")
1515

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
55
[project]
66
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
77
name = "ansys-mapdl-core"
8-
version = "0.63.3"
8+
version = "0.63.4"
99
description = "A Python wrapper for Ansys MAPDL."
1010
readme = "README.rst"
1111
requires-python = ">=3.7"

requirements/requirements_docs.txt renamed to requirements/requirements_doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Sphinx==5.1.1
22
ansys-mapdl-reader==0.52.0
3-
ansys-sphinx-theme==0.5.2
3+
ansys-sphinx-theme==0.8.0
44
grpcio==1.43.0
55
imageio-ffmpeg==0.4.7
66
imageio==2.21.2

0 commit comments

Comments
 (0)