mirror of https://gitlab.com/pamhyr/pamhyr2
Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into terraz_dev
commit
00c43d91cd
|
|
@ -28,20 +28,6 @@
|
||||||
#+OPTIONS: toc:t
|
#+OPTIONS: toc:t
|
||||||
#+LANGUAGE: UKenglish
|
#+LANGUAGE: UKenglish
|
||||||
|
|
||||||
#+NAME: attr_wrap
|
|
||||||
#+HEADER: :var width="\\textwidth"
|
|
||||||
#+HEADER: :var caption=""
|
|
||||||
#+HEADER: :var smallcaption=""
|
|
||||||
#+HEADER: :var name=""
|
|
||||||
#+HEADER: :var data=""
|
|
||||||
#+HEADER: :var float="nil"
|
|
||||||
#+BEGIN_SRC sh :results output :exports none
|
|
||||||
echo "#+CAPTION[$smallcaption]: $caption"
|
|
||||||
echo "#+NAME: $name"
|
|
||||||
echo "#+ATTR_LATEX: :width $width :float $float"
|
|
||||||
echo "$data"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_abstract
|
#+BEGIN_abstract
|
||||||
This document is for the use of developers. It describes the project
|
This document is for the use of developers. It describes the project
|
||||||
architecture, the tools available to assist development and
|
architecture, the tools available to assist development and
|
||||||
|
|
@ -54,13 +40,13 @@ documentation, translations or code.
|
||||||
|
|
||||||
* Introduction
|
* Introduction
|
||||||
|
|
||||||
Pamhyr2 is free and open source software (FOSS) graphical user
|
{{{pamhyr2}}} is free and open source software (FOSS) graphical user
|
||||||
interface (GUI) for 1D hydro-sedimentary modelling of rivers developed
|
interface (GUI) for 1D hydro-sedimentary modelling of rivers developed
|
||||||
in Python (with version 3.8). It use PyQt at version 5 and matplotlib
|
in Python (with version 3.8). It use PyQt at version 5 and matplotlib
|
||||||
in version 3.4.1 or later for the user insterface (see
|
in version 3.4.1 or later for the user insterface (see
|
||||||
{{{file(/requirements.txt)}}} for details). The architecture of
|
{{{file(/requirements.txt)}}} for details). The architecture of
|
||||||
project code follow the Qt Model/View architecture [fn:qt-arch] (see
|
project code follow the Qt Model/View architecture [fn:qt-arch] (see
|
||||||
details in section [[Architecture]]). Pamhyr2 packages can be build
|
details in section [[Architecture]]). {{{pamhyr2}}} packages can be build
|
||||||
manually (see section [[Building packages]]), but there are automatically
|
manually (see section [[Building packages]]), but there are automatically
|
||||||
build with the gitlab-ci (see the section [[Setup the CI
|
build with the gitlab-ci (see the section [[Setup the CI
|
||||||
environment]]). Documentation files are written with org-mode[fn:org],
|
environment]]). Documentation files are written with org-mode[fn:org],
|
||||||
|
|
@ -75,7 +61,7 @@ https://doc.qt.io/qt-5/model-view-programming.html (last access
|
||||||
|
|
||||||
* Architecture
|
* Architecture
|
||||||
|
|
||||||
Pamhyr2's architecture is based on Qt Model/View, see Figure
|
{{{pamhyr2}}}'s architecture is based on Qt Model/View, see Figure
|
||||||
[[graph-architecture]]. It is made up of several different components: the
|
[[graph-architecture]]. It is made up of several different components: the
|
||||||
model (in blue), the graphical components (in red), the
|
model (in blue), the graphical components (in red), the
|
||||||
actions/delegates (in green), the commands (in purple), the solvers
|
actions/delegates (in green), the commands (in purple), the solvers
|
||||||
|
|
@ -178,7 +164,7 @@ https://doc.qt.io/qt-5/model-view-programming.html
|
||||||
|
|
||||||
** Model
|
** Model
|
||||||
|
|
||||||
The model is a set of Python classes. In Pamhyr2, this classes must
|
The model is a set of Python classes. In {{{pamhyr2}}}, this classes must
|
||||||
respect some constraint. Each model class must inherits
|
respect some constraint. Each model class must inherits
|
||||||
=Model.Tools.SQLSubModel= abstract class, except the =Model.Study=
|
=Model.Tools.SQLSubModel= abstract class, except the =Model.Study=
|
||||||
class who inherits =Model.Tools.SQLModel= (see [[SQL]]).
|
class who inherits =Model.Tools.SQLModel= (see [[SQL]]).
|
||||||
|
|
@ -456,12 +442,12 @@ of Bar (Listing [[sql-bar]] and [[sql-foo]]).
|
||||||
bar._sql_save(execute, data=data)
|
bar._sql_save(execute, data=data)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Let see the results database scheme for Pamhyr2 at version v0.0.7 in
|
Let see the results database scheme for {{{pamhyr2}}} at version v0.0.7 in
|
||||||
Figure [[sql_schema]].
|
Figure [[sql_schema]].
|
||||||
|
|
||||||
#+NAME: sql_schema
|
#+NAME: sql_schema
|
||||||
#+ATTR_LATEX: :width 16cm
|
#+ATTR_LATEX: :width 16cm
|
||||||
#+CAPTION: SQLite database scheme at Pamhyr2 version v0.0.7 (generate with [[https://gitlab.com/Screwtapello/sqlite-schema-diagram]])
|
#+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]]
|
[[./images/schema_v0.0.7.png]]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -486,7 +472,7 @@ PamhyrModelList but use a dictionary instead of list.
|
||||||
|
|
||||||
** View
|
** View
|
||||||
|
|
||||||
Pamhyr2 use Qt as graphical user interface library with the
|
{{{pamhyr2}}} use Qt as graphical user interface library with the
|
||||||
application "Qt designer" for windows or widget creation (see [[UI file]])
|
application "Qt designer" for windows or widget creation (see [[UI file]])
|
||||||
and "Qt linguist" for interface translate (see [[Translate]]). In
|
and "Qt linguist" for interface translate (see [[Translate]]). In
|
||||||
addition, we use matplotlib as ploting library (see [[Plot]]).
|
addition, we use matplotlib as ploting library (see [[Plot]]).
|
||||||
|
|
@ -501,11 +487,11 @@ componant translate, and possible other files or sub-directories.
|
||||||
|
|
||||||
*** UI file
|
*** UI file
|
||||||
|
|
||||||
We define as possible all Pamhyr2 windows and custom widgets with "Qt
|
We define as possible all {{{pamhyr2}}} windows and custom widgets
|
||||||
designer". This application generate UI file who describes interface
|
with "Qt designer". This application generate UI file who describes
|
||||||
organisation with table, layout, button, etc. This method is faster
|
interface organisation with table, layout, button, etc. This method is
|
||||||
than hand made windows and widget creation, and saves us some purely
|
faster than hand made windows and widget creation, and saves us some
|
||||||
descriptive code. The UI files are saved into =src/View/ui= for
|
purely descriptive code. The UI files are saved into =src/View/ui= for
|
||||||
window, and =/src/View/ui/Widgets= for custom widget.
|
window, and =/src/View/ui/Widgets= for custom widget.
|
||||||
|
|
||||||
*** Translate
|
*** Translate
|
||||||
|
|
@ -533,10 +519,11 @@ window, and =/src/View/ui/Widgets= for custom widget.
|
||||||
|
|
||||||
*** Window
|
*** Window
|
||||||
|
|
||||||
The abstract class PamhyrWindow and PamhyrDialog are used for most of
|
The abstract class =PamhyrWindow= and =PamhyrDialog= are used for most
|
||||||
Pamhyr2 window. These class allow to create an window for Pamhyr2 GUI
|
of {{{pamhyr2}}} window. These class allow to create an window for
|
||||||
and implemente some useful methods. The super class method difine some
|
{{{pamhyr2}}} GUI and implemente some useful methods. The super class
|
||||||
generic value from optional parameters, for examples:
|
method difine some generic value from optional parameters, for
|
||||||
|
examples:
|
||||||
- =self._study=: The study giving in constructor parameters =study=
|
- =self._study=: The study giving in constructor parameters =study=
|
||||||
(typically a =Model.Study= class object)
|
(typically a =Model.Study= class object)
|
||||||
- =self._config=: The configuration giving in constructor parameters
|
- =self._config=: The configuration giving in constructor parameters
|
||||||
|
|
@ -546,7 +533,7 @@ generic value from optional parameters, for examples:
|
||||||
object)
|
object)
|
||||||
|
|
||||||
#+NAME: window
|
#+NAME: window
|
||||||
#+CAPTION: Example of Pamhyr2 window
|
#+CAPTION: Example of {{{pamhyr2}}} window
|
||||||
#+begin_src python :python python3 :results output :noweb yes
|
#+begin_src python :python python3 :results output :noweb yes
|
||||||
from View.Tools.PamhyrWindow import PamhyrWindow
|
from View.Tools.PamhyrWindow import PamhyrWindow
|
||||||
from View.My.Translate import MyTranslate
|
from View.My.Translate import MyTranslate
|
||||||
|
|
@ -593,7 +580,7 @@ window componants or connections.
|
||||||
|
|
||||||
*** Table
|
*** Table
|
||||||
|
|
||||||
An abstract class PamhyrTableModel is available to define a simple
|
An abstract class =PamhyrTableModel= is available to define a simple
|
||||||
QAbstractTableModel shortly. In simple cases, there are only =data=
|
QAbstractTableModel shortly. In simple cases, there are only =data=
|
||||||
and =setData= methode to implement, but the constructor needs more
|
and =setData= methode to implement, but the constructor needs more
|
||||||
information than a classic QAbstractTableModel class.
|
information than a classic QAbstractTableModel class.
|
||||||
|
|
@ -654,7 +641,7 @@ class AddNodeCommand(QUndoCommand):
|
||||||
|
|
||||||
All undo command must be push into a =QUndoStack= (see Listing
|
All undo command must be push into a =QUndoStack= (see Listing
|
||||||
[[undo-cmd-push]]) to perform the action and allow user undo and redo this
|
[[undo-cmd-push]]) to perform the action and allow user undo and redo this
|
||||||
action. In PamhyrWindow (and PamhyrDialog) the undo stack is
|
action. In =PamhyrWindow= (and =PamhyrDialog=) the undo stack is
|
||||||
automatically create if the option ="undo"= is activate at window
|
automatically create if the option ="undo"= is activate at window
|
||||||
creation, this stack is accessible at =self._undo_stack=.
|
creation, this stack is accessible at =self._undo_stack=.
|
||||||
|
|
||||||
|
|
@ -672,7 +659,7 @@ creation, this stack is accessible at =self._undo_stack=.
|
||||||
*** Plot
|
*** Plot
|
||||||
|
|
||||||
To define a new plot you can create a class who inherit to
|
To define a new plot you can create a class who inherit to
|
||||||
PamhyrPlot. The creator need at leaste five argument:
|
=PamhyrPlot=. The creator need at leaste five argument:
|
||||||
- A =canvas= of type =MplCanvas=
|
- A =canvas= of type =MplCanvas=
|
||||||
- A (optional) =trad= of type =PamhyrTranslate=
|
- A (optional) =trad= of type =PamhyrTranslate=
|
||||||
- A =data= used in =draw= and =update= to create and update the plot
|
- A =data= used in =draw= and =update= to create and update the plot
|
||||||
|
|
@ -719,8 +706,8 @@ data has changed.
|
||||||
|
|
||||||
** Solver
|
** Solver
|
||||||
|
|
||||||
The Pamhyr2 architecture allow to define multiple solver. A solver is
|
The {{{pamhyr2}}} architecture allow to define multiple solver. A
|
||||||
define by a:
|
solver is define by a:
|
||||||
- type
|
- type
|
||||||
- name
|
- name
|
||||||
- description,
|
- description,
|
||||||
|
|
@ -736,11 +723,11 @@ different solver type, this solver type implement the code for export
|
||||||
study to solver input format, and read the solver output to study
|
study to solver input format, and read the solver output to study
|
||||||
results. There exists a generic solver with a generic input and output
|
results. There exists a generic solver with a generic input and output
|
||||||
format, the type could be use to use a solver not implemented in
|
format, the type could be use to use a solver not implemented in
|
||||||
Pamhyr2, but this solver must can read/write input and output generic
|
{{{pamhyr2}}}, but this solver must can read/write input and output
|
||||||
format or use external script. There is possible to define different
|
generic format or use external script. There is possible to define
|
||||||
solver with the same type, for example two differents version of the
|
different solver with the same type, for example two differents
|
||||||
same solver. Finaly, with input and output formater is possible to
|
version of the same solver. Finaly, with input and output formater is
|
||||||
execute a code on distant computer, for example, over ssh.
|
possible to execute a code on distant computer, for example, over ssh.
|
||||||
|
|
||||||
#+name: graph-multi-solver
|
#+name: graph-multi-solver
|
||||||
#+header: :results drawer
|
#+header: :results drawer
|
||||||
|
|
@ -857,8 +844,8 @@ solver and get results:
|
||||||
- (2.1) The solver read the input file(s)
|
- (2.1) The solver read the input file(s)
|
||||||
- (2.2) The solver compute results and write it to solver output
|
- (2.2) The solver compute results and write it to solver output
|
||||||
file(s)
|
file(s)
|
||||||
- (3) Pamhyr2 create a =Results= object
|
- (3) {{{pamhyr2}}} create a =Results= object
|
||||||
- (3.1) The Pamhyr2 solver class read solver output file(s) and
|
- (3.1) The {{{pamhyr2}}} solver class read solver output file(s) and
|
||||||
complete Results with readed data
|
complete Results with readed data
|
||||||
|
|
||||||
#+name: graph-pipeline
|
#+name: graph-pipeline
|
||||||
|
|
@ -976,7 +963,7 @@ the temporal order of action is prensented in Figure
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
To implement a Solver in Pamhyr2, there exists a abstract class
|
To implement a Solver in {{{pamhyr2}}}, there exists a abstract class
|
||||||
=Solver.AbstractSolver=. A class who herits this class, must implement
|
=Solver.AbstractSolver=. A class who herits this class, must implement
|
||||||
different methods:
|
different methods:
|
||||||
- =export=: Export the study to solver input file(s)
|
- =export=: Export the study to solver input file(s)
|
||||||
|
|
@ -987,7 +974,7 @@ different methods:
|
||||||
|
|
||||||
** Unit tests
|
** Unit tests
|
||||||
|
|
||||||
A very small part of Pamhyr2 has unit test. This part is limited to the Model.
|
A very small part of {{{pamhyr2}}} has unit test. This part is limited to the Model.
|
||||||
|
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
python3 -m venv test
|
python3 -m venv test
|
||||||
|
|
@ -1000,9 +987,9 @@ A very small part of Pamhyr2 has unit test. This part is limited to the Model.
|
||||||
|
|
||||||
** The debug mode
|
** The debug mode
|
||||||
|
|
||||||
To activate an deactivate the Pamhyr2 debug mode you can open the
|
To activate an deactivate the {{{pamhyr2}}} debug mode you can open
|
||||||
configuration window and type "Ctrl+G" or run Pamhyr2 with command
|
the configuration window and type "Ctrl+G" or run {{{pamhyr2}}} with
|
||||||
line:
|
command line:
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
./Pamhyr2 debug
|
./Pamhyr2 debug
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
@ -1015,7 +1002,7 @@ data base file.
|
||||||
|
|
||||||
#+NAME: debug-repl
|
#+NAME: debug-repl
|
||||||
#+ATTR_LATEX: :width 14cm
|
#+ATTR_LATEX: :width 14cm
|
||||||
#+CAPTION: Pamhyr2 debug Python REPL
|
#+CAPTION: {{{pamhyr2}}} debug Python REPL
|
||||||
[[./images/python-debug-repl.png]]
|
[[./images/python-debug-repl.png]]
|
||||||
|
|
||||||
* Build the project
|
* Build the project
|
||||||
|
|
@ -1028,7 +1015,7 @@ to build packages manually.
|
||||||
If you need an hand made package, you can script available in
|
If you need an hand made package, you can script available in
|
||||||
{{{file(packages)}}} directory.
|
{{{file(packages)}}} directory.
|
||||||
|
|
||||||
*** GNU/Linux
|
*** GNU/Linux {{{linux}}}
|
||||||
|
|
||||||
On GNU/Linux building GNU/Linux packages is easy, you just need python
|
On GNU/Linux building GNU/Linux packages is easy, you just need python
|
||||||
in version 3.8 must be installed with venv and pyinstaller packages
|
in version 3.8 must be installed with venv and pyinstaller packages
|
||||||
|
|
@ -1050,7 +1037,7 @@ cd packages
|
||||||
./linux.sh
|
./linux.sh
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Windows
|
*** Windows {{{windows}}}
|
||||||
|
|
||||||
To make the Windows packages you have two choice: If you use Windows
|
To make the Windows packages you have two choice: If you use Windows
|
||||||
you can use the script {{{file(packages/windows.bat)}}}, other else
|
you can use the script {{{file(packages/windows.bat)}}}, other else
|
||||||
|
|
@ -1065,10 +1052,10 @@ winetricks installed.
|
||||||
|
|
||||||
** Setup the CI environment
|
** Setup the CI environment
|
||||||
|
|
||||||
Pamhyr2 need a Linux ci-runner and a Windows ci-runner for building
|
{{{pamhyr2}}} need a Linux ci-runner and a Windows ci-runner for building
|
||||||
package. The windows ci-runner could run on a Wine environement.
|
package. The windows ci-runner could run on a Wine environement.
|
||||||
|
|
||||||
*** Linux
|
*** Linux {{{linux}}}
|
||||||
|
|
||||||
The Linux ci-runner need some software and dependencies in addtion of
|
The Linux ci-runner need some software and dependencies in addtion of
|
||||||
gitlab-ci.
|
gitlab-ci.
|
||||||
|
|
@ -1078,10 +1065,11 @@ gitlab-ci.
|
||||||
emacs emacs-goodies-el \
|
emacs emacs-goodies-el \
|
||||||
texlive-full \
|
texlive-full \
|
||||||
python3.8 python3.8-venv
|
python3.8 python3.8-venv
|
||||||
|
|
||||||
sudo python3 -m pip install pyinstaller
|
sudo python3 -m pip install pyinstaller
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Windows (Wine)
|
*** Windows (Wine) {{{windows}}}
|
||||||
|
|
||||||
The ci-runner environment for Wine need at least wine version 8, let
|
The ci-runner environment for Wine need at least wine version 8, let
|
||||||
[[https://www.numetopia.fr/comment-installer-wine-sur-ubuntu-ou-linux-mint/][see who to add wine official depot to your linux distribution]].
|
[[https://www.numetopia.fr/comment-installer-wine-sur-ubuntu-ou-linux-mint/][see who to add wine official depot to your linux distribution]].
|
||||||
|
|
@ -1090,18 +1078,77 @@ The ci-runner environment for Wine need at least wine version 8, let
|
||||||
sudo apt install wine-stable winetricks
|
sudo apt install wine-stable winetricks
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
In addition, the environment need windows version of:
|
**** Setup environment
|
||||||
- [[https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe][Python 3.8.10]]
|
|
||||||
- Git
|
Export Wine environment variable to set wine as 64 bits architecture
|
||||||
- PowerShell
|
and set the correct path for wine environment.
|
||||||
- Gitlab-ci
|
|
||||||
|
#+begin_src shell
|
||||||
|
export WINARCH=win64
|
||||||
|
export WINEPREFIX=$PWD/my-wine-runner-prefix
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Setup Wine environment to Windows 10 and install the minimal fonts
|
||||||
|
with =winetricks=.
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
winetricks corefonts win10
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**** Install dependencies
|
||||||
|
|
||||||
|
First install 7zip with help of =winetricks=.
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
winetricks 7zip
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
In addition, install in the environment the Windows version of:
|
||||||
|
- [[https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe][Python 3.8.10]] (ensure the python path is set and Pip is enable)
|
||||||
|
- [[https://git-scm.com/downloads][Git]]
|
||||||
|
- [[https://github.com/PowerShell/PowerShell/releases/download/v7.0.1/PowerShell-7.0.1-win-x64.msi][PowerShell]]
|
||||||
- [[https://freefr.dl.sourceforge.net/project/nsis/NSIS%203/3.08/nsis-3.08-setup.exe][Nsis]]
|
- [[https://freefr.dl.sourceforge.net/project/nsis/NSIS%203/3.08/nsis-3.08-setup.exe][Nsis]]
|
||||||
|
|
||||||
|
To run a Windows executable into wine environement, use =wine64= command:
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
wine64 <the-exe-file>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Now, we can install =pyinstaller= on this windows environment:
|
Now, we can install =pyinstaller= on this windows environment:
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
wine python -m pip install pyinstaller
|
wine python -m pip install pyinstaller
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Now, we can download [[https://docs.gitlab.com/runner/install/windows.html][Gitlab-ci]] runner for Windows an put it in the
|
||||||
|
current path.
|
||||||
|
|
||||||
|
**** Setup runner
|
||||||
|
|
||||||
|
You can configure the runner with command:
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
wine64 gitlab-runner-windows-amd64.exe register
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**** Run the runner
|
||||||
|
|
||||||
|
Create a new executable shell script =runner.sh= with following lines:
|
||||||
|
|
||||||
|
#+begin_src shell
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
export WINARCH=win64
|
||||||
|
export WINEPREFIX=$PWD/my-wine-runner-prefix
|
||||||
|
|
||||||
|
wine64 gitlab-runner-windows-amd64.exe run
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Now you can run the runner with command =./runner.sh=.
|
||||||
|
|
||||||
|
{{{bulb}}} You can run this command into a =screen= terminal, detach
|
||||||
|
the terminal and disconnect from runner machine to keep runner alive.
|
||||||
|
|
||||||
* Documentation files
|
* Documentation files
|
||||||
|
|
||||||
This document and the user documentation are org files. This text file
|
This document and the user documentation are org files. This text file
|
||||||
|
|
@ -1284,23 +1331,23 @@ Some org-mode configuration used in documentations files are define in
|
||||||
|
|
||||||
* How to contribute?
|
* How to contribute?
|
||||||
|
|
||||||
Pamhyr2 is free software: you can redistribute it and/or modify it
|
{{{pamhyr2}}} is free software: you can redistribute it and/or modify
|
||||||
under the terms of the GNU General Public License[fn:license], either
|
it under the terms of the GNU General Public License[fn:license],
|
||||||
version 3 of the License, or any later version.
|
either version 3 of the License, or any later version.
|
||||||
|
|
||||||
[fn:license] The GPLv3 web page:
|
[fn:license] The GPLv3 web page:
|
||||||
https://www.gnu.org/licenses/gpl-3.0.en.html
|
https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||||
|
|
||||||
** Guidelines
|
** Guidelines
|
||||||
|
|
||||||
To contribute to Pamhyr2, we expect a minimum of respect between
|
To contribute to {{{pamhyr2}}}, we expect a minimum of respect between
|
||||||
contributors. We therefore ask you to respect the following rules
|
contributors. We therefore ask you to respect the following rules
|
||||||
regarding communication and contribution content:
|
regarding communication and contribution content:
|
||||||
+ No gender, racial, religious or social discrimination
|
+ No gender, racial, religious or social discrimination
|
||||||
+ No insults, personal attacks or potentially offensive remarks
|
+ No insults, personal attacks or potentially offensive remarks
|
||||||
+ Pamhyr2 is free software, and intended to remain so, so take care
|
+ {{{pamhyr2}}} is free software, and intended to remain so, so take
|
||||||
with the licensing of libraries and external content you want to add
|
care with the licensing of libraries and external content you want
|
||||||
to the project
|
to add to the project
|
||||||
+ Humour or hidden easter eggs are welcome if they respect the
|
+ Humour or hidden easter eggs are welcome if they respect the
|
||||||
previous rules
|
previous rules
|
||||||
|
|
||||||
|
|
@ -1311,11 +1358,12 @@ an issue on the project's gitlab page[fn:p2-gitlab], or you can create
|
||||||
a merge request on the same page with the changes you have made to the
|
a merge request on the same page with the changes you have made to the
|
||||||
code, translation or documentation.
|
code, translation or documentation.
|
||||||
|
|
||||||
The Pamhyr2 copyright is owned by INRAE[fn:inrae], but we keep a
|
The {{{pamhyr2}}} copyright is owned by INRAE[fn:inrae], but we keep a
|
||||||
record of each contributors. If you made a modification to pamhyr2
|
record of each contributors. If you made a modification to
|
||||||
software, please add your name at the end of {{{file(AUTHORS)}}} file
|
{{{pamhyr2}}} software, please add your name at the end of
|
||||||
and respect the Listing [[auth-format]] format. You can update this file
|
{{{file(AUTHORS)}}} file and respect the Listing [[auth-format]]
|
||||||
information for following contribution.
|
format. You can update this file information for following
|
||||||
|
contribution.
|
||||||
|
|
||||||
#+NAME: auth-format
|
#+NAME: auth-format
|
||||||
#+CAPTION: =AUTHORS= file format
|
#+CAPTION: =AUTHORS= file format
|
||||||
|
|
@ -1326,16 +1374,17 @@ information for following contribution.
|
||||||
#+CAPTION: Current =AUTHORS= file
|
#+CAPTION: Current =AUTHORS= file
|
||||||
#+INCLUDE: "../../AUTHORS" src text
|
#+INCLUDE: "../../AUTHORS" src text
|
||||||
|
|
||||||
[fn:p2-gitlab] The Pamhyr2 Gitlab project page:
|
[fn:p2-gitlab] The {{{pamhyr2}}} Gitlab project page:
|
||||||
https://gitlab.irstea.fr/theophile.terraz/pamhyr
|
https://gitlab.irstea.fr/theophile.terraz/pamhyr
|
||||||
[fn:inrae] The INRAE web site: https://www.inrae.fr/
|
[fn:inrae] The INRAE web site: https://www.inrae.fr/
|
||||||
|
|
||||||
** Translate
|
** Translate
|
||||||
|
|
||||||
You can improve or add translation for the project. To contribute to
|
You can improve or add translation for the project. To contribute to
|
||||||
Pamhyr2 translate, you need to use Qt Linguist[fn:qt-linguist]. Open
|
{{{pamhyr2}}} translate, you need to use Qt
|
||||||
Qt-linguist and edit the translation ({{{file(.ts)}}}) file, finally,
|
Linguist[fn:qt-linguist]. Open Qt-linguist and edit the translation
|
||||||
commit the new version of file and make a merge request.
|
({{{file(.ts)}}}) file, finally, commit the new version of file and
|
||||||
|
make a merge request.
|
||||||
|
|
||||||
If you want add a new language, edit the script
|
If you want add a new language, edit the script
|
||||||
{{{file(src/lang/create_ts.sh)}}} like Listing [[ts-it]]. Run the script
|
{{{file(src/lang/create_ts.sh)}}} like Listing [[ts-it]]. Run the script
|
||||||
|
|
@ -1344,7 +1393,7 @@ and open the new file with Qt-linguist, setup target language (Figure
|
||||||
file and make a merge request.
|
file and make a merge request.
|
||||||
|
|
||||||
#+NAME: ts-it
|
#+NAME: ts-it
|
||||||
#+CAPTION: Example of modified {{{file(src/lang/create_ts.sh)}}} to add italian (it) translate for Pamhyr2
|
#+CAPTION: Example of modified {{{file(src/lang/create_ts.sh)}}} to add italian (it) translate for {{{pamhyr2}}}
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
...
|
...
|
||||||
LANG="fr it"
|
LANG="fr it"
|
||||||
|
|
@ -1362,7 +1411,7 @@ https://doc.qt.io/qt-5/qtlinguist-index.html (last access 2023-09-18)
|
||||||
** Code contribution
|
** Code contribution
|
||||||
|
|
||||||
If you are developper you can improve and/or add features to
|
If you are developper you can improve and/or add features to
|
||||||
Pamhyr2. Please, follow the architecture described in section
|
{{{pamhyr2}}}. Please, follow the architecture described in section
|
||||||
[[Architecture]] as closely as possible. Keep the code simple, clear and
|
[[Architecture]] as closely as possible. Keep the code simple, clear and
|
||||||
efficient as possible. The master branch is reserved for the project
|
efficient as possible. The master branch is reserved for the project
|
||||||
maintainer; you can create a new branch or fork the project before the
|
maintainer; you can create a new branch or fork the project before the
|
||||||
|
|
|
||||||
|
|
@ -163,3 +163,7 @@
|
||||||
\SetWatermarkScale{3}
|
\SetWatermarkScale{3}
|
||||||
\SetWatermarkFontSize{1cm}
|
\SetWatermarkFontSize{1cm}
|
||||||
\SetWatermarkText{Work in progress}
|
\SetWatermarkText{Work in progress}
|
||||||
|
|
||||||
|
%% Icons
|
||||||
|
|
||||||
|
\usepackage{fontawesome5}
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,15 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Constant name
|
# Constant name
|
||||||
#+MACRO: oldPamhyr PAMHyR
|
#+MACRO: pamhyr \textsc{PAMHyR}
|
||||||
#+MACRO: Pamhyr Pamhyr2
|
#+MACRO: pamhyr2 \textsc{Pamhyr2}
|
||||||
#+MACRO: Mage Mage
|
#+MACRO: mage \textsc{Mage}
|
||||||
#+MACRO: Rubarbe RubarBE
|
#+MACRO: mage7 \textsc{Mage7}
|
||||||
#+MACRO: Inrae INRAE
|
#+MACRO: mage8 \textsc{Mage8}
|
||||||
|
#+MACRO: rubarbe \textsc{RubarBE}
|
||||||
|
#+MACRO: adists \textsc{AdisTS}
|
||||||
|
#+MACRO: mascaret \textsc{Mascaret}
|
||||||
|
#+MACRO: inrae INRAE
|
||||||
#+MACRO: latex \LaTeX
|
#+MACRO: latex \LaTeX
|
||||||
|
|
||||||
# Information
|
# Information
|
||||||
|
|
@ -35,6 +39,16 @@
|
||||||
#+MACRO: cite [cite:$1]
|
#+MACRO: cite [cite:$1]
|
||||||
#+MACRO: biblio \bibliography{documentation}
|
#+MACRO: biblio \bibliography{documentation}
|
||||||
|
|
||||||
|
# Icons
|
||||||
|
#+MACRO: bulb \faIcon{lightbulb}
|
||||||
|
#+MACRO: OK \faIcon{check}
|
||||||
|
|
||||||
|
#+MACRO: linux \faIcon{linux}
|
||||||
|
#+MACRO: windows \faIcon{windows}
|
||||||
|
|
||||||
|
#+MACRO: python \faIcon{python}
|
||||||
|
#+MACRO: java \faIcon{java}
|
||||||
|
|
||||||
# Wrapper
|
# Wrapper
|
||||||
#+NAME: attr_wrap
|
#+NAME: attr_wrap
|
||||||
#+HEADER: :var width="\\textwidth"
|
#+HEADER: :var width="\\textwidth"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue