Skip to content

Commit e70ce80

Browse files
committed
Merge branch 'release/2.5.0'
2 parents 7d1a336 + 2cfabe2 commit e70ce80

219 files changed

Lines changed: 10899 additions & 3969 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,8 @@ jobs:
2727
${{ runner.os }}-maven-
2828
- name: Verify code format with Spotless
2929
run: mvn spotless:check
30-
test-excluding-vtl-sdmx:
31-
name: Run Trevas tests excluding vtl-sdmx module
32-
runs-on: ubuntu-latest
33-
needs: format
34-
steps:
35-
- uses: actions/checkout@v6
36-
with:
37-
fetch-depth: 0
38-
- name: Set up Maven Central Repository
39-
uses: actions/setup-java@v5
40-
with:
41-
java-version: 17
42-
distribution: "adopt"
43-
# Also exclude vtl-prov because of vtl-sdmx scope test dependency
44-
- name: Build parser stack (vtl-antlr + vtl-parser)
45-
run: mvn install -pl vtl-antlr,vtl-parser -am -DskipTests
46-
- name: Test
47-
run: mvn test -pl '!vtl-sdmx,!vtl-prov'
4830
test:
4931
name: Run Trevas tests
50-
if: (github.repository != 'InseeFr/Trevas' &&
51-
github.event_name == 'push') ||
52-
(github.event.pull_request.head.repo.fork == true ||
53-
(github.event.pull_request.head.repo.fork == false &&
54-
github.event.pull_request.merged == false))
5532
runs-on: ubuntu-latest
5633
needs: format
5734
steps:
@@ -63,15 +40,6 @@ jobs:
6340
with:
6441
java-version: 17
6542
distribution: "adopt"
66-
- uses: s4u/maven-settings-action@v4.0.0
67-
with:
68-
githubServer: false
69-
servers: |
70-
[{
71-
"id": "Github",
72-
"username": "${{ secrets.GH_PACKAGES_USERNAME }}",
73-
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
74-
}]
7543
- name: Build parser stack (vtl-antlr + vtl-parser)
7644
run: mvn install -pl vtl-antlr,vtl-parser -am -DskipTests
7745
- name: Test
@@ -110,15 +78,6 @@ jobs:
11078
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
11179
restore-keys: |
11280
${{ runner.os }}-maven-
113-
- uses: s4u/maven-settings-action@v4.0.0
114-
with:
115-
githubServer: false
116-
servers: |
117-
[{
118-
"id": "Github",
119-
"username": "${{ secrets.GH_PACKAGES_USERNAME }}",
120-
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
121-
}]
12281
# Install vtl-antlr + vtl-parser first, then exclude vtl-parser from the reactor so
12382
# dependent modules resolve the installed jar, not target/classes.
12483
- name: Test ${{ matrix.module }} (and upstream modules)
@@ -138,15 +97,6 @@ jobs:
13897
with:
13998
java-version: 17
14099
distribution: "adopt"
141-
- uses: s4u/maven-settings-action@v4.0.0
142-
with:
143-
githubServer: false
144-
servers: |
145-
[{
146-
"id": "Github",
147-
"username": "${{ secrets.GH_PACKAGES_USERNAME }}",
148-
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
149-
}]
150100
- name: Test
151101
run: mvn package
152102
# test-sonar-package:
@@ -168,15 +118,6 @@ jobs:
168118
# with:
169119
# java-version: 17
170120
# distribution: "adopt"
171-
# - uses: s4u/maven-settings-action@v3.0.0
172-
# with:
173-
# githubServer: false
174-
# servers: |
175-
# [{
176-
# "id": "Github",
177-
# "username": "${{ secrets.GH_PACKAGES_USERNAME }}",
178-
# "password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
179-
# }]
180121
# - name: Test, package and analyze with maven & SonarCloud
181122
# run: mvn verify sonar:sonar -Pcoverage -Dsonar.projectKey=InseeFr_Trevas -Dsonar.organization=inseefr -Dsonar.host.url=https://sonarcloud.io
182123
# env:
@@ -200,11 +141,6 @@ jobs:
200141
githubServer: false
201142
servers: |
202143
[
203-
{
204-
"id": "Github",
205-
"username": "${{ secrets.GH_PACKAGES_USERNAME }}",
206-
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
207-
},
208144
{
209145
"id": "central",
210146
"username": "${{ secrets.MAVEN_CENTRAL_USERNAME }}",

.github/workflows/tck-vtl-tf-spark3.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
TCK_REPORT_TITLE: 'TCK VTL v2.1 (Spark 3)'
15+
VTL_TCK_BRANCH: fix/doc-examples
1516

1617
steps:
1718
- name: Checkout main project
1819
uses: actions/checkout@v6
1920
with:
2021
fetch-depth: 0
2122

22-
- name: Clone vtl spec repo (branch fix/tck-2.1)
23-
run: git clone --branch fix/tck-2.1 https://github.com/sdmx-twg/vtl.git
23+
- name: Clone vtl spec repo
24+
run: git clone --depth 1 --branch "${VTL_TCK_BRANCH}" https://github.com/sdmx-twg/vtl.git
2425

2526
- name: Install Python 3
2627
uses: actions/setup-python@v6
@@ -42,16 +43,6 @@ jobs:
4243
distribution: 'temurin'
4344
java-version: '17'
4445

45-
- uses: s4u/maven-settings-action@v4.0.0
46-
with:
47-
githubServer: false
48-
servers: |
49-
[{
50-
"id": "Github",
51-
"username": "${{ secrets.GH_PACKAGES_USERNAME }}",
52-
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
53-
}]
54-
5546
- name: Cache Maven packages
5647
uses: actions/cache@v5
5748
with:
@@ -75,7 +66,8 @@ jobs:
7566
if: always()
7667
with:
7768
name: JUnit (Spark 3)
78-
path: coverage/target/surefire-reports/*.xml
69+
# TCK suite only (exclude coverage unit tests: TckDatasetComparisonTest, …)
70+
path: coverage/target/surefire-reports/TEST-fr.insee.vtl.coverage.TCKTest.xml
7971
reporter: java-junit
8072
only-summary: 'true'
8173
max-annotations: 0

.github/workflows/tck-vtl-tf-spark4.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
TCK_REPORT_TITLE: 'TCK VTL v2.1 (Spark 4)'
15+
VTL_TCK_BRANCH: fix/doc-examples
1516

1617
steps:
1718
- name: Checkout main project
1819
uses: actions/checkout@v6
1920
with:
2021
fetch-depth: 0
2122

22-
- name: Clone vtl spec repo (branch fix/tck-2.1)
23-
run: git clone --branch fix/tck-2.1 https://github.com/sdmx-twg/vtl.git
23+
- name: Clone vtl spec repo
24+
run: git clone --depth 1 --branch "${VTL_TCK_BRANCH}" https://github.com/sdmx-twg/vtl.git
2425

2526
- name: Install Python 3
2627
uses: actions/setup-python@v6
@@ -42,16 +43,6 @@ jobs:
4243
distribution: 'temurin'
4344
java-version: '17'
4445

45-
- uses: s4u/maven-settings-action@v4.0.0
46-
with:
47-
githubServer: false
48-
servers: |
49-
[{
50-
"id": "Github",
51-
"username": "${{ secrets.GH_PACKAGES_USERNAME }}",
52-
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}"
53-
}]
54-
5546
- name: Cache Maven packages
5647
uses: actions/cache@v5
5748
with:
@@ -75,7 +66,8 @@ jobs:
7566
if: always()
7667
with:
7768
name: JUnit (Spark 4)
78-
path: coverage/target/surefire-reports/*.xml
69+
# TCK suite only (exclude coverage unit tests: TckDatasetComparisonTest, …)
70+
path: coverage/target/surefire-reports/TEST-fr.insee.vtl.coverage.TCKTest.xml
7971
reporter: java-junit
8072
only-summary: 'true'
8173
max-annotations: 0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
target/
2+
.cache/
23
**/.DS_Store
34
**/*.iml
45
**/.idea

coverage/README.md

Lines changed: 104 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,120 @@
1-
# 📊 Coverage
1+
# Coverage — TCK VTL local
22

3-
## 🧪 TCK (Technology Compatibility Kit)
3+
Module Maven qui exécute le **Technology Compatibility Kit (TCK)** VTL v2.1 contre Trevas (moteur + backend Spark).
44

5-
We are working on a suite of compatibility tests to ensure conformance with the VTL specification across implementations.
5+
**Point d’entrée JUnit :** `fr.insee.vtl.coverage.TCKTest`
6+
**Fichier requis :** `coverage/src/main/resources/v2.1.zip` (non versionné — à générer une fois)
67

7-
🛠️ _Work in Progress_
8+
---
89

9-
### Issues/discussions to follow
10+
## Démarrage rapide (depuis la racine du dépôt Trevas)
1011

11-
- [junit5](https://github.com/junit-team/junit5/discussions/4504#discussioncomment-13046641)
12-
- [surefire](https://github.com/apache/maven-surefire/issues/835)
13-
- [dorny/test-reporter](https://github.com/dorny/test-reporter/issues/580)
12+
Prérequis : **JDK 17+**, **Maven 3.9+**, **Python 3**, accès réseau (clone GitHub la première fois).
1413

15-
### Temporary run procedure
14+
```shell
15+
# 1) Générer le zip TCK (une fois, ou après mise à jour des exemples SDMX-VTL)
16+
./coverage/scripts/refresh_tck_zip.sh
17+
18+
# 2) Compiler les modules dont dépend coverage (dont vtl-csv, vtl-spark, vtl-engine…)
19+
mvn clean install -pl coverage -am -DskipTests --batch-mode
20+
21+
# 3) Lancer le TCK (Spark 3 par défaut)
22+
mvn test -pl coverage --batch-mode
23+
```
1624

17-
While [TCK](https://github.com/sdmx-twg/vtl/pull/565) is not automated in the VTL TF repository, we have to build the input source manually.
25+
Vérifier que le zip est bien là avant l’étape 3 :
1826

1927
```shell
20-
git clone https://github.com/sdmx-twg/vtl.git
21-
cd vtl/scripts
22-
DOC_VERSION=v2.1 python3 generate_tck_files.py
28+
test -f coverage/src/main/resources/v2.1.zip && echo OK || echo "manquant — relancer refresh_tck_zip.sh"
2329
```
2430

25-
A zip will be created at `tck/v2.1.zip`.
31+
### Spark 4
2632

27-
Move it in Trevas resources:
33+
```shell
34+
mvn clean install -pl coverage -am -DskipTests --batch-mode -Pspark4-tck
35+
mvn test -pl coverage --batch-mode -Pspark4-tck
36+
```
37+
38+
### Rapport lisible après les tests
2839

2940
```shell
30-
mv vtl/tck/v2.1.zip trevas/coverage/src/main/resources
41+
python3 coverage/scripts/prettify_tck_surefire_xml.py
42+
python3 coverage/scripts/render_tck_job_summary.py
43+
# → coverage/target/tck-scripts-report.md
3144
```
3245

33-
You are now able to run `TCKTest`.
46+
XML Surefire principal : `coverage/target/surefire-reports/TEST-fr.insee.vtl.coverage.TCKTest.xml`
47+
48+
---
49+
50+
## Pourquoi `mvn test -pl coverage` seul échoue souvent
51+
52+
| Symptôme | Cause | Correctif |
53+
|----------|--------|-----------|
54+
| `FileNotFoundException` / zip introuvable | Pas de `v2.1.zip` | `./coverage/scripts/refresh_tck_zip.sh` |
55+
| `ClassNotFoundException: fr.insee.vtl.csv.CsvDatasetValidator` | Module `vtl-csv` non installé | `mvn install -pl vtl-csv -am -DskipTests` ou **toujours** utiliser `-am` avec `coverage` |
56+
| Tests TCK absents / 0 test | Classpath incomplet | `mvn clean install -pl coverage -am -DskipTests` puis `mvn test -pl coverage` |
57+
58+
**Règle :** pour `coverage`, utiliser **`-pl coverage -am`** (`-am` = *also make* : construit tous les modules requis du réacteur, dont `vtl-csv`).
59+
60+
---
61+
62+
## D’où vient le TCK ?
63+
64+
Les cas sont extraits des exemples du manuel VTL SDMX
65+
(`v2.1/docs/reference_manual/operators/**/examples`).
66+
67+
Branche Git pinée (fixtures CSV/JSON corrigées) : **`fix/doc-examples`**
68+
https://github.com/sdmx-twg/vtl/tree/fix/doc-examples
69+
70+
Le script local reproduit ce que fait la CI :
71+
72+
```shell
73+
./coverage/scripts/refresh_tck_zip.sh
74+
```
75+
76+
→ clone `sdmx-twg/vtl`, exécute `scripts/generate_tck_files.py`, copie `tck/v2.1.zip` vers `coverage/src/main/resources/v2.1.zip`.
77+
78+
Variables optionnelles :
79+
80+
```shell
81+
VTL_TCK_BRANCH=fix/doc-examples ./coverage/scripts/refresh_tck_zip.sh
82+
DOC_VERSION=v2.1 VTL_TCK_BRANCH=master ./coverage/scripts/refresh_tck_zip.sh
83+
```
84+
85+
### Génération manuelle (équivalent)
86+
87+
```shell
88+
git clone --depth 1 --branch fix/doc-examples https://github.com/sdmx-twg/vtl.git /tmp/vtl-tck
89+
DOC_VERSION=v2.1 python3 /tmp/vtl-tck/scripts/generate_tck_files.py
90+
mkdir -p coverage/src/main/resources
91+
cp /tmp/vtl-tck/tck/v2.1.zip coverage/src/main/resources/v2.1.zip
92+
```
93+
94+
---
95+
96+
## Lancer un sous-ensemble (debug)
97+
98+
```shell
99+
# un seul cas (adapter le nom affiché dans les logs / XML)
100+
mvn test -pl coverage -Dtest='TCKTest#leafCases' --batch-mode
101+
102+
# tests unitaires du module coverage (hors TCK long)
103+
mvn test -pl coverage -Dtest='!TCKTest' --batch-mode
104+
```
105+
106+
---
107+
108+
## CI
109+
110+
Workflows : `.github/workflows/tck-vtl-tf-spark3.yml`, `tck-vtl-tf-spark4.yml`
111+
112+
En résumé : checkout Trevas → génération `v2.1.zip``mvn clean install -pl coverage -am -DskipTests``mvn test -pl coverage` → rapport Surefire / résumé Markdown.
113+
114+
---
115+
116+
## Liens
117+
118+
- [TCK automation PR (VTL TF)](https://github.com/sdmx-twg/vtl/pull/565)
119+
- [Notes chargeur CSV TCK](../roadmap/tck-csv-loader.md)
120+
- JUnit / reporting : [junit5](https://github.com/junit-team/junit5/discussions/4504#discussioncomment-13046641), [surefire](https://github.com/apache/maven-surefire/issues/835), [dorny/test-reporter](https://github.com/dorny/test-reporter/issues/580)

0 commit comments

Comments
 (0)