Skip to content

Commit

Permalink
Version 122 (#526)
Browse files Browse the repository at this point in the history
* Preparations for version 1.2.2

* Add installer scripts

* Refurbishments & Add conda instructions

* Update CI test and add Python version file

* Add workflow_dispatch

* Remove push

* workflow_dispatch not needed

* Use cplex==22.1.0

* Try cplex==22.1.1.2

* Try Python 3.10.14

* install cplex before cnapy

* Pre-install jpype1

* Pre-install install-jdk>=1.1

* Pre-install pytest>=7.2

* Pre-install  pyqt5

* use efmtool_link 0.0.8

* still need jpype1 install-jdk>=1.1

* try pip install

* cleanup (?)

* remove obsolete packaging instructions

* Add openjdk; Enforce conda-forge; Fix run script

* Fix extreme amount of bugs in install scripts

* Set installers to 1.2.2 & Refurbish README

* Info about conda package

* README corrections and refurbishments

* Fix Linux/MacOS installer

* Fix Linux/MacOS installer again

* Update CPLEX & Gurobi configuration dialogs

---------

Co-authored-by: axelvonkamp <[email protected]>
Co-authored-by: axelvonkamp <[email protected]>
  • Loading branch information
3 people authored Oct 8, 2024
1 parent a081c0f commit 299e08b
Show file tree
Hide file tree
Showing 31 changed files with 278 additions and 986 deletions.
58 changes: 40 additions & 18 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,61 @@
name: CI Test

on: [push, pull_request]
on: [pull_request]

jobs:
build-linux:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
miniforge-version: latest
activate-environment: cnapy
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest>=7.2
- name: Install CNApy
run: |
pip install .
- name: Test CNApy
run: |
conda init bash
source ~/.bashrc
conda activate cnapy
python setup.py install
pytest -v ./cnapy/tests/test.py
build-windows:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
miniforge-version: latest
activate-environment: cnapy
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest>=7.2
- name: Install CNApy
run: |
pip install .
- name: Test CNApy
run: |
pytest -v ./cnapy/tests/test.py
build-macos:
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest>=7.2
- name: Install CNApy
run: |
pip install .
- name: Test CNApy
run: |
python setup.py install
pytest -v ./cnapy/tests/test.py
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ target/
# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
43 changes: 0 additions & 43 deletions Packaging.md

This file was deleted.

188 changes: 56 additions & 132 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cnapy/appdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AppData(QObject):

def __init__(self):
QObject.__init__(self)
self.version = "cnapy-1.2.1"
self.version = "cnapy-1.2.2"
self.format_version = 2
self.unsaved = False
self.project = ProjectData()
Expand Down
2 changes: 1 addition & 1 deletion cnapy/data/blank.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 10 additions & 12 deletions cnapy/gui_elements/configuration_cplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ def __init__(self, appdata: AppData):
"By default, right after CNApy's installation, you have only access to the IBM CPLEX Community Edition\n"
"which can only handle up to 1000 variables simultaneously.\n"
"In order to use the full version of IBM CPLEX, with no variable number limit, follow the next steps in the given order:\n"
"1. (only if not already done and only necessary if you encounter problems with the following steps despite the installation tips in step 3)\n"
"1. (only necessary if you encounter problems with the following steps despite the installation tips in step 3)\n"
"Restart CNApy with administrator privileges as follows:\n"
" i) Close this session of CNApy\n"
" ii) Find out your operating system by looking at the next line:\n"
f" {platform.system()}\n"
" iii) Depending on your operating system, do the following:\n"
" >Only if you use Windows: If you used CNApy's exe installer: Right click on cnapy.exe or the CNApy desktop icon\n"
" iii) Depending on your operating system:\n"
" >Only if you use Windows: If you used CNApy's bat installer: Right click on RUN_CNApy.bat or the CNApy desktop icon\n"
" or the CNApy entry in the start menu's program list and select 'Run as adminstrator'.\n"
" If you didn't use CNApy's .exe installer: Search for 'cmd.exe', right-click on its symbol and\n"
" select 'Run as administrator'. Then, move to CNApy's folder with the cd command, activate CNApy's\n"
" Anaconda environment with 'conda activate cnapy-dev' and run 'python cnapy.py'.\n"
" >Only if you use Linux or MacOS (MacOS is also called Darwin): The most common way is by using the 'sudo' command. To do this, \n"
" open your system's terminal, move to CNApy's folder with the cd command, activate CNApy's Anaconda\n"
" environment with 'conda activate cnapy-dev' and run 'sudo python cnapy.py'. For the last part, you may need to enter an adminstrator\n"
" password.\n"
" If you didn't use CNApy's .bat installer but Python or conda/mamba, start your Windows console or Powershell with administrator rights\n"
" and startup CNApy."
" >Only if you use Linux or MacOS (MacOS may be called Darwin): The most common way is by using the 'sudo' command. If you used the\n"
" CNApy sh installer, you can start CNApy with administrator rights through 'sudo run_cnapy.sh'. If you didn't use CNApy's .bat installer\n"
" but Python or conda/mamba, run your usual CNApy command with 'sudo' in front of it.\n"
" NOTE: It may be possible that you're not allowed to get administrator rights on your computer. If this is the case, contact your system's administrator to resolve the problem.\n"
"2. (if not already done) Obtain an IBM CPLEX license and download IBM CPLEX itself onto your computer.\n"
" NOTE: CNApy only works with recent IBM CPLEX versions (not older than version 20.1.0)!\n"
Expand All @@ -51,7 +49,7 @@ def __init__(self, appdata: AppData):

self.cplex_directory = QPushButton()
self.cplex_directory.setText(
"NOT SET YET! PLEASE SET THE PATH TO IBM CPLEX (see steps 1 to 3 above)."
"NOT SET YET! PLEASE SET THE PATH TO THE IBM CPLEX MAIN FOLDER (see steps 1 to 3 above)."
)
self.layout.addWidget(self.cplex_directory)

Expand Down Expand Up @@ -80,7 +78,7 @@ def __init__(self, appdata: AppData):
"Select 'edit environmental variables for this account' (or similar) and, in the newly opened window, click the 'New' button. Write 'PYTHONPATH' as the\n"
"variable's name and write, as a value, the path given above in this step 5. Then, click 'OK' and again 'OK'.\n"
"> Only if you use Linux or MacOS (MacOS is also called Darwin): In your console, run 'export PYTHONPATH=PATH' (without the quotation marks) where PATH has to be the path\n"
"given under this step 5 above."
"given under this step 5 above. Alternatively, if this doesn't work, set the PYTHONPATH variable in the run_cnapy.sh in the quoted line and un-quote it."
)
self.layout.addWidget(label)

