From fcac4766cea6dbb9b3cc9b4b01e2dc9381e4ac68 Mon Sep 17 00:00:00 2001 From: Abdoulbari Zakir Date: Wed, 11 Dec 2024 15:14:16 +0100 Subject: [PATCH 1/4] remove ui --- .github/workflows/build_oracle8.yml | 1 - .github/workflows/build_ubuntu.yml | 2 - .github/workflows/build_windows.yml | 2 - .../workflows/ubuntu-system-deps-build.yml | 2 - .../workflows/windows-vcpkg-deps-build.yml | 3 +- .gitignore | 1 - CMakeLists.txt | 1 - README.md | 5 - .../install_from_sources/0-INSTALL.md | 5 +- .../install_from_sources/3-Build.md | 1 - ...er-creation.md => 5-Installer-creation.md} | 0 .../install_from_sources/5-ui-creation.md | 26 -- .../{7-Xpress.md => 6-Xpress.md} | 0 .../get-started/launching-optimization.md | 4 - requirements-ui.txt | 2 - src/python/antares-xpansion-ui.py | 332 ------------------ 16 files changed, 3 insertions(+), 384 deletions(-) rename docs/developer-guide/install_from_sources/{6-Installer-creation.md => 5-Installer-creation.md} (100%) delete mode 100644 docs/developer-guide/install_from_sources/5-ui-creation.md rename docs/developer-guide/install_from_sources/{7-Xpress.md => 6-Xpress.md} (100%) delete mode 100644 requirements-ui.txt delete mode 100644 src/python/antares-xpansion-ui.py diff --git a/.github/workflows/build_oracle8.yml b/.github/workflows/build_oracle8.yml index 0ab49eac4..7eda7e2f9 100644 --- a/.github/workflows/build_oracle8.yml +++ b/.github/workflows/build_oracle8.yml @@ -136,7 +136,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/deps;${{env.ORTOOLS_DIR}}/install" \ - -DBUILD_UI=OFF \ -DALLOW_RUN_AS_ROOT=ON \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/build_ubuntu.yml b/.github/workflows/build_ubuntu.yml index 0c7dbf26d..f20f73899 100644 --- a/.github/workflows/build_ubuntu.yml +++ b/.github/workflows/build_ubuntu.yml @@ -63,7 +63,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-tests.txt - pip install -r requirements-ui.txt - name: Set-up Xpress with pip for Ubuntu shell: bash @@ -142,7 +141,6 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ -DCMAKE_PREFIX_PATH="${{ github.workspace }}/deps;${{env.ORTOOLS_DIR}}/install" \ - -DBUILD_UI=ON \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 45c695e70..3da760ab0 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -52,7 +52,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-tests.txt - pip install -r requirements-ui.txt - name: Set-up Xpress with pip shell: bash @@ -121,7 +120,6 @@ jobs: -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DPython3_EXECUTABLE="${{ env.Python3_ROOT_DIR }}/python.exe" - -DBUILD_UI=ON - name: Build run: | diff --git a/.github/workflows/ubuntu-system-deps-build.yml b/.github/workflows/ubuntu-system-deps-build.yml index b54157050..52f916054 100644 --- a/.github/workflows/ubuntu-system-deps-build.yml +++ b/.github/workflows/ubuntu-system-deps-build.yml @@ -36,7 +36,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-tests.txt - pip install -r requirements-ui.txt - name: Install mandatory system libraries run: | @@ -94,7 +93,6 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ - -DBUILD_UI=ON \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/.github/workflows/windows-vcpkg-deps-build.yml b/.github/workflows/windows-vcpkg-deps-build.yml index b9b8c78bb..af97b6562 100644 --- a/.github/workflows/windows-vcpkg-deps-build.yml +++ b/.github/workflows/windows-vcpkg-deps-build.yml @@ -39,7 +39,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-tests.txt - pip install -r requirements-ui.txt - name: Pre-requisites shell: cmd @@ -75,7 +74,7 @@ jobs: - name: Configure run: | $pwd=Get-Location - cmake -B _build -S . -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON + cmake -B _build -S . -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install - name: Cache vcpkg binary dir if: always() diff --git a/.gitignore b/.gitignore index 89d88ecaa..9b787456c 100644 --- a/.gitignore +++ b/.gitignore @@ -44,7 +44,6 @@ CMakeFiles/* src/python/config.yaml src/python/antares_xpansion/__version__.py src/python/resources.py -config-ui.yaml build_config.yaml # Tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 8bf1ff759..f67736238 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -255,7 +255,6 @@ endif (COIN_OR) # =========================================================================== # Targets # =========================================================================== -option(BUILD_UI "Build antares-xpansion ui" OFF) option(BUILD_TESTING "Activates unit tests building" OFF) if (WIN32) diff --git a/README.md b/README.md index b880f59f2..05e307cae 100644 --- a/README.md +++ b/README.md @@ -96,11 +96,6 @@ where `x.y.z` is the version number. ``` - -### Graphical user interface - -Antares-Xpansion comes with a GUI. The GUI can be launched by running `antares-xpansion-ui.exe`. For now, this GUI is in the experimental phase. - ## Technologies Antares-Xpansion is developed mainly in **C++** and uses a **Python** runner to drive the execution of multiple executables. diff --git a/docs/developer-guide/install_from_sources/0-INSTALL.md b/docs/developer-guide/install_from_sources/0-INSTALL.md index e4fad0faf..fd12fc3e4 100644 --- a/docs/developer-guide/install_from_sources/0-INSTALL.md +++ b/docs/developer-guide/install_from_sources/0-INSTALL.md @@ -18,9 +18,8 @@ Follow this [link][Doxygen_Code_Documentation] for Doxygen code documentation. - [Dependencies](2-Dependencies-install.md) - [Build](3-Build.md) - [Tests](4-Tests.md) -- [UI creation](5-ui-creation.md) -- [Installer creation](6-Installer-creation.md) -- [Xpress integration](7-Xpress.md) +- [Installer creation](5-Installer-creation.md) +- [Xpress integration](6-Xpress.md) [ubuntu_system_svg]: https://github.com/AntaresSimulatorTeam/antares-xpansion/actions/workflows/ubuntu-system-deps-build.yml/badge.svg?query=branch%3Adevelop [ubuntu_system_link]: https://github.com/AntaresSimulatorTeam/antares-xpansion/actions/workflows/ubuntu-system-deps-build.yml?query=branch%3Adevelop diff --git a/docs/developer-guide/install_from_sources/3-Build.md b/docs/developer-guide/install_from_sources/3-Build.md index ea64bdd47..4810e6f52 100644 --- a/docs/developer-guide/install_from_sources/3-Build.md +++ b/docs/developer-guide/install_from_sources/3-Build.md @@ -42,7 +42,6 @@ Here is a list of available CMake configure options: |`BUILD_not_system`|`ON`|Enable build of external librairies not available on system package manager.| |`BUILD_ALL`|`OFF`|Enable build of ALL external librairies.| |`BUILD_TESTING`|`OFF`|Enable test build.| -|`BUILD_UI`|`OFF`|Enable UI build.| |`ALLOW_RUN_AS_ROOT`|`OFF`|allow mpi to run as root for centOs docker.| Additionnal vcpkg options: diff --git a/docs/developer-guide/install_from_sources/6-Installer-creation.md b/docs/developer-guide/install_from_sources/5-Installer-creation.md similarity index 100% rename from docs/developer-guide/install_from_sources/6-Installer-creation.md rename to docs/developer-guide/install_from_sources/5-Installer-creation.md diff --git a/docs/developer-guide/install_from_sources/5-ui-creation.md b/docs/developer-guide/install_from_sources/5-ui-creation.md deleted file mode 100644 index 0e940a4e0..000000000 --- a/docs/developer-guide/install_from_sources/5-ui-creation.md +++ /dev/null @@ -1,26 +0,0 @@ -# User interface creation -A PyQt5 user interface (UI) is available: `src\python\antares-xpansion-ui.py` To build the UI, the option `BUILD_UI` must be enabled at [configure time](3-Build.md#configure). - -## Install requirements - -=== "Windows" - ``` - pip3 install -r requirements-ui.txt - ``` -=== "Centos" - ``` - pip3 install -r requirements-ui.txt - ``` -=== "Ubuntu" - - ``` - sudo apt install python3-pyqt5 - ``` - -## Force new generation for resource file -A `resource.py` python module is created when configuring CMake. To force the regeneration of this file if images are changed, use `pyrcc5`. -``` -cd src\python -pyrcc5 images.qrc > resources.py -``` - diff --git a/docs/developer-guide/install_from_sources/7-Xpress.md b/docs/developer-guide/install_from_sources/6-Xpress.md similarity index 100% rename from docs/developer-guide/install_from_sources/7-Xpress.md rename to docs/developer-guide/install_from_sources/6-Xpress.md diff --git a/docs/user-guide/get-started/launching-optimization.md b/docs/user-guide/get-started/launching-optimization.md index 8523bf655..929cfd9e3 100644 --- a/docs/user-guide/get-started/launching-optimization.md +++ b/docs/user-guide/get-started/launching-optimization.md @@ -94,10 +94,6 @@ Show the Antares-Xpansion version. Show the Antares-Simulator version (used in the `antares` step). -## Graphical user interface - -Since v0.6.0, Antares-Xpansion comes with a GUI. The GUI can be launched by running `antares-xpansion-ui.exe`. For now, this GUI is in the experimental phase. - ![](../../assets/media/ui.png) ## Output of Antares-Xpansion diff --git a/requirements-ui.txt b/requirements-ui.txt deleted file mode 100644 index 7984510f3..000000000 --- a/requirements-ui.txt +++ /dev/null @@ -1,2 +0,0 @@ --r requirements.txt -PyQt5 diff --git a/src/python/antares-xpansion-ui.py b/src/python/antares-xpansion-ui.py deleted file mode 100644 index 9e0c4735b..000000000 --- a/src/python/antares-xpansion-ui.py +++ /dev/null @@ -1,332 +0,0 @@ -import os -import psutil -import sys -import yaml - -from PyQt5.QtCore import Qt -from PyQt5.QtGui import QFont, QMovie, QIcon -from PyQt5.QtWidgets import QApplication, QLabel, QLineEdit, QPushButton, QVBoxLayout, \ - QHBoxLayout, QWidget, QFileDialog, QRadioButton, QSpacerItem, QSizePolicy, QPlainTextEdit, QMessageBox, QGridLayout, \ - QComboBox, QGroupBox, QSpinBox, QCheckBox -from PyQt5.QtCore import QProcess, QByteArray, QSettings -from pathlib import Path - -import resources - -STEPS = ["full", "antares", "problem_generation", - "benders", "study_update", "sensitivity", "resume"] -STEP_WITH_SIMULATION_NAME = ["problem_generation", - "benders", "study_update", "sensitivity", "resume"] -NEW_SIMULATION_NAME = "New" -LAST_ANTARES_STUDY_DIR = "last_antares_study_dir" - - -class MainWidget(QWidget): - - def __init__(self, parent=None): - QWidget.__init__(self, parent=parent) - - self.setWindowTitle('antares-xpansion-ui') - - self._define_install_dir() - - self._settings = QSettings("pyqt_settings.ini", QSettings.IniFormat) - - self._define_launcher_name() - self._main_layout = QVBoxLayout() - - self._init_antares_study_selection_widget() - self._init_antares_xpansion_run_widget() - self._init_log_widget() - - self.setLayout(self._main_layout) - - self._check_run_availability() - - def _define_install_dir(self): - self._install_dir = None - - if Path('config-ui.yaml').is_file(): - with open('config-ui.yaml') as file: - content = yaml.full_load(file) - if content is not None: - self._install_dir = content.get('INSTALL_DIR', "bin") - - def _define_launcher_name(self): - self._launcher_name = "antares-xpansion-launcher" - if sys.platform.startswith("win32"): - self._launcher_name += ".exe" - - def _init_log_widget(self): - log_layout = QHBoxLayout() - self._log_text_edit = QPlainTextEdit() - self._log_text_edit.setReadOnly(True) - font = QFont() - font.setFamily("DejaVu Sans Mono") - self._log_text_edit.setFont(font) - log_layout.addWidget(self._log_text_edit) - self._main_layout.addLayout(log_layout) - - def _init_antares_xpansion_run_widget(self): - - self._xpansion_config_layout = QHBoxLayout() - - self._init_step_selection_widget() - self._init_xpansion_config_widget() - - self._xpansion_config_layout.addSpacerItem( - QSpacerItem(1, 1, QSizePolicy.Expanding, QSizePolicy.Fixed)) - self._init_xpansion_run_widget() - - self._main_layout.addLayout(self._xpansion_config_layout) - - def _init_xpansion_config_widget(self): - - method_layout = QHBoxLayout() - self._sequential_radio_button = QRadioButton('Sequential') - self._sequential_radio_button.setChecked(True) - self._sequential_radio_button.toggled.connect(self._method_changed) - method_layout.addWidget(self._sequential_radio_button) - self._mpibenders_radio_button = QRadioButton('Parallel') - self._mpibenders_radio_button.toggled.connect(self._method_changed) - method_layout.addWidget(self._mpibenders_radio_button) - method_layout.addWidget(QLabel("core number")) - self._nb_core_edit = QSpinBox() - self._nb_core_edit.setMinimum(2) - self._nb_core_edit.setMaximum(128) - cpu_count = psutil.cpu_count(logical=False) - self._nb_core_edit.setValue(cpu_count) - self._nb_core_edit.setEnabled(False) - method_layout.addWidget(self._nb_core_edit) - nb_cpu_label = QLabel( - "available physical cores {nb_cpu}".format( - nb_cpu=cpu_count)) - nb_cpu_label.setTextInteractionFlags(Qt.LinksAccessibleByMouse) - nb_cpu_label.linkActivated.connect(self._use_available_core) - method_layout.addWidget(nb_cpu_label) - method_gb = QGroupBox("Method") - method_gb.setLayout(method_layout) - self._xpansion_config_layout.addWidget(method_gb) - - option_gb = QGroupBox("Options") - option_layout = QVBoxLayout() - self._keep_mps_checkbox = QCheckBox("Keep intermediate files") - self._keep_mps_checkbox.setChecked(False) - option_layout.addWidget(self._keep_mps_checkbox) - option_gb.setLayout(option_layout) - self._xpansion_config_layout.addWidget(option_gb) - - def _init_xpansion_run_widget(self): - self._running_label = QLabel() - self.movie = QMovie(":/images/loading.gif", QByteArray()) - self._running_label.setMovie(self.movie) - self.movie.start() - self._running_label.setVisible(False) - self._xpansion_config_layout.addWidget(self._running_label) - self._run_process = QProcess() - self._run_process.readyReadStandardOutput.connect(self._handle_stdout) - self._run_process.readyReadStandardError.connect(self._handle_stderr) - self._run_process.stateChanged.connect(self._handle_state) - self._run_process.finished.connect(self._cleanup_run_process) - self._run_button = QPushButton('Run') - self._set_run_label() - self._run_button.clicked.connect(self._run_or_stop) - self._xpansion_config_layout.addWidget(self._run_button) - - def _init_antares_study_selection_widget(self): - layout_study_path = QGridLayout() - - layout_study_path.addWidget(QLabel('Antares study path'), 0, 0) - self._study_path_text_edit = QLineEdit( - self._settings.value(LAST_ANTARES_STUDY_DIR)) - layout_study_path.addWidget(self._study_path_text_edit, 0, 1) - select_button = QPushButton('...') - select_button.clicked.connect(self._select_study_path) - layout_study_path.addWidget(select_button, 0, 2) - - self._combo_simulation_name = QComboBox() - self._combo_simulation_name.currentTextChanged.connect( - self._simulation_name_changed) - layout_study_path.addWidget(QLabel('Simulation name'), 1, 0) - layout_study_path.addWidget(self._combo_simulation_name, 1, 1) - self._init_simulation_name_combo( - self._settings.value(LAST_ANTARES_STUDY_DIR)) - - self._main_layout.addLayout(layout_study_path) - - def _init_step_selection_widget(self): - step_layout = QHBoxLayout() - - self._step_buttons = {} - for step in STEPS: - self._step_buttons[step] = QRadioButton(step) - self._step_buttons[step].setEnabled( - step not in STEP_WITH_SIMULATION_NAME) - step_layout.addWidget(self._step_buttons[step]) - - self._step_buttons["full"].setChecked(True) - - self._step_gb = QGroupBox("Steps") - self._step_gb.setLayout(step_layout) - self._xpansion_config_layout.addWidget(self._step_gb) - - def set_study_path(self, study_path: str): - self._settings.setValue(LAST_ANTARES_STUDY_DIR, study_path) - self._study_path_text_edit.setText(study_path) - self._init_simulation_name_combo(study_path) - self._check_run_availability() - - def _init_simulation_name_combo(self, study_path: str): - if study_path: - self._combo_simulation_name.blockSignals(True) - self._combo_simulation_name.clear() - self._combo_simulation_name.addItem(NEW_SIMULATION_NAME) - self._insert_study_simulation_in_combobox(study_path) - self._combo_simulation_name.blockSignals(False) - - def _insert_study_simulation_in_combobox(self, study_path): - output_path = Path(study_path) / 'output' - if output_path.is_dir(): - for directory in sorted(output_path.iterdir(), key=os.path.getmtime, reverse=True): - if (output_path / directory).is_dir(): - self._combo_simulation_name.addItem(directory.name) - - def _select_study_path(self): - self.set_study_path( - QFileDialog.getExistingDirectory(self, 'Select study folder', self._study_path_text_edit.text())) - - def _check_run_availability(self): - study_path = self._study_path_text_edit.text() - run_available = Path(study_path).is_dir() - self._run_button.setEnabled(run_available) - self._step_gb.setEnabled(run_available) - - def _get_method(self): - if self._mpibenders_radio_button.isChecked(): - return "mpibenders" - if self._sequential_radio_button.isChecked(): - return "sequential" - - def _get_step(self): - for step in self._step_buttons: - if self._step_buttons[step].isChecked(): - return step - - def _get_nb_core(self): - return self._nb_core_edit.value() - - def _get_keep_mps(self): - return self._keep_mps_checkbox.isChecked() - - def _handle_stdout(self): - data = self._run_process.readAllStandardOutput() - stdout = bytes(data).decode("utf8") - self._add_text_to_log(stdout) - - def _handle_stderr(self): - data = self._run_process.readAllStandardError() - stderr = bytes(data).decode("utf8") - self._add_text_to_log(stderr) - - def _handle_state(self, state): - if state == QProcess.NotRunning: - self._set_run_label() - if self._get_step() not in STEP_WITH_SIMULATION_NAME: - self._init_simulation_name_combo( - self._study_path_text_edit.text()) - else: - self._set_stop_label() - - def _method_changed(self): - self._nb_core_edit.setEnabled( - self._mpibenders_radio_button.isChecked()) - - def _use_available_core(self): - cpu_count = psutil.cpu_count(logical=False) - self._nb_core_edit.setValue(cpu_count) - - def _set_stop_label(self): - self._run_button.setText("Stop") - self._run_button.setIcon(QIcon(":/images/stop-48.png")) - self._running_label.setVisible(True) - - def _set_run_label(self): - self._run_button.setText("Run") - self._run_button.setIcon(QIcon(":/images/play-48.png")) - self._running_label.setVisible(False) - - def _simulation_name_changed(self, text): - for step in self._step_buttons: - if text == NEW_SIMULATION_NAME: - self._step_buttons[step].setEnabled( - step not in STEP_WITH_SIMULATION_NAME) - else: - self._step_buttons[step].setEnabled( - step in STEP_WITH_SIMULATION_NAME) - - def _add_text_to_log(self, s): - self._log_text_edit.appendPlainText(s.rstrip('\r\n')) - - def _cleanup_run_process(self): - self._run_process.close() - - def _run_or_stop(self): - if self._run_process and self._run_process.isOpen(): - qm = QMessageBox() - ret = qm.question(self, "Stop simulation", - "Do you want to stop current simulation ?") - if ret == qm.Yes: - self._run_process.close() - else: - self._run() - - def _run(self): - self._log_text_edit.clear() - study_path = self._study_path_text_edit.text() - if study_path: - if Path(study_path).is_dir(): - self._run_study(study_path) - else: - self._add_text_to_log("Study path is not a directory") - else: - self._add_text_to_log("No study path defined") - - def _run_study(self, study_path): - commands = [ - "--dataDir", str(study_path), - "--method", self._get_method(), - "--step", self._get_step(), - "-n", str(self._get_nb_core())] - program_in_python_package = None - install_dir_full = None - if self._install_dir is not None and Path(self._install_dir).is_dir(): - install_dir_full = str(Path(self._install_dir).resolve()) - - program_in_python_package = Path(os.path.abspath( - __file__)).parent / self._launcher_name - commands.extend(["--installDir", install_dir_full]) - - program_in_single_package = Path( - sys.executable).parent / self._launcher_name - - if self._get_keep_mps(): - commands.append("--keepMps") - if not self._step_buttons["full"].isChecked(): - commands.append("--simulationName") - commands.append(self._combo_simulation_name.currentText()) - if Path("launch.py").is_file(): - commands.insert(0, "launch.py") - program = str(Path(sys.executable)) - elif program_in_python_package is not None and program_in_python_package.is_dir(): - program = str(program_in_python_package) - else: - program = str(program_in_single_package) - self._run_process.start(program, commands) - self._set_stop_label() - - -app = QApplication([]) - -window = MainWidget() -window.show() -app.exec() From 5c8ad084c77658de2562e3562e97e836fa7bec33 Mon Sep 17 00:00:00 2001 From: Abdoulbari Zakir Date: Wed, 11 Dec 2024 15:15:50 +0100 Subject: [PATCH 2/4] remove ui --- docker/centos7-build | 4 +--- src/CMakeLists.txt | 13 ------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/docker/centos7-build b/docker/centos7-build index 782856c21..788d4d1b5 100644 --- a/docker/centos7-build +++ b/docker/centos7-build @@ -46,8 +46,7 @@ WORKDIR /workspace/antares-xpansion RUN pip3 install --upgrade pip && \ pip3 install wheel && \ - pip3 install -r requirements-tests.txt && \ - pip3 install -r requirements-ui.txt + pip3 install -r requirements-tests.txt && # Accept build arguments for ccache ARG CCACHE_DIR @@ -72,7 +71,6 @@ RUN source /opt/rh/devtoolset-11/enable && \ -DCMAKE_PREFIX_PATH="/deps;/ortools/install" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=_install \ - -DBUILD_UI=ON \ -DALLOW_RUN_AS_ROOT=ON \ -DVCPKG_TARGET_TRIPLET=x64-linux-release \ -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 903eeb892..b19b4e0c7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,15 +15,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/python/config.yaml.in ${CMAKE_CURRENT #use file generator to define xpansion executable name with $ : need to be done with generate instead of configure because values are not available at configure time file(GENERATE OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/python/config.yaml INPUT ${CMAKE_CURRENT_SOURCE_DIR}/python/config.yaml) -if (BUILD_UI) - execute_process(COMMAND pyrcc5 images.qrc - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ - OUTPUT_FILE resources.py) - - #configure file to define install directory - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/python/config-ui.yaml.in ${CMAKE_CURRENT_SOURCE_DIR}/python/config-ui.yaml) -endif() - find_program(PYINSTALLER "pyinstaller") #if pyinstaller available add compiled version of python scripts @@ -35,10 +26,6 @@ if (PYINSTALLER) install(CODE "execute_process(COMMAND ${PYINSTALLER} -F ${CMAKE_CURRENT_SOURCE_DIR}/python/launch.py -n antares-xpansion-launcher --add-data \"${CMAKE_CURRENT_SOURCE_DIR}/python/config.yaml:.\")" ) endif() - if (BUILD_UI) - install(CODE "execute_process(COMMAND ${PYINSTALLER} -F ${CMAKE_CURRENT_SOURCE_DIR}/python/antares-xpansion-ui.py -n antares-xpansion-ui)" ) - endif() - #code is executed in CMAKE_BINARY_DIR install(DIRECTORY ${CMAKE_BINARY_DIR}/dist/ DESTINATION . From 0e98acb5be752637fb2248c09ec3754fbd375de4 Mon Sep 17 00:00:00 2001 From: Abdoulbari Zakir Date: Wed, 11 Dec 2024 15:19:25 +0100 Subject: [PATCH 3/4] remove ui --- docker/centos7-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/centos7-build b/docker/centos7-build index 788d4d1b5..49233b49e 100644 --- a/docker/centos7-build +++ b/docker/centos7-build @@ -46,7 +46,7 @@ WORKDIR /workspace/antares-xpansion RUN pip3 install --upgrade pip && \ pip3 install wheel && \ - pip3 install -r requirements-tests.txt && + pip3 install -r requirements-tests.txt # Accept build arguments for ccache ARG CCACHE_DIR From 8db7bac32427fa3748d9a93a20c1f90faf9f8cf4 Mon Sep 17 00:00:00 2001 From: Thomas Bittar Date: Wed, 11 Dec 2024 16:25:03 +0100 Subject: [PATCH 4/4] Delete unsed files and fix doc nav --- mkdocs.yml | 4 ++-- src/python/config-ui.yaml.in | 1 - src/python/images.qrc | 7 ------- src/python/images/loading.gif | Bin 2608 -> 0 bytes src/python/images/play-48.png | Bin 616 -> 0 bytes src/python/images/stop-48.png | Bin 111 -> 0 bytes 6 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 src/python/config-ui.yaml.in delete mode 100644 src/python/images.qrc delete mode 100644 src/python/images/loading.gif delete mode 100644 src/python/images/play-48.png delete mode 100644 src/python/images/stop-48.png diff --git a/mkdocs.yml b/mkdocs.yml index e6f326749..19c636d79 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -53,8 +53,8 @@ nav: - 'Dependencies install': 'developer-guide/install_from_sources/2-Dependencies-install.md' - 'Build': 'developer-guide/install_from_sources/3-Build.md' - 'Tests': 'developer-guide/install_from_sources/4-Tests.md' - - 'UI creation': 'developer-guide/install_from_sources/5-ui-creation.md' - - 'Installer creation': 'developer-guide/install_from_sources/6-Installer-creation.md' + - 'Installer creation': 'developer-guide/install_from_sources/5-Installer-creation.md' + - 'Xpress': 'developer-guide/install_from_sources/6-Xpress.md' - 'Antares-Xpansion simulation procedure' : - 'Overview' : 'developer-guide/xpansion_steps/0-overview.md' - 'Antares optimization problem retrieval' : 'developer-guide/xpansion_steps/1-antares-solver-problem.md' diff --git a/src/python/config-ui.yaml.in b/src/python/config-ui.yaml.in deleted file mode 100644 index b1b7a6cc6..000000000 --- a/src/python/config-ui.yaml.in +++ /dev/null @@ -1 +0,0 @@ -INSTALL_DIR : ${CURRENT_RUNTIME_OUTPUT_DIRECTORY} diff --git a/src/python/images.qrc b/src/python/images.qrc deleted file mode 100644 index dfefd8bf5..000000000 --- a/src/python/images.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - images/loading.gif - images/play-48.png - images/stop-48.png - - diff --git a/src/python/images/loading.gif b/src/python/images/loading.gif deleted file mode 100644 index 7c12c21fcb05ccbc90eb90202c96fb4578f8066d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2608 zcmdVcdr(tX9tZGCZgP`cV{Tp-NWvpvKt|wv@-B&^pMYg=krz)&_+_N{pyjc|;8*19IJuz|8@Xac3z#I4;0G5`P005Yqn;RP&>+S9B=;&x_YO>jE27{r#zTR%P zTdh{TUf`T5Ma4#l}?>0I+(4~ic~qOyf^o%GJ~@BX!Zg=&&UAm z+}USoRYG)1G8QS14h;$cU7SlBmJhUy06}sZEy`A?|oBLVej0 z{z`KDk;1@TJv%DaZru@bU9(YON(Ti`4DSo!U;&V?$SOb&u1bRU(u)*K1ZDvwH@-l7 zk^x6$7Sq`rl@RhQQIk{hfrbOS@~M(kHJf_?`)brZ5q+td(cY#P4vfnwNl>m$%KJ){OneHJ4@0=g9!DrUy~?1lPl zRal?ki+4uXzL6}p=jbT6S+UU~ z7G>+Qo12-ER3)3M!@N8{Mm+$M=FF!U)Po`*{-*&9(M|^9|hccTp|4A zL~jpoW@1WtZ-RwyyX%1Q_*)JHPq^x+QYL;r!O_SwRHtj-l(YrX5?b}O<_b5T`YGKa z4`#XemQ1B5nTFWnw*~xk?ih8%y}DX3d^&^5lx--mbnc_aFb7MkZH;BA4*MxakR#7C zuDj(L_vJ|EeR_VcNdFt4{clD6yN{ZYjs2)|TtQALs?EvPybk;z!#$&|W^2rD-HY;kGHTWf>dB6Btm4D(K*=2tW zO-GMV81(Y?pWYeyS8r70)$t+jG^%NpP(k76x<#FzrBXs!A8VZXGVT9qWrRr zcUDZb#GhC$`Efo%VP!A%;sLa^{& z5xwRf3cQfX$s_swIkA2BZmBBGGM6Mi>>C)J*7=Yb9lDwp*9AUw)cz*NYB{>*YN|W; zrQp%nbG~h7qjyUy1623LwmQ*@6ZL0KzZZwN!Yj>|vapX>r`RAeI((Vq?bPbPy_a_$ z@!gtP=xqP`u5?iH#LzoQ3tr4m%POD)tM^C2j2(blz;}}`x0^PLu?r*Dp`MUX#bF=Q zk}+xl;B^4lRgezQa@pLECEOORGrzOO~DVbTvNx%H!PE(OYE zjY?R#(DbNHJ2gF{-FC-5p^eWSnI6wJYlo(9>`d$*9n5VUmL#uN1a0mGTB;uCZ?E6n z1%%@@B2q|F3*;BRDT;k1i0KvZB&>bRFX(jB-$sWjSt<74`dEnu+BpZYVu9%E6TX<))p&PW|b8ac{(y`#k2I zW^;qRMQ<{4DV@O5Zn@f(~Oo1Y855N0d_cC79u^?;m6m#v(EB^oIUnHYB zn_;EOijbI>9jAH>W;43lh!;HHUT<-rI^tj0?PAv5zuWU1kQf11bq<4=?K&0B%ZepmiH*k@vOoyn?xr~Hmr^XF(W{+ab(?6~_gAMT90^`#FN z)CSIBEw(bjZ6IpJ&(^|Ofs6~Z0w;ZR637om3IY zGc*ub>^SY?dJX2o(i3m<@VI17_@R9Ez=xiRA32!=rCK8Qtu!= zZJ%YIaJGM14E@oiRY4A_Jy1j8GC_+44 L{an^LB{Ts5vLC~Z diff --git a/src/python/images/stop-48.png b/src/python/images/stop-48.png deleted file mode 100644 index 35e53f248d5bbd793446fdb20f373e2c6497cb72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZA`BpB)|k7xlYrjj7PU