generated from ansys/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Doug Addy <[email protected]> Co-authored-by: pyansys-ci-bot <[email protected]>
- Loading branch information
1 parent
dd62c39
commit 94dce45
Showing
6 changed files
with
72 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ on: | |
env: | ||
MAIN_PYTHON_VERSION: '3.10' | ||
LIBRARY_NAME: 'ansys-openapi-common' | ||
DOCUMENTATION_CNAME: 'openapi.docs.pyansys.com' | ||
|
||
jobs: | ||
code-style: | ||
|
@@ -35,54 +36,14 @@ jobs: | |
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
doc-build: | ||
name: Build Documentation | ||
name: Documentation build | ||
runs-on: ubuntu-latest | ||
needs: doc-style | ||
|
||
steps: | ||
- name: "Checkout the repository" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v5 | ||
- name: "Run Ansys documentation building action" | ||
uses: ansys/actions/doc-build@v5 | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- name: "Install system dependencies" | ||
run: | | ||
sudo apt-get update && sudo apt-get install pandoc libkrb5-dev | ||
- name: "Install Python dependencies" | ||
run: | | ||
python -m pip install --upgrade pip tox | ||
python -m pip install poetry~=1.7.0 | ||
- name: Install library | ||
run: | | ||
poetry install --with docs --extras "oidc linux-kerberos" | ||
- name: Build HTML | ||
run: make -C doc html SPHINXOPTS="-W" | ||
|
||
- name: Build PDF Documentation | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy | ||
make -C doc latexpdf | ||
- name: Upload HTML Documentation | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation-html | ||
path: doc/build/html | ||
retention-days: 7 | ||
|
||
- name: Upload PDF Documentation | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation-pdf | ||
path: doc/build/latex/*.pdf | ||
retention-days: 7 | ||
check-links: false | ||
sphinxopts: "-j 1 -W --keep-going" | ||
|
||
smoke-tests: | ||
name: "Build wheelhouse for latest Python versions" | ||
|
@@ -93,12 +54,6 @@ jobs: | |
os: [ubuntu-latest, windows-latest] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- name: Install kerberos headers | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt install libkrb5-dev | ||
- uses: ansys/actions/build-wheelhouse@v6 | ||
with: | ||
library-name: ${{ env.LIBRARY_NAME }} | ||
|
@@ -164,16 +119,23 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: [ doc-build, tests ] | ||
steps: | ||
- name: Install kerberos headers | ||
run: | | ||
sudo apt-get update | ||
sudo apt install libkrb5-dev | ||
- uses: ansys/actions/build-library@v6 | ||
with: | ||
library-name: ${{ env.LIBRARY_NAME }} | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
doc-deploy-dev: | ||
name: "Deploy development documentation" | ||
runs-on: ubuntu-latest | ||
needs: [ build-library ] | ||
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags') | ||
steps: | ||
- uses: ansys/actions/doc-deploy-dev@v6 | ||
with: | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
doc-artifact-name: documentation-html | ||
|
||
release: | ||
name: "Release" | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
|
@@ -198,25 +160,7 @@ jobs: | |
needs: release | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get Bot Application Token | ||
id: get_workflow_token | ||
uses: peter-murray/workflow-application-token-action@v3 | ||
with: | ||
application_id: ${{ secrets.BOT_APPLICATION_ID }} | ||
application_private_key: ${{ secrets.BOT_APPLICATION_PRIVATE_KEY }} | ||
|
||
- uses: actions/download-artifact@v4 | ||
- uses: ansys/actions/doc-deploy-stable@v6 | ||
with: | ||
name: documentation-html | ||
path: ~/html | ||
|
||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
with: | ||
repository-name: pyansys/openapi-common-docs | ||
token: ${{ steps.get_workflow_token.outputs.token }} | ||
BRANCH: gh-pages | ||
FOLDER: ~/html | ||
CLEAN: true | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" | |
[tool.poetry] | ||
name = "ansys-openapi-common" | ||
description = "Provides a helper to create sessions for use with Ansys OpenAPI clients." | ||
version = "2.0.1" | ||
version = "2.0.2" | ||
license = "MIT" | ||
authors = ["ANSYS, Inc. <[email protected]>"] | ||
maintainers = ["ANSYS, Inc. <[email protected]>"] | ||
|
@@ -62,17 +62,22 @@ pydantic = { version = "*" } | |
requests-mock = { version = "*" } | ||
pytest-mock = { version = "*" } | ||
covertable = { version = "*" } | ||
asgi_gssapi = { version = "*", markers = "sys_platform == 'linux'" } | ||
mypy = "^1.8.0" | ||
types-requests = { version = "*" } | ||
types-python-dateutil = { version = "*" } | ||
requests_auth = { version = "*" } | ||
keyring = { version = "*" } | ||
|
||
[tool.poetry.group.docs] | ||
[tool.poetry.group.dev-linux] | ||
optional = true | ||
|
||
[tool.poetry.group.dev-linux.dependencies] | ||
asgi_gssapi = { version = "*", markers = "sys_platform == 'linux'" } | ||
|
||
[tool.poetry.group.doc] | ||
optional = true | ||
|
||
[tool.poetry.group.docs.dependencies] | ||
[tool.poetry.group.doc.dependencies] | ||
# Doc packages | ||
ansys-sphinx-theme = { version = "0.14.0" } | ||
numpydoc = { version = "1.6.0" } | ||
|
@@ -108,7 +113,7 @@ python = | |
[testenv] | ||
whitelist_externals = poetry | ||
commands_pre = | ||
poetry install --no-root --extras "oidc linux-kerberos" | ||
poetry install --no-root --with dev-linux --extras "oidc linux-kerberos" | ||
extras = | ||
oidc | ||
linux-kerberos | ||
|