mirror of https://gitlab.com/pamhyr/pamhyr2
Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr
commit
fb2d0d3e71
|
|
@ -456,6 +456,15 @@ of Bar (Listing [[sql-bar]] and [[sql-foo]]).
|
|||
bar._sql_save(execute, data=data)
|
||||
#+end_src
|
||||
|
||||
Let see the results database scheme for Pamhyr2 at version v0.0.7 in
|
||||
Figure [[sql_schema]].
|
||||
|
||||
#+NAME: sql_schema
|
||||
#+ATTR_LATEX: :width 16cm
|
||||
#+CAPTION: SQLite database scheme at Pamhyr2 version v0.0.7 (generate with [[https://gitlab.com/Screwtapello/sqlite-schema-diagram]])
|
||||
[[./images/schema_v0.0.7.png]]
|
||||
|
||||
|
||||
[fn:sqlite] The SQLite web site: https://www.sqlite.org/index.html
|
||||
(last access 2023-09-20)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 224 KiB |
|
|
@ -47,7 +47,7 @@ class PointXYZ(Point, SQLSubModel):
|
|||
z INTEGER NOT NULL,
|
||||
profile INTEGER NOT NULL,
|
||||
sl INTEGER,
|
||||
FOREIGN KEY(profile) REFERENCES profileXYZ(id),
|
||||
FOREIGN KEY(profile) REFERENCES geometry_profileXYZ(id),
|
||||
FOREIGN KEY(sl) REFERENCES sedimentary_layer(id)
|
||||
)
|
||||
""")
|
||||
|
|
|
|||
|
|
@ -167,8 +167,10 @@ class CommandLineSolver(AbstractSolver):
|
|||
repertory, "pamhyr-study-description.txt"
|
||||
)
|
||||
|
||||
with open(path, "w+") as f:
|
||||
txt = study.description
|
||||
with open(path, "w+", encoding='utf-8') as f:
|
||||
txt = study.description\
|
||||
.encode()\
|
||||
.decode('utf-8', 'replace')
|
||||
f.write(txt)
|
||||
|
||||
#######
|
||||
|
|
|
|||
|
|
@ -282,6 +282,9 @@ class Mage(CommandLineSolver):
|
|||
if bound.node is None:
|
||||
continue
|
||||
|
||||
if not study.river.is_enable_node(bound.node):
|
||||
continue
|
||||
|
||||
if bound.bctype == "ZD":
|
||||
AVA.append(bound)
|
||||
elif bound.bctype == "TD" or bound.bctype == "PC":
|
||||
|
|
@ -357,13 +360,7 @@ class Mage(CommandLineSolver):
|
|||
with mage_file_open(os.path.join(repertory, f"{name}.RUG"), "w+") as f:
|
||||
files.append(f"{name}.RUG")
|
||||
|
||||
edges = study.river.edges()
|
||||
edges = list(
|
||||
filter(
|
||||
lambda e: e.is_enable(),
|
||||
edges
|
||||
)
|
||||
)
|
||||
edges = study.river.enable_edges()
|
||||
|
||||
id = 1
|
||||
for edge in edges:
|
||||
|
|
|
|||
|
|
@ -160,7 +160,10 @@ class ResultsWindow(PamhyrWindow):
|
|||
self.canvas = MplCanvas(width=5, height=4, dpi=100)
|
||||
self.canvas.setObjectName("canvas")
|
||||
self.toolbar = PamhyrPlotToolbar(
|
||||
self.canvas, self
|
||||
self.canvas, self, items=[
|
||||
"home", "move", "zoom", "save",
|
||||
"iso", "back/forward"
|
||||
]
|
||||
)
|
||||
self.plot_layout = self.find(QVBoxLayout, "verticalLayout")
|
||||
self.plot_layout.addWidget(self.toolbar)
|
||||
|
|
@ -180,7 +183,10 @@ class ResultsWindow(PamhyrWindow):
|
|||
self.canvas_2 = MplCanvas(width=5, height=4, dpi=100)
|
||||
self.canvas_2.setObjectName("canvas_2")
|
||||
self.toolbar_2 = PamhyrPlotToolbar(
|
||||
self.canvas_2, self
|
||||
self.canvas_2, self, items=[
|
||||
"home", "move", "zoom", "save",
|
||||
"iso", "back/forward"
|
||||
]
|
||||
)
|
||||
self.plot_layout_2 = self.find(QVBoxLayout, "verticalLayout_2")
|
||||
self.plot_layout_2.addWidget(self.toolbar_2)
|
||||
|
|
@ -199,7 +205,10 @@ class ResultsWindow(PamhyrWindow):
|
|||
self.canvas_3 = MplCanvas(width=5, height=4, dpi=100)
|
||||
self.canvas_3.setObjectName("canvas_3")
|
||||
self.toolbar_3 = PamhyrPlotToolbar(
|
||||
self.canvas_3, self
|
||||
self.canvas_3, self, items=[
|
||||
"home", "move", "zoom", "save",
|
||||
"iso", "back/forward"
|
||||
]
|
||||
)
|
||||
self.plot_layout_3 = self.find(QVBoxLayout, "verticalLayout_3")
|
||||
self.plot_layout_3.addWidget(self.toolbar_3)
|
||||
|
|
@ -218,7 +227,10 @@ class ResultsWindow(PamhyrWindow):
|
|||
self.canvas_4 = MplCanvas(width=5, height=4, dpi=100)
|
||||
self.canvas_4.setObjectName("canvas_4")
|
||||
self.toolbar_4 = PamhyrPlotToolbar(
|
||||
self.canvas_4, self
|
||||
self.canvas_4, self, items=[
|
||||
"home", "move", "zoom", "save",
|
||||
"iso", "back/forward"
|
||||
]
|
||||
)
|
||||
self.plot_layout_4 = self.find(
|
||||
QVBoxLayout, "verticalLayout_hydrograph")
|
||||
|
|
|
|||
|
|
@ -109,3 +109,59 @@
|
|||
(mapcar 'pamhyr--insert-license
|
||||
(mapcar (lambda (file) (concat root "/" file))
|
||||
files-without-copyright))))
|
||||
|
||||
(defvar pamhyr-mail-template "Bonjour,
|
||||
|
||||
La version @version de Pamhyr2 est disponible.
|
||||
|
||||
<NEWS>
|
||||
|
||||
---Change-logs-------------------@version---
|
||||
@description
|
||||
------------------------------------------
|
||||
|
||||
---Liens-utiles---------------------------
|
||||
Télécharger cette version :
|
||||
https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/releases/@version
|
||||
|
||||
La documentation (en anglais) :
|
||||
https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/wikis/home
|
||||
|
||||
Rapporter un problème :
|
||||
https://gitlab.irstea.fr/theophile.terraz/pamhyr/-/issues
|
||||
ou directement par mail à :
|
||||
<pierre-antoine.rouby@inrae.fr>
|
||||
------------------------------------------
|
||||
|
||||
<FUTURE_WORK>
|
||||
|
||||
---/!\--Attention-------------------------
|
||||
Pour les utilisateurs Windows : Certains antivirus peuvent détecter Pamhyr2 comme un virus, c'est un faux positif, le problème est connu et vient de l'exécutable généré par PyInstaller.
|
||||
Nous n'avons pas encore de solution pour régler ce problème.
|
||||
Si c'est votre cas, il faudra ajouter une exception dans votre antivirus si vous voulez utiliser Pamhyr2.
|
||||
Sinon, il est aussi possible de passer par WSL et utiliser la version Linux sous Windows.
|
||||
|
||||
Rapport d'antivirus : <LINK_VIRUSTOTAL>
|
||||
------------------------------------------
|
||||
|
||||
Bon weekend,
|
||||
")
|
||||
|
||||
(require 'web)
|
||||
(require 'json)
|
||||
|
||||
(defun pamhyr-release-mail (release)
|
||||
(interactive "sRelease name: ")
|
||||
(web-http-get
|
||||
(lambda (httpc header my-data)
|
||||
(let* ((data (json-read-from-string my-data))
|
||||
(release (cdr (assoc 'tag_name data)))
|
||||
(description (cdr (assoc 'description data))))
|
||||
(let ((buffer (generate-new-buffer (format "* mail-%s *" release))))
|
||||
(with-current-buffer buffer
|
||||
(insert
|
||||
(string-replace "@description" description
|
||||
(string-replace "@version" release
|
||||
pamhyr-mail-template)))
|
||||
(set-buffer buffer)))))
|
||||
:url (concat "https://gitlab.irstea.fr/api/v4/projects/2779/releases/" release)))
|
||||
|
|
|
|||
Loading…
Reference in New Issue