Skip to content

Commit

Permalink
Gurobi hotfix (#529)
Browse files Browse the repository at this point in the history
* Gurobi hotfix

* Add star to gurobipy :-)
  • Loading branch information
Paulocracy authored Nov 19, 2024
1 parent 299e08b commit 06e5f32
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ There are 4 alternative ways to install CNApy:

1. The easiest way for any user to install CNApy is by downloading its installer, which is provided for Windows, Linux and MacOS, see [Using CNApy installer](#using-cnapy-installer) for more.
2. If you already have installed Python 3.10 (no other version) on your system, you can install CNApy simply through ```pip install cnapy``` in your console. Afterwards, you can start CNApy's GUI by running either ```cnapy``` or, if this doesn't work, ```python -m cnapy``` where "python" must call your Python 3.10 installation.
3. If you already use conda or mamba (for mamba, just change the "conda" command to "mamba"), you can create a CNApy environment named ```cnapy-1.2.2``` as follows: 1) Run ```conda create --name cnapy-1.2.2 python=3.10 pip openjdk -c conda-forge```, 2) run ```conda activate cnapy-1.2.2```, 3) run ```pip install cnapy```. Then, you can start CNApy in the cnapy-1.2.2 conda environment by running either ```cnapy``` or, if this doesn't work, ```python -m cnapy```. Note that the [cnapy conda package](https://anaconda.org/cnapy/cnapy) is currently *not* being updated due to licensing uncertainties.
3. If you already use conda or mamba (for mamba, just change the "conda" command to "mamba"), you can create a CNApy environment named ```cnapy-1.2.3``` as follows: 1) Run ```conda create --name cnapy-1.2.3 python=3.10 pip openjdk -c conda-forge```, 2) run ```conda activate cnapy-1.2.3```, 3) run ```pip install cnapy```. Then, you can start CNApy in the cnapy-1.2.3 conda environment by running either ```cnapy``` or, if this doesn't work, ```python -m cnapy```. Note that the [cnapy conda package](https://anaconda.org/cnapy/cnapy) is currently *not* being updated due to licensing uncertainties.
4. If you want to develop CNApy, follow the instruction for the cloning and setup of the CNApy repository using git and conda or mamba in section [Setup the CNApy development environment](#setup-the-cnapy-development-environment).

## Documentation and Tutorials
Expand All @@ -56,18 +56,18 @@ This installer lets you create a local installation of CNApy under Windows, Linu

*If you use Windows:*

- Download the Windows installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.2/install_cnapy_here.bat)
- Download the Windows installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.3/install_cnapy_here.bat)
- Put this file into a folder where you want CNApy to be installed.
- Double click on the file and let the CNApy installation run
- Afterwards, you can run CNApy by either double-clicking on the newly created CNApy desktop icon, or by double-clicking "RUN_CNApy.bat" in the newly created cnapy-1.2.2 subfolder.
- Afterwards, you can run CNApy by either double-clicking on the newly created CNApy desktop icon, or by double-clicking "RUN_CNApy.bat" in the newly created cnapy-1.2.3 subfolder.

*If you use Linux or MacOS*:

