Skip to content
Snippets Groups Projects
Commit d1d378f4 authored by David Dorchies's avatar David Dorchies
Browse files

Merge branch 'devel' into 'master'

release: version 4.18.0

See merge request !252
parents fc9dfbfa 26452dae
No related branches found
No related tags found
2 merge requests!254Master v4.18.0,!252release: version 4.18.0
Pipeline #164896 passed
Showing
with 577 additions and 798 deletions
......@@ -3,13 +3,16 @@
{
"name": "Cassiopée",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "geaucassiopee/ci-cd-cross-platform-webapp:v3",
//"image": "geaucassiopee/ci-cd-cross-platform-webapp:v3",
"build": { "dockerfile": "../Dockerfile" },
"customizations": {
"vscode": {
"extensions": [
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker",
"ms-vscode.vscode-typescript-next"
"streetsidesoftware.code-spell-checker-french",
"ms-vscode.vscode-typescript-next",
"dbaeumer.vscode-eslint"
]
}
}
......
......@@ -6,7 +6,7 @@ It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.
We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
Happy linting! 💖
......@@ -18,7 +18,7 @@ module.exports = {
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"project": ["./e2e/tsconfig.e2e.json"],
"sourceType": "module"
},
"plugins": [
......
......@@ -10,7 +10,7 @@ stages:
default:
tags: [docker]
image: geaucassiopee/ci-cd-cross-platform-webapp:v3
image: $CI_REGISTRY/cassiopee/nghyd:latest
variables:
# from Gitlab CI/CD environment variables :
......@@ -65,8 +65,10 @@ test:
- schedules
- web
- master
- devel
script:
- npm run e2e
timeout: 2h
.build:
stage: build
......@@ -76,6 +78,7 @@ test:
expire_in: 10 min
paths:
- dist/
- build
script:
# -baseref option is used by npm to set the npm_config_basehref environment variable
# used in package.json
......
This diff is collapsed.
......@@ -31,11 +31,7 @@ La documentation est générée avec Mkdocs, pandoc et LaTeX.
### pour le développement
* nodejs / npm
* python (pour mkdocs)
* wine (pour Electron / windows)
* pandoc (pour la documentation PDF)
* une distribution LaTeX, par exemple texlive (pour la documentation PDF)
Voir la section *Requirements* du fichier `README.md`.
### pour l'exécution
......
FROM docker.io/node:18.18-bookworm-slim
LABEL maintainer="bug@cassiopee.g-eau.fr"
LABEL version="3.1"
ENV DEBIAN_FRONTEND noninteractive
# Install base packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
locales \
curl \
build-essential \
wget \
ca-certificates \
gnupg \
git \
rsync \
openssh-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set UTF-8 locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Add Repositories
## Wine
RUN dpkg --add-architecture i386 \
&& wget -nc https://dl.winehq.org/wine-builds/winehq.key \
&& apt-key add winehq.key \
&& echo "deb https://dl.winehq.org/wine-builds/debian/ bookworm main" > /etc/apt/sources.list.d/winehq.list
# Install packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
## MkDocs
mkdocs \
python3-mdx-math \
mkdocs-material-extensions \
## Pandoc & LaTeX for PDF doc
pandoc \
texlive \
latexmk \
texlive-latex-extra \
texlive-bibtex-extra \
texlive-lang-french \
texlive-xetex \
## Wine
winehq-stable \
## chromium and procps (e2e)
chromium chromium-driver procps \
## Clean cache
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /build
ENV SHELL /bin/bash
......@@ -31,9 +31,9 @@ sudo apt install pandoc texlive latexmk texlive-latex-extra texlive-bibtex-extra
#### Using docker container
Download and use the following docker image: https://hub.docker.com/repository/docker/geaucassiopee/ci-cd-cross-platform-webapp
More details on how to use it on vscode are available at https://forgemia.inra.fr/cassiopee/cassiopee2-integration
Use the DockerFile provided at the root of this repository. This repository also
provide a `.devcontainer` configuration for developing nghyd in vscode
(See https://code.visualstudio.com/docs/devcontainers/containers).
### Install dependencies
......@@ -206,7 +206,38 @@ To draw the diagram:
npm run viz
```
## Caveats
### CI/CD docker image
Gitlab CI/CD uses a docker image created with the `DockerFile` located at the root
of this repository. This image needs to be pushed on the Gitlab registry in order to
be used by the CI/CD.
#### Requirements
You need to have Docker installed on your computer (See: https://docs.docker.com/get-docker/).
On Windows, you first need to install a Linux distro under WSL2 (See
https://learn.microsoft.com/en-us/windows/wsl/install).
#### Build and push container images to the Container Registry
This notice is inspired from
https://docs.gitlab.com/ee/user/packages/container_registry/build_and_push_images.html.
You first need to create an access token (personal or project token):
Go to https://gitlab.irstea.fr/-/profile/personal_access_tokens
and create a token with a minimum scope `write_registry` and `read_registry`.
Open a terminal in the root folder of this repository on your local machine,
and type (with `<token name>` and `<token value>` the credentials
of the access token):
```
docker login registry.forgemia.inra.fr -u <token name> -p <token value>
docker build -t registry.forgemia.inra.fr/cassiopee/nghyd .
docker push registry.forgemia.inra.fr/cassiopee/nghyd
```
### Deployment
......
docs/en/calculators/devalaison/ge.png

19.5 KiB

......@@ -199,10 +199,6 @@ Blockage ratio due to spacers. Scope of validity of the formula: \(O_{entH} \leq
<div style="position: relative"><a id="profil-des-barreaux" style="position: absolute; top: -60px;"></a></div>
### Bar profile
![Bar profile](profil-barreaux.png)
*Raynal, Sylvain. « Étude expérimentale et numérique des grilles ichtyocompatibles ». Sciences et ingénierie en matériaux, mécanique, énergétique et aéronautique - SIMMEA, 2013.*
#### Conventional trashrack
The shape coefficient of the bars \(a\) is 2.89 for the rectangular profile (PR) and 1.70 for the hydrodynamic profile (PH).
......@@ -217,6 +213,7 @@ The shape coefficient of the bars \(c\) is 1.69 for the rectangular profile (PR)
| Bar shape | Droplet | Plétina | Tadpole 8 | Tadpole 10 | Hydrodynamic | Rectangular |
| --- | --- | --- | --- | --- | --- | --- |
| | <img src="ge.png" alt="Droplet" style="width:65px;height:289px;"> | <img src="pletina.png" alt="Plétina" style="width:65px;height:289px;"> | <img src="tadpole8.png" alt="Tadpole 8" style="width:65px;height:289px;"> | <img src="tadpole10.png" alt="Tadpole 10" style="width:65px;height:289px;"> | <img src="hydrodynamique.png" alt="Hydrodynamique" style="width:65px;height:289px;"> | <img src="rec.png" alt="Rectangulaire" style="width:65px;height:289px;"> |
| Bar coefficient $A_i$| 2.47 | 1.75 | 1.27 | 1.79 | 2.10 | 3.85 |
After Lemkecher et al. (2020)[^4]
......
docs/en/calculators/devalaison/hydrodynamique.png

20.5 KiB

......@@ -30,7 +30,7 @@ With:
- \(g\): acceleration of gravity = 9.81 m.s-2
- \(D\): horizontal distance travelled between the start of the jet and the point of impact (m)
- \(\alpha\)&nbsp;: angle of shooting in relation to the horizontal (°)
- \(\V_0\)&nbsp;: initial speed (m/s)
- \(V_0\)&nbsp;: initial speed (m/s)
### Impact abscissa (horizontal distance covered)
......
docs/en/calculators/devalaison/pletina.png

12.8 KiB

docs/en/calculators/devalaison/rec.png

7.38 KiB

docs/en/calculators/devalaison/tadpole10.png

19.9 KiB

docs/en/calculators/devalaison/tadpole8.png

21.2 KiB

......@@ -6,7 +6,7 @@ The slope used in all Cassiopée's modules is the topographic slope:
> The grade (also called slope, incline, gradient, mainfall, pitch or rise) of a physical feature, landform or constructed line refers to the tangent of the angle of that surface to the horizontal. (Source: [Wikipedia](https://en.wikipedia.org/wiki/Grade_(slope)))
![Longitudinal cross-sectional scheme of a rectilinear section](pente.svg)
![Longitudinal cross-sectional scheme of a rectilinear section](pente.png)
The slope (\(I\)) in m/m used in Cassiopee's modules is:
......
docs/en/calculators/hsl/pente.png

9.79 KiB

This diff is collapsed.
......@@ -44,16 +44,3 @@ The correlation table of the coefficients is as follows:
| Hydraulically smooth pipe - 0.25 &le; D &le; 1 | 0.00 | 0.971 | 1.81 | 4.81 |
Table: Materials and coefficients used in the Lechapt and Calmon formula
## Singular head loss
$$ J_S = K_S \frac{V^2}{2g}$$
With:
- \(K_S\)&nbsp;: singular head loss coefficient
- \(V\)&nbsp;: water speed in the pipe (\(V = 4 Q / \pi / D^2\))
## Darcy's head loss coefficient
$$ f_D = \frac{2g J D}{l_T V^2}
......@@ -77,7 +77,9 @@ During the calculation, if the calculated crest elevation is less than *minZDV*
## Calculation results
The results are presented in the form of a summary table of hydraulic calculations for all basins and walls. It contains all the data calculated by the modules [Cross walls](cloisons.md) and [Power dissipation](volume.md).
The results are presented in the form of a summary table of hydraulic
calculations for all basins and walls. It contains all the data calculated
by the modules [Cross walls](cloisons.md) and [Power dissipation](volume.md).
Two graphs are present:
......@@ -85,3 +87,8 @@ Two graphs are present:
- A general graph allowing the selection of any parameter from the result table in abscissa and ordinate.
If several results are available due to the variation of one or two hydraulic parameters of the pass, all calculated water lines are displayed in the long profile, and a drop-down list allows to select the result to be displayed in the generalist table and graph.
## Example session
An example illustrating the conception of a fish ladder can be directly loaded
through this [link](https://cassiopee.g-eau.fr/#/loadsession/app%2Fexamples%2Fpab-complete-chain.json).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment