Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add "what's new" sections to changelog #1057

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/1057.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add "what's new" sections to changelog
119 changes: 119 additions & 0 deletions doc/changelog.d/whatsnew.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
fragments:

- title: Launch GUI
version: 0.11.8
content: |
The `launch_gui() <api/ansys/mechanical/core/embedding/app/App.html#App.launch_gui>`_ function
graphically launches the current state of the embedded instance when the
`App <api/ansys/mechanical/core/embedding/app/App.html>`_ has been saved.

The `launch_gui()` function saves the active `.mechdb` file and creates a copy of the existing
`.mechdb` file with a temporary name. The temporary `.mechdb` file is used to launch the GUI.
By default, the temporary `.mechdb` file is deleted after the GUI is closed, but the user can
specify whether or not to delete the temporary file.

Usage:
.. code:: python

from ansys.mechanical.core import App

# Initialize and save the app
app = App()
app.save()

# Launch the GUI and delete the temporary `.mechdb` file when the GUI is closed
app.launch_gui()

# Launch the GUI and keep the temporary `.mechdb` file when the GUI is closed
app.launch_gui(delete_tmp_on_close=False)

- title: Autocomplete settings command
version: 0.11.8
content: |
The ``ansys-mechanical-ideconfig`` command prints the settings that are necessary for
autocomplete to work with ``ansys-mechanical-stubs``. This command takes in three arguments:
``--ide vscode``, ``--target user`` or ``--target workspace``, and ``--revision <version>``.
If the revision is not provided, ``ansys-tools-path`` will retrieve the Mechanical version
from your system.

Usage:
.. code:: shell

ansys-mechanical-ideconfig --ide vscode --target user --revision 251

Terminal output for Windows user's settings.json file:
.. code:: shell

Update C:\Users\{username}\AppData\Roaming\Code\User\settings.json with the following information:

{
"python.autoComplete.extraPaths": [
"{project_directory}\\.venv\\Lib\\site-packages\\ansys\\mechanical\\stubs\\v251"
],
"python.analysis.extraPaths": [
"{project_directory}\\.venv\\Lib\\site-packages\\ansys\\mechanical\\stubs\\v251"
]
}

- title: Visualize geometry in 3D
version: 0.11.4
content: |
The `app.plot()` function allows you to visualize imported geometry in 3D. This feature is
available only from 24R1 or later and requires the `ansys-mechanical-core[viz]` dependencies
to be installed:

.. code:: shell

pip install ansys-mechanical-core[viz]

Usage:
.. code:: python

from ansys.mechanical.core import App

# Initialize the app and update globals
app = App()
app.update_globals(globals())

# Import the geometry
app.open("path/to/file.mechdat")

# Visualize
app.plot()

- title: Print the Mechanical project tree
version: 0.11.1
content: |
The `app.print_tree()` function prints the hierarchical tree representation of the
Mechanical project structure and object state.

Usage:
.. code:: python

from ansys.mechanical.core import App

# Initialize the app and update globals
app = App()
app.update_globals(globals())

# Print the entire tree
app.print_tree()

# Print the entire tree but truncate the output after 2 lines
app.print_tree(max_lines=2)

# Print the tree for the Model and truncate after 3 lines
app.print_tree('Model', 3)

Output for `app.print_tree()`:
.. code:: shell

├── Project
| ├── Model
| | ├── Geometry Imports (⚡︎)
| | ├── Geometry (?)
| | ├── Materials (✓)
| | ├── Coordinate Systems (✓)
| | | ├── Global Coordinate System (✓)
| | ├── Remote Points (✓)
| | ├── Mesh (?)
6 changes: 6 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@
"icon": "fa fa-comment fa-fw",
},
],
"whatsnew": {
"whatsnew_file_name": "../changelog.d/whatsnew.yml",
"changelog_file_name": "changelog.rst",
"sidebar_pages": ["changelog", "index"],
},
"ansys_sphinx_theme_autoapi": {"project": project, "templates": "_templates/autoapi"},
"navigation_depth": 10,
}
Expand Down Expand Up @@ -309,6 +314,7 @@
"https://discuss.ansys.com/*",
"https://www.ansys.com/*",
"../api/*", # Remove this after release 0.10.12
"api/*",
"path.html",
]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tests = [
]
doc = [
"sphinx==8.1.3",
"ansys-sphinx-theme[autoapi]==1.2.7",
"ansys-sphinx-theme[autoapi,changelog]==1.3.1",
"grpcio==1.70.0",
"imageio-ffmpeg==0.6.0",
"imageio==2.37.0",
Expand Down
Loading