mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
No commits in common. "95d1d231c9aaf0a7a98025169c4eafc1fa8eae36" and "b666162bdf1b64ed7fb741a5ab0a3146d7c7a11f" have entirely different histories.
95d1d231c9
...
b666162bdf
|
|
@ -38,7 +38,6 @@ variables:
|
||||||
variables:
|
variables:
|
||||||
MAGE_8_VERSION: "permalink/latest"
|
MAGE_8_VERSION: "permalink/latest"
|
||||||
ADISTS_VERSION: "permalink/latest"
|
ADISTS_VERSION: "permalink/latest"
|
||||||
RUBAR_VERSION: "permalink/latest"
|
|
||||||
|
|
||||||
dl-mage8-doc:
|
dl-mage8-doc:
|
||||||
stage: downloads
|
stage: downloads
|
||||||
|
|
@ -112,36 +111,6 @@ dl-adists-windows:
|
||||||
paths:
|
paths:
|
||||||
- adists-windows/adists.exe
|
- 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 #
|
# CONFIGURE #
|
||||||
#############
|
#############
|
||||||
|
|
@ -304,8 +273,6 @@ build-linux:
|
||||||
needs:
|
needs:
|
||||||
- job: dl-adists-linux
|
- job: dl-adists-linux
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: dl-rubar-linux
|
|
||||||
artifacts: true
|
|
||||||
- job: dl-mage8-linux
|
- job: dl-mage8-linux
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: dl-mage8-doc
|
- job: dl-mage8-doc
|
||||||
|
|
@ -347,9 +314,6 @@ build-linux:
|
||||||
# Copy adists
|
# Copy adists
|
||||||
- mkdir -p pamhyr/adists
|
- mkdir -p pamhyr/adists
|
||||||
- cp -v ../adists-linux/* pamhyr/adists/
|
- cp -v ../adists-linux/* pamhyr/adists/
|
||||||
# Copy rubar
|
|
||||||
- mkdir -p pamhyr/rubar
|
|
||||||
- cp -v ../rubar-linux/* pamhyr/rubar/
|
|
||||||
# Copy Pamhyr
|
# Copy Pamhyr
|
||||||
- cp -r dist/pamhyr/* pamhyr/
|
- cp -r dist/pamhyr/* pamhyr/
|
||||||
# Pamhyr script to force x11
|
# Pamhyr script to force x11
|
||||||
|
|
@ -415,8 +379,6 @@ build-windows:
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: dl-adists-windows
|
- job: dl-adists-windows
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: dl-rubar-windows
|
|
||||||
artifacts: true
|
|
||||||
- job: dl-mage8-doc
|
- job: dl-mage8-doc
|
||||||
artifacts: true
|
artifacts: true
|
||||||
- job: set-version
|
- job: set-version
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB |
|
|
@ -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\mailleurTT.exe pamhyr\mage8\
|
||||||
copy /y ..\mage8-windows\libbief.dll 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
|
rem adists
|
||||||
mkdir pamhyr\adists
|
mkdir pamhyr\adists
|
||||||
copy /y ..\adists-windows\adists.exe pamhyr\adists\
|
copy /y ..\adists-windows\adists.exe pamhyr\adists\
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,6 @@ class InternalMeshing(AMeshingTool):
|
||||||
sect2.point(start2).name = ''
|
sect2.point(start2).name = ''
|
||||||
if tag2 == '': # left end point
|
if tag2 == '': # left end point
|
||||||
sect2.point(start2+1).name = ''
|
sect2.point(start2+1).name = ''
|
||||||
len2 += 1
|
|
||||||
elif ltot1 < 0.0001:
|
elif ltot1 < 0.0001:
|
||||||
sect2.add_npoints(len1-len2)
|
sect2.add_npoints(len1-len2)
|
||||||
len2 = len1
|
len2 = len1
|
||||||
|
|
|
||||||
|
|
@ -274,14 +274,15 @@ class FrictionTableModel(PamhyrTableModel):
|
||||||
with open(file_name, encoding="utf-8") as rug_file:
|
with open(file_name, encoding="utf-8") as rug_file:
|
||||||
for line in rug_file:
|
for line in rug_file:
|
||||||
if line.upper().startswith("K"):
|
if line.upper().startswith("K"):
|
||||||
if int(line[1:4]) == reach_id:
|
line = line.split()
|
||||||
data.append(line[4:].split())
|
if int(line[1]) == reach_id:
|
||||||
|
data.append(line[1:])
|
||||||
|
|
||||||
new_data = []
|
new_data = []
|
||||||
for d in data:
|
for d in data:
|
||||||
new = None
|
new = None
|
||||||
minor = float(d[2])
|
minor = float(d[3])
|
||||||
medium = float(d[3])
|
medium = float(d[4])
|
||||||
for s in self._study.river.stricklers.stricklers:
|
for s in self._study.river.stricklers.stricklers:
|
||||||
if s.minor == minor and s.medium == medium:
|
if s.minor == minor and s.medium == medium:
|
||||||
new = s
|
new = s
|
||||||
|
|
@ -291,5 +292,5 @@ class FrictionTableModel(PamhyrTableModel):
|
||||||
self._study.river.stricklers))
|
self._study.river.stricklers))
|
||||||
new.minor = minor
|
new.minor = minor
|
||||||
new.medium = medium
|
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)
|
self.replace_data(new_data)
|
||||||
|
|
|
||||||
|
|
@ -124,15 +124,8 @@ class EditGeoTIFFWindow(PamhyrWindow):
|
||||||
if self._study.is_read_only():
|
if self._study.is_read_only():
|
||||||
self.set_check_box_enable("checkBox", False)
|
self.set_check_box_enable("checkBox", False)
|
||||||
self.set_line_edit_enable("lineEdit_name", False)
|
self.set_line_edit_enable("lineEdit_name", False)
|
||||||
self.set_line_edit_enable("lineEdit_description", False)
|
self.set_line_edit_enable("lineEdit_path", False)
|
||||||
|
self.set_plaintext_edit_enable("plainTextEdit", 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)
|
|
||||||
|
|
||||||
def _set_values_from_bounds(self, bounds):
|
def _set_values_from_bounds(self, bounds):
|
||||||
self._values = {
|
self._values = {
|
||||||
|
|
|
||||||
|
|
@ -109,9 +109,6 @@ class GeoTIFFListWindow(PamhyrWindow):
|
||||||
if self._study.is_editable():
|
if self._study.is_editable():
|
||||||
self.find(QAction, "action_add").triggered.connect(self.add)
|
self.find(QAction, "action_add").triggered.connect(self.add)
|
||||||
self.find(QAction, "action_delete").triggered.connect(self.delete)
|
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)
|
self.find(QAction, "action_edit").triggered.connect(self.edit)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -330,27 +330,9 @@ class InitialConditionTableModel(PamhyrTableModel):
|
||||||
if not (line.startswith("#") or
|
if not (line.startswith("#") or
|
||||||
line.startswith("*") or
|
line.startswith("*") or
|
||||||
line.startswith("$")):
|
line.startswith("$")):
|
||||||
line_split = line.split()
|
line = line.split()
|
||||||
formated = False
|
if int(line[0]) == reach_id:
|
||||||
if len(line_split[0]) > 3:
|
data.append([line[4], line[2], line[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]])
|
|
||||||
|
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
ReplaceDataCommand(
|
ReplaceDataCommand(
|
||||||
|
|
|
||||||
|
|
@ -224,8 +224,6 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||||
def _update_plot(self):
|
def _update_plot(self):
|
||||||
self.plot_1.draw()
|
self.plot_1.draw()
|
||||||
self.plot_2.draw()
|
self.plot_2.draw()
|
||||||
self.plot_1.idle()
|
|
||||||
self.plot_2.idle()
|
|
||||||
|
|
||||||
def _propagated_update(self, key=Modules(0)):
|
def _propagated_update(self, key=Modules(0)):
|
||||||
if Modules.GEOMETRY not in key:
|
if Modules.GEOMETRY not in key:
|
||||||
|
|
@ -322,12 +320,10 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||||
def _import_from_results(self, results):
|
def _import_from_results(self, results):
|
||||||
logger.debug(f"import from results: {results}")
|
logger.debug(f"import from results: {results}")
|
||||||
self._table.import_from_results(results)
|
self._table.import_from_results(results)
|
||||||
self._update()
|
|
||||||
|
|
||||||
def _import_from_ini_file(self, file_name):
|
def _import_from_ini_file(self, file_name):
|
||||||
logger.debug(f"import from INI file: {file_name}")
|
logger.debug(f"import from INI file: {file_name}")
|
||||||
self._table.read_from_ini(file_name)
|
self._table.read_from_ini(file_name)
|
||||||
self._update()
|
|
||||||
|
|
||||||
def move_up(self):
|
def move_up(self):
|
||||||
row = self.index_selected_row()
|
row = self.index_selected_row()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue