mirror of https://gitlab.com/pamhyr/pamhyr2
Compare commits
14 Commits
b666162bdf
...
95d1d231c9
| Author | SHA1 | Date |
|---|---|---|
|
|
95d1d231c9 | |
|
|
10b278e26f | |
|
|
0550eef2eb | |
|
|
73eb9919eb | |
|
|
9116009b0b | |
|
|
4e4ceb5074 | |
|
|
d79e2ff187 | |
|
|
d4a2594239 | |
|
|
d93917b081 | |
|
|
a31e2127e7 | |
|
|
a29df8f904 | |
|
|
97ebf9324a | |
|
|
0112ad63d9 | |
|
|
bcbb440ad4 |
|
|
@ -38,6 +38,7 @@ 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
|
||||||
|
|
@ -111,6 +112,36 @@ 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 #
|
||||||
#############
|
#############
|
||||||
|
|
@ -273,6 +304,8 @@ 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
|
||||||
|
|
@ -314,6 +347,9 @@ 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
|
||||||
|
|
@ -379,6 +415,8 @@ 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.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
|
|
@ -46,6 +46,10 @@ 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,6 +192,7 @@ 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,15 +274,14 @@ 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"):
|
||||||
line = line.split()
|
if int(line[1:4]) == reach_id:
|
||||||
if int(line[1]) == reach_id:
|
data.append(line[4:].split())
|
||||||
data.append(line[1:])
|
|
||||||
|
|
||||||
new_data = []
|
new_data = []
|
||||||
for d in data:
|
for d in data:
|
||||||
new = None
|
new = None
|
||||||
minor = float(d[3])
|
minor = float(d[2])
|
||||||
medium = float(d[4])
|
medium = float(d[3])
|
||||||
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
|
||||||
|
|
@ -292,5 +291,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[1]), float(d[2]), new, new])
|
new_data.append([self._data, float(d[0]), float(d[1]), new, new])
|
||||||
self.replace_data(new_data)
|
self.replace_data(new_data)
|
||||||
|
|
|
||||||
|
|
@ -124,8 +124,15 @@ 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_path", False)
|
self.set_line_edit_enable("lineEdit_description", 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,6 +109,9 @@ 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,9 +330,27 @@ class InitialConditionTableModel(PamhyrTableModel):
|
||||||
if not (line.startswith("#") or
|
if not (line.startswith("#") or
|
||||||
line.startswith("*") or
|
line.startswith("*") or
|
||||||
line.startswith("$")):
|
line.startswith("$")):
|
||||||
line = line.split()
|
line_split = line.split()
|
||||||
if int(line[0]) == reach_id:
|
formated = False
|
||||||
data.append([line[4], line[2], line[3]])
|
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]])
|
||||||
|
|
||||||
self._undo.push(
|
self._undo.push(
|
||||||
ReplaceDataCommand(
|
ReplaceDataCommand(
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,8 @@ 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:
|
||||||
|
|
@ -320,10 +322,12 @@ 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