- Download the Linux & MacOS installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.2/install_cnapy_here.sh).
- Download the Linux & MacOS installer [from here](https://github.com/cnapy-org/CNApy/releases/download/v1.2.3/install_cnapy_here.sh).
- Put this file into a folder where you want CNApy to be installed.
- Make the script executable by opening your console in the folder and run ```chmod u+x ./install_cnapy_here.sh```. Alternatively, if supported on your system, right-click on the file, go the file's settings and mark it as executable.
- Now, either run ```./install_cnapy_here.sh``` in your console or, if supported on your system, double-click on install_cnapy_here.sh.
- Finally, you can run CNApy by calling ```./run_cnapy.sh``` in your console (for this without another path beforehand, your console must point to the folder where run_cnapy.sh is located, e.g. if you are in the folder where install_cnapy_here.sh is located, through ```cd cnapy-1.2.2```). Alternatively, if supported by your system, double-click on "run_cnapy.sh" in the newly created cnapy-1.2.2 subfolder.
- Finally, you can run CNApy by calling ```./run_cnapy.sh``` in your console (for this without another path beforehand, your console must point to the folder where run_cnapy.sh is located, e.g. if you are in the folder where install_cnapy_here.sh is located, through ```cd cnapy-1.2.3```). Alternatively, if supported by your system, double-click on "run_cnapy.sh" in the newly created cnapy-1.2.3 subfolder.

Technical side note: CNApy's installer is utilizing [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html).

Expand Down
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.2"
self.version = "cnapy-1.2.3"
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.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ Everyone is welcome to contribute to CNApy's development. [See our contribution
3. Create a conda environment with all dependencies

```sh
conda create -n cnapy-1.2.2 -c conda-forge -c cnapy cnapy=1.2.2
conda create -n cnapy-1.2.3 -c conda-forge -c cnapy cnapy=1.2.3
```

4. Activate the cnapy conda environment

```sh
conda activate cnapy-1.2.2
conda activate cnapy-1.2.3
```

5. Run CNApy within you activated conda environment
Expand Down
10 changes: 5 additions & 5 deletions installers/install_cnapy_here.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set "psFile=install_cnapy.ps1"
:: Write the PowerShell script to a file
echo # Adapted from https://raw.githubusercontent.com/mamba-org/micromamba-releases/main/install.ps1 > "%psFile%"
echo. >> "%psFile%"
echo $CNAPY_VERSION = "1.2.2" ^# Replace with the actual version if needed >> "%psFile%"
echo $CNAPY_VERSION = "1.2.3" ^# Replace with the actual version if needed >> "%psFile%"
echo $RELEASE_URL="https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-win-64" >> "%psFile%"
echo. >> "%psFile%"
echo Write-Output "Downloading micromamba from $RELEASE_URL" >> "%psFile%"
Expand All @@ -26,7 +26,7 @@ echo Move-Item -Force micromamba.exe $MAMBA_INSTALL_PATH ^| out-null >> "%psFile
echo. >> "%psFile%"
echo ^# Use ^& to execute the micromamba commands stored in the variable >> "%psFile%"
echo ^& $MAMBA_INSTALL_PATH create -y -p "./cnapy-$CNAPY_VERSION/cnapy-environment" python=3.10 pip openjdk -r "./cnapy-$CNAPY_VERSION/" -c conda-forge >> "%psFile%"
echo Copy-Item -Path "cnapy-1.2.2/condabin/mamba.bat" -Destination "cnapy-1.2.2/condabin/micromamba.bat" >> "%psFile%"
echo Copy-Item -Path "cnapy-1.2.3/condabin/mamba.bat" -Destination "cnapy-1.2.3/condabin/micromamba.bat" >> "%psFile%"
echo ^& $MAMBA_INSTALL_PATH run -p "./cnapy-$CNAPY_VERSION/cnapy-environment" -r "./cnapy-$CNAPY_VERSION/" pip install --no-cache-dir uv >> "%psFile%"
echo ^& $MAMBA_INSTALL_PATH run -p "./cnapy-$CNAPY_VERSION/cnapy-environment" -r "./cnapy-$CNAPY_VERSION/" uv --no-cache pip install --no-cache-dir cnapy >> "%psFile%"
echo. >> "%psFile%"
Expand Down Expand Up @@ -68,9 +68,9 @@ if exist "%psFile%" (

:: Congratulate the user
echo Congratulations! CNApy was successfully installed!
echo To run CNApy, double-click on the newly created CNApy-1.2.2 desktop icon or,
echo alternatively, double-click on the RUN_CNApy.bat file in the newly created cnapy-1.2.2 subfolder.
echo To deinstall CNApy later, simply delete the newly created cnapy-1.2.2 subfolder.
echo To run CNApy, double-click on the newly created CNApy-1.2.3 desktop icon or,
echo alternatively, double-click on the RUN_CNApy.bat file in the newly created cnapy-1.2.3 subfolder.
echo To deinstall CNApy later, simply delete the newly created cnapy-1.2.3 subfolder.
pause
) else (
echo PowerShell script file not found: %psFile%
Expand Down
2 changes: 1 addition & 1 deletion installers/install_cnapy_here.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -eu

# CNApy version
CNAPY_VERSION="1.2.2"
CNAPY_VERSION="1.2.3"

# Folders
BIN_FOLDER="${BIN_FOLDER:-./cnapy-${CNAPY_VERSION}}"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cnapy"
version = "1.2.2"
version = "1.2.3"
authors = [
{ name="Sven Thiele" },
{ name="Axel von Kamp" },
Expand All @@ -18,7 +18,7 @@ classifiers = [
dependencies = ["appdirs>=1.4", "matplotlib>=3.6", "requests>=2.28",
"cobra>=0.29", "efmtool_link>=0.0.8", "optlang_enumerator>=0.0.12", "straindesign>=1.12",
"qtpy>=2.3", "pyqtwebengine>=5.15", "qtconsole==5.4",
"gurobipy>=11.0", "cplex>=22.1", "numpy==1.23", "scipy==1.12", "openpyxl"]
"gurobipy==11.*", "cplex>=22.1", "numpy==1.23", "scipy==1.12", "openpyxl"]

[project.scripts]
cnapy = "cnapy.__main__:main_cnapy"
Expand Down

0 comments on commit 06e5f32

Please sign in to comment.