Skip to content

Commit

Permalink
Merge pull request InseeFr#295 from InseeFr/feature/docs
Browse files Browse the repository at this point in the history
Feature/docs
  • Loading branch information
FranckCo authored Dec 19, 2023
2 parents 7800c34 + e6d916f commit a0dbc19
Show file tree
Hide file tree
Showing 28 changed files with 589 additions and 354 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Transformation engine and validator for statistics.
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=InseeFr_Trevas&metric=coverage)](https://sonarcloud.io/dashboard?id=InseeFr_Trevas)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/fr.insee.trevas/trevas-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/fr.insee.trevas/trevas-parent)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Mentioned in Awesome Official Statistics ](https://awesome.re/mentioned-badge.svg)](http://www.awesomeofficialstatistics.org)

Trevas is a Java engine for the Validation and Transformation Language (VTL), an [SDMX standard](https://sdmx.org/?page_id=5096) that allows the formal definition of algorithms to validate statistical data and calculate derived data. VTL is user oriented and provides a technology-neutral and standard view of statistical processes at the business level. Trevas supports the latest VTL version (v2.0, July 2020).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
slug: /trevas-1.1.0
title: Trevas 1.1.0
slug: /trevas-check_hierarchy
title: Trevas - check_hierarchy
authors: [nicolas]
tags: [Trevas Jupyter]
tags: [Trevas]
---

### News
Expand Down
40 changes: 40 additions & 0 deletions docs/blog/2023-11-22-trevas-java-17.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
slug: /trevas-java-17
title: Trevas - Java 17
authors: [nicolas]
tags: [Trevas]
---

### News

Trevas 1.2.0 enables Java 17 support.

### Java modules handling

Spark does not support Java modules.

Java 17 client apps, embedding Trevas in Spark mode have to configure `UNNAMED` modules for Spark.

#### Maven

Add to your `pom.xml` file, in the `build > plugins` section:

```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<compilerArgs>
<arg>--add-exports</arg>
<arg>java.base/sun.nio.ch=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
```

#### Docker

```shell
ENTRYPOINT ["java", "--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED", "mainClass"]
```
31 changes: 31 additions & 0 deletions docs/blog/2023-11-22-trevas-persistent-assignment.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
slug: /trevas-persistent-assignments
title: Trevas - Persistent assignments
authors: [nicolas]
tags: [Trevas]
---

### News

Trevas 1.2.0 includes the persistent assignment support: `ds1 <- ds;`.

In Trevas, persistent datasets are represented as `PersistentDataset`.

### Handle `PersistentDataset`

Trevas datasets are represented as `Dataset`.

After running the Trevas engine, you can use persistent datasets with something like:

```
Bindings engineBindings = engine.getContext().getBindings(ScriptContext.ENGINE_SCOPE);
engineBindings.forEach((k, v) -> {
if (v instanceof PersistentDataset) {
fr.insee.vtl.model.Dataset ds = ((PersistentDataset) v).getDelegate();
if (ds instanceof SparkDataset) {
Dataset<Row> sparkDs = ((SparkDataset) ds).getSparkDataset();
// Do what you want with sparkDs
}
}
});
```
2 changes: 1 addition & 1 deletion docs/docs/developer-guide/basic-mode/data-sources/jdbc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jdbc</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/developer-guide/basic-mode/data-sources/json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jackson</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/developer-guide/index-developer-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Card from '@theme/Card';
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-engine</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/developer-guide/spark-mode/index-spark-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The `SparkDataset` data sets can represent statistical tables in a Java applicat
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-spark</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
7 changes: 7 additions & 0 deletions docs/docs/introduction/releases/1.x.x.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ slug: /releases/1.x.x
custom_edit_url: null
---

## Version 1.2.0 - 11/22/23

(See technical release on [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.2.0))

- Java 17 support
- Persistent assignments (`<-`)

## Version 1.1.1 - 09/09/23

(See technical release on [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.1.1))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
slug: /trevas-1.1.0
title: Trevas 1.1.0
slug: /trevas-check_hierarchy
title: Trevas - check_hierarchy
authors: [nicolas]
tags: [Trevas Jupyter]
tags: [Trevas]
---

### Nouveautés
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
slug: /trevas-java-17
title: Trevas - Java 17
authors: [nicolas]
tags: [Trevas]
---

### Nouveautés

Trevas 1.2.0 permet le support de Java 17.

### Gestion des modules Java

Spark ne supporte pas les modules Java.

Les applications clientes en Java 17 embarquant Trevas doivent configurer les `UNNAMED` modules pour Spark.

#### Maven

Ajouter à votre fichier `pom.xml`, dans la section `build > plugins` :

```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<compilerArgs>
<arg>--add-exports</arg>
<arg>java.base/sun.nio.ch=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
```

#### Docker

```shell
ENTRYPOINT ["java", "--add-exports", "java.base/sun.nio.ch=ALL-UNNAMED", "mainClass"]
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
slug: /trevas-persistent-assignment
title: Trevas - Assignements persistants
authors: [nicolas]
tags: [Trevas]
---

### Nouveautés

Trevas 1.2.0 inclut le support des assignements persistants : `ds1 <- ds;`.

Dans Trevas, les datatsets persistants sont représentés par `PersistentDataset`.

### Gérer `PersistentDataset`

Les datasets Trevas sont représentés par `Dataset`.

Après avoir executé le moteur Trevas, vous pouvez utiliser les datasets persistants comme suit :

```
Bindings engineBindings = engine.getContext().getBindings(ScriptContext.ENGINE_SCOPE);
engineBindings.forEach((k, v) -> {
if (v instanceof PersistentDataset) {
fr.insee.vtl.model.Dataset ds = ((PersistentDataset) v).getDelegate();
if (ds instanceof SparkDataset) {
Dataset<Row> sparkDs = ((SparkDataset) ds).getSparkDataset();
// Do what you want with sparkDs
}
}
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jdbc</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jackson</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Card from '@theme/Card';
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-engine</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Les datasets `SparkDataset` permettent de représenter les tables statistiques d
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-spark</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ slug: /releases/1.x.x
custom_edit_url: null
---

## Version 1.2.0 - 22/11/23

(Voir la note de livraison technique sur [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.2.0))

- Support de Java 17
- Assignements persistants (`<-`)

## Version 1.1.1 - 09/09/23

(Voir la note de livraison technique sur [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.1.1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jdbc</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jackson</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Card from '@theme/Card';
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-engine</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-spark</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ slug: /releases/1.x.x
custom_edit_url: null
---

## Versjon 1.2.0 - 11/22/23

(Se teknisk utgivelse på [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.2.0))

- Java 17-støtte
- Vedvarende oppdrag (`<-`)

## Versjon 1.1.1 - 09/09/23

(Se teknisk utgivelse på [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.1.1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jdbc</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ custom_edit_url: null
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-jackson</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Card from '@theme/Card';
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-engine</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Les datasets `SparkDataset` permettent de représenter les tables statistiques d
<dependency>
<groupId>fr.insee.trevas</groupId>
<artifactId>vtl-spark</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ custom_edit_url: null
pagination_prev: null
---

## 版本 1.2.0 - 22/11/23

(请参阅技术发布 [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.2.0))

- Java 17 支持
- 持久分配 (`<-`)

## 版本 1.1.1 - 09/09/23

(请参阅技术发布 [Github](https://github.com/InseeFr/Trevas/releases/tag/v1.1.1))
Expand Down
Loading

0 comments on commit a0dbc19

Please sign in to comment.