Skip to content

Commit 47f6213

Browse files
authored
Added pyvista as a default package (#297)
1 parent 102cb0e commit 47f6213

File tree

4 files changed

+5
-46
lines changed

4 files changed

+5
-46
lines changed

doc/source/installer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ On the ``Launching options`` section, the following options are available:
346346
On the ``Package management`` section, the following options are available:
347347

348348
* ``Install Python default packages``: by selecting this option, your selected Python install
349-
receives the latest compatible versions for ``numpy``, ``scipy``, ``pandas``, ``matplotlib``
349+
receives the latest compatible versions for ``numpy``, ``scipy``, ``pandas``, ``matplotlib``, ``pyvista``,
350350
and ``scikit-learn``.
351351
* ``Install PyAnsys``: by selecting this option, your selected Python install has access to
352352
the latest, compatible PyAnsys metapackage installation. This metapackage provides you with

doc/source/user_guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ In the "General Package Management" section, users are presented with the choice
129129
to "install default packages." By opting for this selection, the chosen
130130
Python installation or virtual environment receives the most up-to-date
131131
compatible versions of essential packages such as such as ``numpy``, ``scipy``,
132-
``pandas``, ``matplotlib``, and ``scikit-learn``.
132+
``pandas``, ``matplotlib``, ``pyvista``, and ``scikit-learn``.
133133
After the installation process concludes, users can view the list of
134134
installed packages by clicking the ``List Installed Packages`` button.
135135
The Ansys Python Manager subsequently display the installed packages in the

src/ansys/tools/installer/installed_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def launch_jupyter_notebook(self):
383383

384384
def install_defaults(self):
385385
"""Install Python default packages."""
386-
cmd = "pip install numpy pandas scipy scikit-learn matplotlib && timeout 3 && exit || echo Failed to install default Python packages. Try reinstalling it with pip install numpy pandas scipy scikit-learn matplotlib --force-reinstall"
386+
cmd = "pip install numpy pandas scipy scikit-learn matplotlib pyvista[all] && timeout 3 && exit || echo Failed to install default Python packages. Try reinstalling it with pip install numpy pandas scipy scikit-learn matplotlib pyvista[all] --force-reinstall"
387387
self._update_pck_mnger()
388388
self.launch_cmd(cmd)
389389

src/ansys/tools/installer/vscode.py

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,9 @@ def __init__(self, parent):
7575
vscode_layout.addWidget(vscode_window_path_config)
7676

7777
vscode_window_button_open = QtWidgets.QPushButton("Open")
78-
vscode_window_button_open.clicked.connect(
79-
lambda x: self._pop_up("Do you want to open?", self._open_vscode)
80-
)
78+
vscode_window_button_open.clicked.connect(lambda x: self._open_vscode())
8179
vscode_window_button_close = QtWidgets.QPushButton("Close")
82-
vscode_window_button_close.clicked.connect(
83-
lambda x: self._pop_up("Do you want to close?", self._close_all)
84-
)
80+
vscode_window_button_close.clicked.connect(lambda x: self._close_all())
8581

8682
vscode_window_layout_1 = QtWidgets.QHBoxLayout()
8783
vscode_window_layout_1.addWidget(vscode_window_label)
@@ -118,8 +114,6 @@ def _open_vscode(self):
118114
if os.path.exists(rf"{path}"):
119115
error_msg = "echo Failed to launch vscode. Try reinstalling code by following this link https://code.visualstudio.com/download"
120116
self._parent.launch_cmd(f'code "{path}" && exit 0 || {error_msg}')
121-
122-
self.user_confirmation_form.close()
123117
self._parent.vscode_window.close()
124118
else:
125119
self.vscode_warning_text.setText(
@@ -130,46 +124,11 @@ def _open_vscode(self):
130124
color: rgb(255, 0, 0);
131125
"""
132126
)
133-
self.user_confirmation_form.close()
134127

135128
def _close_all(self):
136129
"""Close all the pop-up window."""
137-
self.user_confirmation_form.close()
138130
self._parent.vscode_window.close()
139131

140-
def _pop_up(self, message, call_back):
141-
"""Launch the confirmation pop-up window."""
142-
self.user_confirmation_form = QtWidgets.QWidget()
143-
self.user_confirmation_form.move(
144-
self.user_confirmation_form.frameGeometry().center()
145-
)
146-
user_confirmation_label = QtWidgets.QLabel()
147-
user_confirmation_label.setText(message)
148-
user_confirmation_label.setOpenExternalLinks(True)
149-
user_confirmation_label.setTextFormat(QtCore.Qt.TextFormat.RichText)
150-
user_confirmation_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignJustify)
151-
user_confirmation_label.setWordWrap(True)
152-
153-
user_confirmation_layout_horizontal = QtWidgets.QHBoxLayout()
154-
user_confirmation_yes_button = QtWidgets.QPushButton("Yes")
155-
user_confirmation_yes_button.clicked.connect(call_back)
156-
user_confirmation_no_button = QtWidgets.QPushButton("No")
157-
user_confirmation_no_button.clicked.connect(self.user_confirmation_form.close)
158-
user_confirmation_layout = QtWidgets.QVBoxLayout()
159-
user_confirmation_layout.addWidget(user_confirmation_label)
160-
user_confirmation_layout_horizontal.addWidget(user_confirmation_yes_button)
161-
user_confirmation_layout_horizontal.addWidget(user_confirmation_no_button)
162-
user_confirmation_layout.addLayout(user_confirmation_layout_horizontal)
163-
self.user_confirmation_form.setLayout(user_confirmation_layout)
164-
self.user_confirmation_form.setWindowTitle("Confirmation")
165-
icon = QtGui.QIcon(ANSYS_FAVICON)
166-
self.user_confirmation_form.setWindowIcon(icon)
167-
self.user_confirmation_form.resize(400, 40)
168-
self.user_confirmation_form.setWindowFlag(
169-
QtCore.Qt.WindowCloseButtonHint, False
170-
)
171-
self.user_confirmation_form.show()
172-
173132
def is_vscode_installed(self):
174133
"""Check if VSCode is installed or not.
175134

0 commit comments

Comments
 (0)