Skip to content

Commit

Permalink
Preparations for Python 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulocracy committed Jun 25, 2024
1 parent 3a57ab9 commit b5e32e2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cnapy/appdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ def compute_color_heat(self, value: Tuple[float, float], low, high):
if high == 0.0:
h = 255
else:
h = mean * 255 / high
h = round(mean * 255 / high)
return QColor.fromRgbF(255-h, 255, 255 - h)
else:
if low == 0.0:
h = 255
else:
h = mean * 255 / low
h = round(mean * 255 / low)
return QColor.fromRgbF(255, 255 - h, 255 - h)

def low_and_high(self) -> Tuple[int, int]:
Expand Down
2 changes: 1 addition & 1 deletion cnapy/gui_elements/annotation_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, parent):
self.delete_anno = QPushButton("-")
self.delete_anno.clicked.connect(self.delete_anno_row)
lh3.addWidget(self.delete_anno)
self.open_annotation = QPushButton("Open (first)\nin browser")
self.open_annotation = QPushButton("Open chosen\nin browser")
self.open_annotation.clicked.connect(self.open_in_browser)
lh3.addWidget(self.open_annotation)
lh2.addItem(lh3)
Expand Down
2 changes: 1 addition & 1 deletion cnapy/gui_elements/central_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def fit_mapview(self):

def show_bottom_of_console(self):
(_, r) = self.splitter2.getRange(1)
self.splitter2.moveSplitter(r*0.5, 1)
self.splitter2.moveSplitter(r//2, 1)

vSB = self.console.children()[2].verticalScrollBar()
max_scroll = vSB.maximum()
Expand Down
2 changes: 1 addition & 1 deletion cnapy/gui_elements/configuration_cplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def run_python_connection_script(self):
self.get_and_set_environmental_variable()

def get_and_set_environmental_variable(self):
base_path = self.cplex_directory.text() + "cplex/python/3.8/"
base_path = self.cplex_directory.text() + "cplex/python/3.10/"

folders_list = [
base_path+folder for folder in os.listdir(base_path) if os.path.isdir(base_path+folder)
Expand Down
2 changes: 1 addition & 1 deletion cnapy/gui_elements/map_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def __init__(self, parent: MapView, r_id: str, name):
self.item.setTextMargins(1, -13, 0, -10) # l t r b
font = self.item.font()
point_size = font.pointSize()
font.setPointSize(point_size+13)
font.setPointSizeF(point_size+13.0)
self.item.setFont(font)
self.item.setAttribute(Qt.WA_TranslucentBackground)

Expand Down
11 changes: 6 additions & 5 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@ dependencies:
- autopep8=2.0
- pydantic=1.10
- matplotlib-base=3.6
- pip=22
- python=3.8
- pip=23
- python=3.10
- qtpy=2.3
- pyqtwebengine=5.15
- appdirs=1.4
- cobra>=0.26.3
- cobra>=0.29
- qtconsole=5.4
- requests=2.28
- psutil=5.9
- efmtool_link=0.0.4
- optlang_enumerator>=0.0.9
- straindesign>=1.9
- straindesign>=1.11
- nest-asyncio
- gurobi
- cplex
- numpy=1.23
- openpyxl
- scipy=1.12 # Starting from 1.13, we get StrainDesign errors :-/
- openpyxl

0 comments on commit b5e32e2

Please sign in to comment.