Skip to content
Merged
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
2 changes: 1 addition & 1 deletion doc/source/installer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ On the ``Launching options`` section, the following options are available:
On the ``Package management`` section, the following options are available:

* ``Install Python default packages``: by selecting this option, your selected Python install
receives the latest compatible versions for ``numpy``, ``scipy``, ``pandas``, ``matplotlib``
receives the latest compatible versions for ``numpy``, ``scipy``, ``pandas``, ``matplotlib``, ``pyvista``,
and ``scikit-learn``.
* ``Install PyAnsys``: by selecting this option, your selected Python install has access to
the latest, compatible PyAnsys metapackage installation. This metapackage provides you with
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ In the "General Package Management" section, users are presented with the choice
to "install default packages." By opting for this selection, the chosen
Python installation or virtual environment receives the most up-to-date
compatible versions of essential packages such as such as ``numpy``, ``scipy``,
``pandas``, ``matplotlib``, and ``scikit-learn``.
``pandas``, ``matplotlib``, ``pyvista``, and ``scikit-learn``.
After the installation process concludes, users can view the list of
installed packages by clicking the ``List Installed Packages`` button.
The Ansys Python Manager subsequently display the installed packages in the
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/tools/installer/installed_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def launch_jupyter_notebook(self):

def install_defaults(self):
"""Install Python default packages."""
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"
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"
self._update_pck_mnger()
self.launch_cmd(cmd)

Expand Down
45 changes: 2 additions & 43 deletions src/ansys/tools/installer/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,9 @@ def __init__(self, parent):
vscode_layout.addWidget(vscode_window_path_config)

vscode_window_button_open = QtWidgets.QPushButton("Open")
vscode_window_button_open.clicked.connect(
lambda x: self._pop_up("Do you want to open?", self._open_vscode)
)
vscode_window_button_open.clicked.connect(lambda x: self._open_vscode())
vscode_window_button_close = QtWidgets.QPushButton("Close")
vscode_window_button_close.clicked.connect(
lambda x: self._pop_up("Do you want to close?", self._close_all)
)
vscode_window_button_close.clicked.connect(lambda x: self._close_all())

vscode_window_layout_1 = QtWidgets.QHBoxLayout()
vscode_window_layout_1.addWidget(vscode_window_label)
Expand Down Expand Up @@ -118,8 +114,6 @@ def _open_vscode(self):
if os.path.exists(rf"{path}"):
error_msg = "echo Failed to launch vscode. Try reinstalling code by following this link https://code.visualstudio.com/download"
self._parent.launch_cmd(f'code "{path}" && exit 0 || {error_msg}')

self.user_confirmation_form.close()
self._parent.vscode_window.close()
else:
self.vscode_warning_text.setText(
Expand All @@ -130,46 +124,11 @@ def _open_vscode(self):
color: rgb(255, 0, 0);
"""
)
self.user_confirmation_form.close()

def _close_all(self):
"""Close all the pop-up window."""
self.user_confirmation_form.close()
self._parent.vscode_window.close()

def _pop_up(self, message, call_back):
"""Launch the confirmation pop-up window."""
self.user_confirmation_form = QtWidgets.QWidget()
self.user_confirmation_form.move(
self.user_confirmation_form.frameGeometry().center()
)
user_confirmation_label = QtWidgets.QLabel()
user_confirmation_label.setText(message)
user_confirmation_label.setOpenExternalLinks(True)
user_confirmation_label.setTextFormat(QtCore.Qt.TextFormat.RichText)
user_confirmation_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignJustify)
user_confirmation_label.setWordWrap(True)

user_confirmation_layout_horizontal = QtWidgets.QHBoxLayout()
user_confirmation_yes_button = QtWidgets.QPushButton("Yes")
user_confirmation_yes_button.clicked.connect(call_back)
user_confirmation_no_button = QtWidgets.QPushButton("No")
user_confirmation_no_button.clicked.connect(self.user_confirmation_form.close)
user_confirmation_layout = QtWidgets.QVBoxLayout()
user_confirmation_layout.addWidget(user_confirmation_label)
user_confirmation_layout_horizontal.addWidget(user_confirmation_yes_button)
user_confirmation_layout_horizontal.addWidget(user_confirmation_no_button)
user_confirmation_layout.addLayout(user_confirmation_layout_horizontal)
self.user_confirmation_form.setLayout(user_confirmation_layout)
self.user_confirmation_form.setWindowTitle("Confirmation")
icon = QtGui.QIcon(ANSYS_FAVICON)
self.user_confirmation_form.setWindowIcon(icon)
self.user_confirmation_form.resize(400, 40)
self.user_confirmation_form.setWindowFlag(
QtCore.Qt.WindowCloseButtonHint, False
)
self.user_confirmation_form.show()

def is_vscode_installed(self):
"""Check if VSCode is installed or not.

Expand Down