Skip to content

Commit 299e08b

Browse files
Version 122 (#526)
* 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 <47664585+axelvonkamp@users.noreply.github.com> Co-authored-by: axelvonkamp <axelk1@gmx.de>
1 parent a081c0f commit 299e08b

31 files changed

Lines changed: 278 additions & 986 deletions

.github/workflows/ci-test.yml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,61 @@
11
name: CI Test
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
66
build-linux:
77
runs-on: "ubuntu-latest"
88
steps:
99
- uses: actions/checkout@v4
10-
- uses: conda-incubator/setup-miniconda@v3
10+
- name: Set up Python
11+
uses: actions/setup-python@v4
1112
with:
12-
auto-update-conda: true
13-
python-version: ${{ matrix.python-version }}
14-
environment-file: environment.yml
15-
miniforge-version: latest
16-
activate-environment: cnapy
13+
python-version: '3.10'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install pytest>=7.2
18+
- name: Install CNApy
19+
run: |
20+
pip install .
1721
- name: Test CNApy
1822
run: |
19-
conda init bash
20-
source ~/.bashrc
21-
conda activate cnapy
22-
python setup.py install
2323
pytest -v ./cnapy/tests/test.py
2424
2525
build-windows:
2626
runs-on: "windows-latest"
2727
steps:
2828
- uses: actions/checkout@v4
29-
- uses: conda-incubator/setup-miniconda@v3
29+
- name: Set up Python
30+
uses: actions/setup-python@v4
3031
with:
31-
auto-update-conda: true
32-
python-version: ${{ matrix.python-version }}
33-
environment-file: environment.yml
34-
miniforge-version: latest
35-
activate-environment: cnapy
32+
python-version: '3.10'
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install pytest>=7.2
37+
- name: Install CNApy
38+
run: |
39+
pip install .
40+
- name: Test CNApy
41+
run: |
42+
pytest -v ./cnapy/tests/test.py
43+
44+
build-macos:
45+
runs-on: "macos-latest"
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python
49+
uses: actions/setup-python@v4
50+
with:
51+
python-version: '3.10'
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install --upgrade pip
55+
pip install pytest>=7.2
56+
- name: Install CNApy
57+
run: |
58+
pip install .
3659
- name: Test CNApy
3760
run: |
38-
python setup.py install
3961
pytest -v ./cnapy/tests/test.py

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ target/
7575
# Jupyter Notebook
7676
.ipynb_checkpoints
7777

78-
# pyenv
79-
.python-version
80-
8178
# celery beat schedule file
8279
celerybeat-schedule
8380

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

Packaging.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

README.md

Lines changed: 56 additions & 132 deletions
Large diffs are not rendered by default.

cnapy/appdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AppData(QObject):
3131

3232
def __init__(self):
3333
QObject.__init__(self)
34-
self.version = "cnapy-1.2.1"
34+
self.version = "cnapy-1.2.2"
3535
self.format_version = 2
3636
self.unsaved = False
3737
self.project = ProjectData()

cnapy/data/blank.svg

Lines changed: 1 addition & 1 deletion
Loading

cnapy/gui_elements/configuration_cplex.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,19 @@ def __init__(self, appdata: AppData):
2424
"By default, right after CNApy's installation, you have only access to the IBM CPLEX Community Edition\n"
2525
"which can only handle up to 1000 variables simultaneously.\n"
2626
"In order to use the full version of IBM CPLEX, with no variable number limit, follow the next steps in the given order:\n"
27-
"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"
27+
"1. (only necessary if you encounter problems with the following steps despite the installation tips in step 3)\n"
2828
"Restart CNApy with administrator privileges as follows:\n"
2929
" i) Close this session of CNApy\n"
3030
" ii) Find out your operating system by looking at the next line:\n"
3131
f" {platform.system()}\n"
32-
" iii) Depending on your operating system, do the following:\n"
33-
" >Only if you use Windows: If you used CNApy's exe installer: Right click on cnapy.exe or the CNApy desktop icon\n"
32+
" iii) Depending on your operating system:\n"
33+
" >Only if you use Windows: If you used CNApy's bat installer: Right click on RUN_CNApy.bat or the CNApy desktop icon\n"
3434
" or the CNApy entry in the start menu's program list and select 'Run as adminstrator'.\n"
35-
" If you didn't use CNApy's .exe installer: Search for 'cmd.exe', right-click on its symbol and\n"
36-
" select 'Run as administrator'. Then, move to CNApy's folder with the cd command, activate CNApy's\n"
37-
" Anaconda environment with 'conda activate cnapy-dev' and run 'python cnapy.py'.\n"
38-
" >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"
39-
" open your system's terminal, move to CNApy's folder with the cd command, activate CNApy's Anaconda\n"
40-
" environment with 'conda activate cnapy-dev' and run 'sudo python cnapy.py'. For the last part, you may need to enter an adminstrator\n"
41-
" password.\n"
35+
" If you didn't use CNApy's .bat installer but Python or conda/mamba, start your Windows console or Powershell with administrator rights\n"
36+
" and startup CNApy."
37+
" >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"
38+
" 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"
39+
" but Python or conda/mamba, run your usual CNApy command with 'sudo' in front of it.\n"
4240
" 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"
4341
"2. (if not already done) Obtain an IBM CPLEX license and download IBM CPLEX itself onto your computer.\n"
4442
" NOTE: CNApy only works with recent IBM CPLEX versions (not older than version 20.1.0)!\n"
@@ -51,7 +49,7 @@ def __init__(self, appdata: AppData):
5149

5250
self.cplex_directory = QPushButton()
5351
self.cplex_directory.setText(
54-
"NOT SET YET! PLEASE SET THE PATH TO IBM CPLEX (see steps 1 to 3 above)."
52+
"NOT SET YET! PLEASE SET THE PATH TO THE IBM CPLEX MAIN FOLDER (see steps 1 to 3 above)."
5553
)
5654
self.layout.addWidget(self.cplex_directory)
5755

@@ -80,7 +78,7 @@ def __init__(self, appdata: AppData):
8078
"Select 'edit environmental variables for this account' (or similar) and, in the newly opened window, click the 'New' button. Write 'PYTHONPATH' as the\n"
8179
"variable's name and write, as a value, the path given above in this step 5. Then, click 'OK' and again 'OK'.\n"
8280
"> 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"
83-
"given under this step 5 above."
81+
"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."
8482
)
8583
self.layout.addWidget(label)
8684

