Compare commits

..

No commits in common. "95d1d231c9aaf0a7a98025169c4eafc1fa8eae36" and "b666162bdf1b64ed7fb741a5ab0a3146d7c7a11f" have entirely different histories.

10 changed files with 11 additions and 85 deletions

View File

@ -38,7 +38,6 @@ variables:
variables:
MAGE_8_VERSION: "permalink/latest"
ADISTS_VERSION: "permalink/latest"
RUBAR_VERSION: "permalink/latest"
dl-mage8-doc:
stage: downloads
@ -112,36 +111,6 @@ dl-adists-windows:
paths:
- adists-windows/adists.exe
dl-rubar-linux:
stage: downloads
tags:
- linux
rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
script:
- curl -L -o rubar.tgz https://forge.inrae.fr/river-hydraulics/rubarbe/-/releases/$RUBAR_VERSION/downloads/packages/rubar_linux.tgz
- mkdir -p rubar-linux
- cd rubar-linux
- tar xvf ../rubar.tgz
artifacts:
paths:
- rubar-linux/rubarbe
dl-rubar-windows:
stage: downloads
tags:
- linux
rules:
- if: $CI_COMMIT_BRANCH == 'ci-test' || $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG
script:
- curl -L -o rubar.tgz https://forge.inrae.fr/river-hydraulics/rubarbe/-/releases/$RUBAR_VERSION/downloads/packages/rubar_windows.tgz
- mkdir -p rubar-windows
- cd rubar-windows
- tar xvf ../rubar.tgz
artifacts:
paths:
- rubar-windows/rubarbe.exe
#############
# CONFIGURE #
#############
@ -304,8 +273,6 @@ build-linux:
needs:
- job: dl-adists-linux
artifacts: true
- job: dl-rubar-linux
artifacts: true
- job: dl-mage8-linux
artifacts: true
- job: dl-mage8-doc
@ -347,9 +314,6 @@ build-linux:
# Copy adists
- mkdir -p pamhyr/adists
- cp -v ../adists-linux/* pamhyr/adists/
# Copy rubar
- mkdir -p pamhyr/rubar
- cp -v ../rubar-linux/* pamhyr/rubar/
# Copy Pamhyr
- cp -r dist/pamhyr/* pamhyr/
# Pamhyr script to force x11
@ -415,8 +379,6 @@ build-windows:
artifacts: true
- job: dl-adists-windows
artifacts: true
- job: dl-rubar-windows
artifacts: true
- job: dl-mage8-doc
artifacts: true
- job: set-version

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -46,10 +46,6 @@ copy /y ..\mage8-windows\mage_extraire.exe pamhyr\mage8\
copy /y ..\mage8-windows\mailleurTT.exe pamhyr\mage8\
copy /y ..\mage8-windows\libbief.dll pamhyr\mage8\
rem rubar
mkdir pamhyr\rubar
copy /y ..\adists-windows\rubarbe.exe pamhyr\rubar\
rem adists
mkdir pamhyr\adists
copy /y ..\adists-windows\adists.exe pamhyr\adists\

View File

@ -192,7 +192,6 @@ class InternalMeshing(AMeshingTool):
sect2.point(start2).name = ''
if tag2 == '': # left end point
sect2.point(start2+1).name = ''
len2 += 1
elif ltot1 < 0.0001:
sect2.add_npoints(len1-len2)
len2 = len1

View File

@ -274,14 +274,15 @@ class FrictionTableModel(PamhyrTableModel):
with open(file_name, encoding="utf-8") as rug_file:
for line in rug_file:
if line.upper().startswith("K"):
if int(line[1:4]) == reach_id:
data.append(line[4:].split())
line = line.split()
if int(line[1]) == reach_id:
data.append(line[1:])
new_data = []
for d in data:
new = None
minor = float(d[2])
medium = float(d[3])
minor = float(d[3])
medium = float(d[4])
for s in self._study.river.stricklers.stricklers:
if s.minor == minor and s.medium == medium:
new = s
@ -291,5 +292,5 @@ class FrictionTableModel(PamhyrTableModel):
self._study.river.stricklers))
new.minor = minor
new.medium = medium
new_data.append([self._data, float(d[0]), float(d[1]), new, new])
new_data.append([self._data, float(d[1]), float(d[2]), new, new])
self.replace_data(new_data)

View File

@ -124,15 +124,8 @@ class EditGeoTIFFWindow(PamhyrWindow):
if self._study.is_read_only():
self.set_check_box_enable("checkBox", False)
self.set_line_edit_enable("lineEdit_name", False)
self.set_line_edit_enable("lineEdit_description", False)
for button in ["import", "bottom", "top", "left", "right"]:
self.find(QPushButton, f"pushButton_{button}")\
.setEnabled(False)
for spin in ["bottom", "top", "left", "right"]:
self.find(QDoubleSpinBox, f"doubleSpinBox_{spin}")\
.setEnabled(False)
self.set_line_edit_enable("lineEdit_path", False)
self.set_plaintext_edit_enable("plainTextEdit", False)
def _set_values_from_bounds(self, bounds):
self._values = {

View File

@ -109,9 +109,6 @@ class GeoTIFFListWindow(PamhyrWindow):
if self._study.is_editable():
self.find(QAction, "action_add").triggered.connect(self.add)
self.find(QAction, "action_delete").triggered.connect(self.delete)
else:
self.find(QAction, "action_add").setEnabled(False)
self.find(QAction, "action_delete").setEnabled(False)
self.find(QAction, "action_edit").triggered.connect(self.edit)

View File

@ -330,27 +330,9 @@ class InitialConditionTableModel(PamhyrTableModel):
if not (line.startswith("#") or
line.startswith("*") or
line.startswith("$")):
line_split = line.split()
formated = False
if len(line_split[0]) > 3:
formated = True
elif len(line_split[2]) > 10:
formated = True
elif len(line_split[3]) > 11:
formated = True
elif len(line_split[4]) > 9:
formated = True
if formated: # old PamHyr format
if int(line[1:4]) == reach_id:
data.append([line[31:40],
line[10:20],
line[20:31]])
else:
if int(line_split[0]) == reach_id:
data.append([line_split[4],
line_split[2],
line_split[3]])
line = line.split()
if int(line[0]) == reach_id:
data.append([line[4], line[2], line[3]])
self._undo.push(
ReplaceDataCommand(

View File

@ -224,8 +224,6 @@ class InitialConditionsWindow(PamhyrWindow):
def _update_plot(self):
self.plot_1.draw()
self.plot_2.draw()
self.plot_1.idle()
self.plot_2.idle()
def _propagated_update(self, key=Modules(0)):
if Modules.GEOMETRY not in key:
@ -322,12 +320,10 @@ class InitialConditionsWindow(PamhyrWindow):
def _import_from_results(self, results):
logger.debug(f"import from results: {results}")
self._table.import_from_results(results)
self._update()
def _import_from_ini_file(self, file_name):
logger.debug(f"import from INI file: {file_name}")
self._table.read_from_ini(file_name)
self._update()
def move_up(self):
row = self.index_selected_row()