Skip to content

Commit

Permalink
MAINT: Cheat sheet (#871)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
dipinknair and pyansys-ci-bot authored Aug 13, 2024
1 parent 8d3ac59 commit 3df45cc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/changelog.d/871.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINT: Cheat sheet
4 changes: 2 additions & 2 deletions doc/source/cheatsheet/cheat_sheet.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: PyMechanical cheat sheet
format: cheat_sheet-pdf
version: 0.11.0
version: main
footer: PyMechanical
footerlinks:
- urls: 'https://mechanical.docs.pyansys.com/version/stable/'
Expand Down Expand Up @@ -78,7 +78,7 @@ import ansys.mechanical.core as pymechanical
# Connect locally
mechanical = pymechanical.Mechanical(port=10000)
# Or
# Connect remotely, specifying the IP address or hostname
# Connect remotely, to the IP address or hostname
mechanical = pymechanical.Mechanical(
"192.168.0.1", port=10000
)
Expand Down
14 changes: 14 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,17 @@
linkcheck_ignore.append(
f"https://github.com/ansys/pymechanical/releases/tag/v{pymechanical.__version__}"
)


def replace_version_in_qmd(file_path, version):
"""Update the version in cheatsheet."""
with open(file_path, "r") as file:
content = file.read()

content = content.replace("version: main", f"version: {version}")

with open(file_path, "w") as file:
file.write(content)


replace_version_in_qmd("cheatsheet/cheat_sheet.qmd", version)

0 comments on commit 3df45cc

Please sign in to comment.