diff --git a/doc/source/installer.rst b/doc/source/installer.rst index a39ce58e..b7dbe01d 100644 --- a/doc/source/installer.rst +++ b/doc/source/installer.rst @@ -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 diff --git a/doc/source/user_guide.rst b/doc/source/user_guide.rst index cf8a169f..b3f0dc22 100644 --- a/doc/source/user_guide.rst +++ b/doc/source/user_guide.rst @@ -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 diff --git a/src/ansys/tools/installer/installed_table.py b/src/ansys/tools/installer/installed_table.py index 76466c0d..cb246f78 100644 --- a/src/ansys/tools/installer/installed_table.py +++ b/src/ansys/tools/installer/installed_table.py @@ -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) diff --git a/src/ansys/tools/installer/vscode.py b/src/ansys/tools/installer/vscode.py index f0be5888..422f6ebe 100644 --- a/src/ansys/tools/installer/vscode.py +++ b/src/ansys/tools/installer/vscode.py @@ -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) @@ -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( @@ -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.