cnapy/gui_elements/configuration_gurobi.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,14 @@ def __init__(self, appdata: AppData):
2929
" i) Close this session of CNApy\n"
3030
" ii) Find out your operating system by looking at the next line:\n"
3131
f" {platform.system()}\n"
32-
" iii) Depending on your operating system, do the following:\n"
33-
" >Only if you use Windows: If you used CNApy's exe installer: Right click on cnapy.exe or the CNApy desktop icon\n"
32+
" iii) Depending on your operating system:\n"
33+
" >Only if you use Windows: If you used CNApy's bat installer: Right click on RUN_CNApy.bat or the CNApy desktop icon\n"
3434
" or the CNApy entry in the start menu's program list and select 'Run as adminstrator'.\n"
35-
" If you didn't use CNApy's .exe installer: Search for 'cmd.exe', right-click on its symbol and\n"
36-
" select 'Run as administrator'. Then, move to CNApy's folder with the cd command, activate CNApy's\n"
37-
" Anaconda environment with 'conda activate cnapy-dev' and run 'python cnapy.py'.\n"
38-
" >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"
39-
" open your system's terminal, move to CNApy's folder with the cd command, activate CNApy's Anaconda\n"
40-
" environment with 'conda activate cnapy-dev' and run 'sudo python cnapy.py'. For the last part, you may need to enter an adminstrator\n"
41-
" password.\n"
35+
" If you didn't use CNApy's .bat installer but Python or conda/mamba, start your Windows console or Powershell with administrator rights\n"
36+
" and startup CNApy."
37+
" >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"
38+
" 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"
39+
" but Python or conda/mamba, run your usual CNApy command with 'sudo' in front of it.\n"
4240
" 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"
4341
"2. (if not already done) Obtain an Gurobi license and download Gurobi itself onto your computer.\n"
4442
" NOTE: CNApy only works with recent Gurobi versions (not older than version 20.1.0)!\n"
@@ -51,7 +49,7 @@ def __init__(self, appdata: AppData):
5149

5250
self.gurobi_directory = QPushButton()
5351
self.gurobi_directory.setText(
54-
"NOT SET YET! PLEASE SET THE PATH TO GUROBI (see steps 1 to 3 above)."
52+
"NOT SET YET! PLEASE SET THE PATH TO THE GUROBI MAIN FOLDER (see steps 1 to 3 above)."
5553
)
5654
self.layout.addWidget(self.gurobi_directory)
5755

0 commit comments

Comments
 (0)