Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 122 #526

Merged
merged 28 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
486d68e
Preparations for version 1.2.2
Paulocracy Sep 25, 2024
11a6188
Add installer scripts
Paulocracy Sep 25, 2024
91ade93
Refurbishments & Add conda instructions
Paulocracy Sep 26, 2024
1b38e72
Update CI test and add Python version file
Paulocracy Sep 26, 2024
ef029cb
Add workflow_dispatch
Paulocracy Sep 26, 2024
4182005
Remove push
Paulocracy Sep 26, 2024
c7a4420
workflow_dispatch not needed
axelvonkamp Sep 26, 2024
bc28581
Use cplex==22.1.0
axelvonkamp Sep 26, 2024
657dde4
Try cplex==22.1.1.2
axelvonkamp Sep 26, 2024
7f4088c
Try Python 3.10.14
axelvonkamp Sep 26, 2024
16969e6
install cplex before cnapy
axelvonkamp Sep 26, 2024
3980e55
Pre-install jpype1
axelvonkamp Sep 26, 2024
b8640ea
Pre-install install-jdk>=1.1
axelvonkamp Sep 26, 2024
047d8e8
Pre-install pytest>=7.2
axelvonkamp Sep 26, 2024
68b670b
Pre-install pyqt5
axelvonkamp Sep 26, 2024
7fe05d6
use efmtool_link 0.0.8
axelvonkamp Sep 26, 2024
56f8c99
still need jpype1 install-jdk>=1.1
axelvonkamp Sep 26, 2024
f89efc2
try pip install
axelvonkamp Sep 26, 2024
2e009d1
cleanup (?)
axelvonkamp Sep 26, 2024
a331b2d
remove obsolete packaging instructions
axelvonkamp Sep 27, 2024
b31b51b
Add openjdk; Enforce conda-forge; Fix run script
Paulocracy Sep 27, 2024
463525d
Fix extreme amount of bugs in install scripts
Paulocracy Sep 27, 2024
2b0ba02
Set installers to 1.2.2 & Refurbish README
Paulocracy Sep 27, 2024
8d8383f
Info about conda package
axelvonkamp Sep 30, 2024
107ae1e
README corrections and refurbishments
Paulocracy Oct 1, 2024
fa6ab9e
Fix Linux/MacOS installer
Paulocracy Oct 1, 2024
cb94378
Fix Linux/MacOS installer again
Paulocracy Oct 2, 2024
e6ea744
Update CPLEX & Gurobi configuration dialogs
Paulocracy Oct 2, 2024
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
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
Loading