Expand Down
18 changes: 8 additions & 10 deletions cnapy/gui_elements/configuration_gurobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,14 @@ def __init__(self, appdata: AppData):
" i) Close this session of CNApy\n"
" ii) Find out your operating system by looking at the next line:\n"
f" {platform.system()}\n"
" iii) Depending on your operating system, do the following:\n"
" >Only if you use Windows: If you used CNApy's exe installer: Right click on cnapy.exe or the CNApy desktop icon\n"
" iii) Depending on your operating system:\n"
" >Only if you use Windows: If you used CNApy's bat installer: Right click on RUN_CNApy.bat or the CNApy desktop icon\n"
" or the CNApy entry in the start menu's program list and select 'Run as adminstrator'.\n"
" If you didn't use CNApy's .exe installer: Search for 'cmd.exe', right-click on its symbol and\n"
" select 'Run as administrator'. Then, move to CNApy's folder with the cd command, activate CNApy's\n"
" Anaconda environment with 'conda activate cnapy-dev' and run 'python cnapy.py'.\n"
" >Only if you use Linux or MacOS (MacOS is also called Darwin): The most common way is by using the 'sudo' command. To do this, \n"
" open your system's terminal, move to CNApy's folder with the cd command, activate CNApy's Anaconda\n"
" environment with 'conda activate cnapy-dev' and run 'sudo python cnapy.py'. For the last part, you may need to enter an adminstrator\n"
" password.\n"
" If you didn't use CNApy's .bat installer but Python or conda/mamba, start your Windows console or Powershell with administrator rights\n"
" and startup CNApy."
" >Only if you use Linux or MacOS (MacOS may be called Darwin): The most common way is by using the 'sudo' command. If you used the\n"
" CNApy sh installer, you can start CNApy with administrator rights through 'sudo run_cnapy.sh'. If you didn't use CNApy's .bat installer\n"
" but Python or conda/mamba, run your usual CNApy command with 'sudo' in front of it.\n"
" NOTE: It may be possible that you're not allowed to get administrator rights on your computer. If this is the case, contact your system's administrator to resolve the problem.\n"
"2. (if not already done) Obtain an Gurobi license and download Gurobi itself onto your computer.\n"
" NOTE: CNApy only works with recent Gurobi versions (not older than version 20.1.0)!\n"
Expand All @@ -51,7 +49,7 @@ def __init__(self, appdata: AppData):

self.gurobi_directory = QPushButton()
self.gurobi_directory.setText(
"NOT SET YET! PLEASE SET THE PATH TO GUROBI (see steps 1 to 3 above)."
"NOT SET YET! PLEASE SET THE PATH TO THE GUROBI MAIN FOLDER (see steps 1 to 3 above)."
)
self.layout.addWidget(self.gurobi_directory)

Expand Down
Loading

0 comments on commit 299e08b

Please sign in to comment.