Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
21dccf4
feat: new endpoints to save raw response using the modele filiere lib…
loichenninger Nov 12, 2025
3ec9600
fix: remove unnecessary bracket
loichenninger Nov 12, 2025
d5e5464
chore: add log
loichenninger Nov 12, 2025
4f4a9d7
test: add new endpoint for testing purpose
loichenninger Nov 12, 2025
71f3429
feat: add @valid on endpoint
loichenninger Nov 12, 2025
8d7eec1
feat: change raw responses urls and status
loichenninger Nov 12, 2025
eee89db
feat: WIP implementing new model of raw responses
loichenninger Nov 14, 2025
4bb9271
feat: WIP new modele filiere
loichenninger Nov 17, 2025
bc6c80f
feat: WIP still moving to modelefiliere
loichenninger Nov 20, 2025
95b7a83
feat: WIP modelefiliere contextual variables
loichenninger Nov 21, 2025
ef1204f
feat: WIP modelefiliere add last extraction date
loichenninger Nov 21, 2025
11eccdc
feat: WIP modelefiliere add lunaticmodel
loichenninger Nov 24, 2025
fdb3e3e
chore: delete unused code
loichenninger Nov 24, 2025
d4151c3
feat: WIP modelefiliere add questionnaireMetadata and correct typo "p…
loichenninger Nov 24, 2025
0703740
Merge branch 'main' into devModeleFiliere
loichenninger Nov 25, 2025
3d3dd5b
fix: questionnaire with new collecttionInstrumentId were not listed
loichenninger Nov 25, 2025
70aba98
fix: raw responses was not updated with processDate
loichenninger Nov 25, 2025
456dba4
fix; collectionInstrumentId in lunaticmodels was not persisted on insert
loichenninger Nov 25, 2025
72aa21d
fix: fixes for KW
loichenninger Dec 1, 2025
04ff521
fix: fix new ids
loichenninger Dec 1, 2025
f19f025
fix: missing@Mapper annotation
loichenninger Dec 2, 2025
242ab9e
fix: improve performance
loichenninger Dec 3, 2025
cafdcaf
chore: modelefiliere bump to 2.0.0
loichenninger Dec 3, 2025
8fd8b91
chore: sonar
loichenninger Dec 4, 2025
e8c3e86
chore: update branch from main
loichenninger Dec 4, 2025
f03b20d
style: fix vocabulary
alicela Dec 4, 2025
aaff235
style : fix some issues
alicela Dec 4, 2025
55d63e8
style: deprecate some methods
alicela Dec 4, 2025
ebfa906
refactor: change requestparam to pathvariable
alicela Dec 4, 2025
4182e74
style : remove unused
alicela Dec 4, 2025
358a3af
feat: new endpoint to list collection instrument ids containing unpro…
loichenninger Dec 4, 2025
b615683
Merge branch 'devModeleFiliere' of https://github.com/InseeFr/Genesis…
alicela Dec 5, 2025
b752d4f
style: sonar
alicela Dec 5, 2025
fd64a60
style: change for lookup
alicela Dec 5, 2025
6571774
style : add deprecated since
alicela Dec 5, 2025
00d942a
feat: add endpoints necessary for automized processing
loichenninger Dec 5, 2025
648843f
Merge branch 'devModeleFiliere' of https://github.com/InseeFr/Genesis…
loichenninger Dec 5, 2025
81136c9
fix: filter on process date the raw responses tthat needs to be proce…
loichenninger Dec 5, 2025
70aac0c
fix: retrieve context on new document
loichenninger Dec 5, 2025
fe12378
fix: get context using either collectionInstrumentId or campaignId
loichenninger Dec 5, 2025
99c2977
fix: typo
loichenninger Dec 5, 2025
f59fb56
fix: dataProcessingContext
loichenninger Dec 5, 2025
bf834ab
fix: typo
alexisszmundy Dec 11, 2025
4667c63
Merge branch 'main' into devModeleFiliere
alexisszmundy Dec 11, 2025
a6be1ef
refactor: add collectionInstrumentId to data context
loichenninger Dec 12, 2025
89ce666
fix: continue if states null or empty
alexisszmundy Dec 17, 2025
0742eda
refactor : simplify condition
alexisszmundy Dec 17, 2025
1f6e684
test: updated mapper test to include old documents
alexisszmundy Dec 18, 2025
36dd2ab
Merge branch 'main' into devFixUsualSurveyUnitId
alexisszmundy Dec 18, 2025
26b5a2a
test: adapted tests to use the current conditions
alexisszmundy Dec 18, 2025
283e31d
fix: little v on default collection instrument id
alexisszmundy Dec 19, 2025
c307047
fix: sampletest paradata majorcase V
alexisszmundy Dec 19, 2025
99b44aa
test: KO test for collection instrument interrogationIds
alexisszmundy Dec 19, 2025
9b0e690
test: check interrogationIds
alexisszmundy Dec 19, 2025
d2af7ea
fix: no interrogationId since returned if new modele
alexisszmundy Dec 19, 2025
3fe8905
test: KO test for usualSurveyUnitId bug
alexisszmundy Dec 19, 2025
e1a5afb
fix: export usualSurveyUnitId if atleast one doc is not null
alexisszmundy Dec 19, 2025
332dc12
doc: modele filiere changelog
alexisszmundy Dec 19, 2025
1940fd6
Merge branch 'main' into devModeleFiliere
alexisszmundy Dec 19, 2025
4d1e88b
Merge branch 'devModeleFiliere' into devFixUsualSurveyUnitId
alexisszmundy Dec 19, 2025
5d902fa
feat: unit tests shortcut for intelliJ
alexisszmundy Dec 19, 2025
41602ae
chore: disabled cucumber features (not executed during ci)
alexisszmundy Dec 19, 2025
4023687
refactor: rollbacked wrong renaming on lunaticjsonrawdata service
alexisszmundy Dec 19, 2025
7cdeb02
refactor: use relevant id for old process
alexisszmundy Dec 19, 2025
78afbfe
feat: feat update modele filiere 2.1.0
aitkarra Dec 22, 2025
8a86b1b
Merge branch 'main' into devGetUnprocessOldModelQuestionnaires
alexisszmundy Dec 22, 2025
874669b
feat: get unprocessed questionnaire Ids lunatic json raw data
alexisszmundy Dec 22, 2025
736b20a
fix: use mongoTemplate to get distinct
alexisszmundy Dec 22, 2025
10b45fb
fix: modelefiliere-2.1.0.jar is not accessible from the INSEE nexus
aitkarra Dec 22, 2025
cb578db
feat: add endpoint raw-responses
aitkarra Dec 22, 2025
a8f4542
test: bug reproducing
alexisszmundy Dec 22, 2025
3e8c4cc
test: exceptions tests and nested
alexisszmundy Dec 22, 2025
5085be9
fix: questionnaire state into survey unit model
alexisszmundy Dec 22, 2025
3639846
test: validation date time KO test
alexisszmundy Dec 22, 2025
d003eef
refactor: tests methods extractions
alexisszmundy Dec 22, 2025
dcb99e2
refactor: inline
alexisszmundy Dec 22, 2025
188d756
refactor: method names camel case
alexisszmundy Dec 22, 2025
e1fab5e
fix: validation date parsing
alexisszmundy Dec 22, 2025
12de4f3
Merge branch 'main' into devModeleFiliere
alexisszmundy Dec 22, 2025
fdae91f
Merge branch 'main' into devFixUsualSurveyUnitId
alexisszmundy Dec 22, 2025
111af1e
Merge branch 'main' into feat-update-modele-filiere-2-1-0
alexisszmundy Dec 22, 2025
7216b17
Merge branch 'main' into devModeleFiliere
alexisszmundy Dec 22, 2025
62e400a
Merge branch 'devModeleFiliere' into devFixUsualSurveyUnitId
alexisszmundy Dec 22, 2025
c889181
Merge branch 'devFixUsualSurveyUnitId' into feat-update-modele-filier…
alexisszmundy Dec 22, 2025
b1efc20
Merge pull request #363 from InseeFr/feat-update-modele-filiere-2-1-0
alexisszmundy Dec 22, 2025
f81fdf7
Merge branch 'devFixUsualSurveyUnitId' into devGetUnprocessOldModelQu…
alexisszmundy Dec 22, 2025
5b241df
Merge branch 'devFixUsualSurveyUnitId' into devFixNewVariablesExport
alexisszmundy Dec 22, 2025
6739f4a
Merge branch 'devFixUsualSurveyUnitId' into devGetUnprocessOldModelQu…
alexisszmundy Dec 22, 2025
f89d126
get RawResponseData + LunaticJsonRawData by InterrogationId
Hajarel-moukh Dec 22, 2025
8b9e84c
Merge remote-tracking branch 'origin/devFixUsualSurveyUnitId' into de…
Hajarel-moukh Dec 23, 2025
b850c95
add some modifications
Hajarel-moukh Dec 23, 2025
d1281a0
add modifications after CR
Hajarel-moukh Dec 23, 2025
eb544da
add RequiredArgsConstructor annotation
Hajarel-moukh Jan 5, 2026
6acffa2
refacto
Hajarel-moukh Jan 5, 2026
5ad43ab
update bpm version
Hajarel-moukh Jan 5, 2026
c2aae1b
update bpm version
Hajarel-moukh Jan 5, 2026
da809cd
refacto
Hajarel-moukh Jan 5, 2026
15aa1cc
upgrade BPM version to 23
Hajarel-moukh Jan 5, 2026
8b4c923
fix: don't send questionnaire id when spec not found
alexisszmundy Jan 5, 2026
e7c2283
chore: bump BPM
alexisszmundy Jan 5, 2026
77804b5
feat: add spec check to rawResponse
alexisszmundy Jan 5, 2026
f0661a4
fix: find modes in repository
alexisszmundy Jan 5, 2026
c8d5173
Merge pull request #365 from InseeFr/devFixNewVariablesExport
alexisszmundy Jan 5, 2026
bfa305c
Merge branch 'devFixUsualSurveyUnitId' into dev/combined-rawdata
alexisszmundy Jan 5, 2026
4aa5765
fix: RawResponse to rawResponseModel
alexisszmundy Jan 5, 2026
b9370dc
Merge pull request #367 from InseeFr/dev/combined-rawdata
alexisszmundy Jan 5, 2026
8b90338
refactor: refactos after CR
alexisszmundy Jan 5, 2026
7dfea36
Merge branch 'devFixUsualSurveyUnitId' into feat-add-endpoint-raw-res…
alexisszmundy Jan 5, 2026
eecb0d5
fix: more RawResponse to RawResponseModel
alexisszmundy Jan 5, 2026
4caf6ca
Merge pull request #364 from InseeFr/feat-add-endpoint-raw-responses-…
alexisszmundy Jan 5, 2026
2f7a4ba
Merge branch 'devFixUsualSurveyUnitId' into devGetUnprocessOldModelQu…
alexisszmundy Jan 5, 2026
c378450
fix: fixes after merge
alexisszmundy Jan 5, 2026
5e013d8
fix: wrong collection for get questionnaire id
alexisszmundy Jan 5, 2026
df2f401
Merge pull request #362 from InseeFr/devGetUnprocessOldModelQuestionn…
alexisszmundy Jan 5, 2026
e059dd1
Merge pull request #361 from InseeFr/devFixUsualSurveyUnitId
alexisszmundy Jan 5, 2026
16e2a9d
fix: Get modes with ModeDTO
alexisszmundy Jan 6, 2026
c5d26bd
fix: missing questionnaireState and validationState in doc
alexisszmundy Jan 6, 2026
2431e9a
fix: get last not null verificationDate and QuestionnaireState
alexisszmundy Jan 6, 2026
70d529d
fix: perret url changed
loichenninger Jan 6, 2026
fff7f43
fix: update processDate if empty data
alexisszmundy Jan 6, 2026
3c1b60f
Merge branch 'main' into devModeleFiliere
alexisszmundy Jan 7, 2026
25ad63a
fix: Duplicate JSON validator dependancy
alexisszmundy Jan 7, 2026
e76af78
chore: removed modele filiere JSON debug endpoint
alexisszmundy Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
distribution: 'temurin'
java-version: '21'

- name: install model filiere
run: mvn install:install-file -Dfile="$(pwd)/libs/modelefiliere-2.1.0.jar" -DgroupId=fr.insee -DartifactId=modelefiliere -Dversion=2.1.0 -Dpackaging=jar -DgeneratePom=true

- name: Clone BPM
uses: actions/checkout@v6
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
distribution: "temurin"
java-version: "21"

- name: install model filiere
run: mvn install:install-file -Dfile="$(pwd)/libs/modelefiliere-2.1.0.jar" -DgroupId=fr.insee -DartifactId=modelefiliere -Dversion=2.1.0 -Dpackaging=jar -DgeneratePom=true

- name: Clone BPM
uses: actions/checkout@master
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
distribution: 'temurin'
cache: maven

- name: install model filiere
run: mvn install:install-file -Dfile="$(pwd)/libs/modelefiliere-2.1.0.jar" -DgroupId=fr.insee -DartifactId=modelefiliere -Dversion=2.1.0 -Dpackaging=jar -DgeneratePom=true

- name: Clone BPM
uses: actions/checkout@master
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scheduled-version-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ jobs:
fi
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT

- name: install model filiere
run: mvn install:install-file -Dfile="$(pwd)/libs/modelefiliere-2.1.0.jar" -DgroupId=fr.insee -DartifactId=modelefiliere -Dversion=2.1.0 -Dpackaging=jar -DgeneratePom=true

- name: Clone BPM
uses: actions/checkout@master
with:
Expand Down
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.4/maven-wrapper-3.3.4.jar
13 changes: 13 additions & 0 deletions .runtests/Unit tests GENESIS.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Unit tests GENESIS" type="JUnit" factoryName="JUnit">
<module name="genesis-api" />
<option name="PACKAGE_NAME" value="fr.insee.genesis" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="directory" />
<dir value="$PROJECT_DIR$/src/test/java/fr/insee/genesis" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## 2.0.0 [TODO]
### Changed
- Use filière model

## 1.13.0 [2025-12-04]
### Changed
- New raw data process endpoint
Expand Down
Binary file added libs/modelefiliere-2.1.0.jar
Binary file not shown.
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<pitest.version>1.22.0</pitest.version>
<pitest.junit.version>1.2.3</pitest.junit.version>
<jackson.version>2.19.0</jackson.version>
<bpm.version>1.0.22</bpm.version>
<bpm.version>1.0.23</bpm.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -98,7 +98,11 @@
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>

<dependency>
<groupId>fr.insee</groupId>
<artifactId>modelefiliere</artifactId>
<version>2.1.0</version>
</dependency>
<!-- XML libraries -->
<!-- XML-XSLT with Saxon -->
<dependency>
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/fr/insee/genesis/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public class Constants {
public static final String MONGODB_CONTEXTUAL_EXTERNAL_COLLECTION_NAME = "editedExternal";
public static final String LOOP_NAME_PREFIX = "BOUCLE";
public static final String MONGODB_RESPONSE_COLLECTION_NAME = "responses";
public static final String MONGODB_RESPONSE_RAW_COLLECTION_NAME = "lunaticjsondata";
public static final String MONGODB_VARIABLETYPE_COLLECTION_NAME = "variabletypes";
public static final String MONGODB_RAW_RESPONSES_COLLECTION_NAME = "rawResponses";
public static final String VOLUMETRY_FOLDER_NAME = "genesis_volumetries";
public static final String VOLUMETRY_FILE_SUFFIX = "_VOLUMETRY";
public static final String VOLUMETRY_RAW_FILE_SUFFIX = "_RAW_VOLUMETRY";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class LunaticJsonAdapter {

public SurveyUnitModel convert(LunaticJsonSurveyUnit su){
return SurveyUnitModel.builder()
.questionnaireId(su.getQuestionnaireId())
.collectionInstrumentId(su.getQuestionnaireId())
.campaignId("")
.interrogationId(su.getInterrogationId())
.state(DataState.COLLECTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static List<SurveyUnitModel> convert(LunaticXmlSurveyUnit su, VariablesMa
*/
private static SurveyUnitModel getStateDataFromSurveyUnit(LunaticXmlSurveyUnit su, VariablesMap variablesMap, String campaignId, DataState dataState, Mode mode) {
SurveyUnitModel surveyUnitModel = SurveyUnitModel.builder()
.questionnaireId(su.getQuestionnaireModelId().toUpperCase())
.collectionInstrumentId(su.getQuestionnaireModelId().toUpperCase())
.campaignId(campaignId)
.interrogationId(su.getId())
.state(dataState)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

@Builder
public record ScheduleDto (String surveyName,
String collectionInstrumentId,
LocalDateTime lastExecution,
List<KraftwerkExecutionSchedule> kraftwerkExecutionScheduleList
){}
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,28 @@

import fr.insee.genesis.domain.model.surveyunit.VariableModel;
import fr.insee.genesis.domain.model.surveyunit.Mode;
import fr.insee.modelefiliere.RawResponseDto;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Builder
@Data
public class SurveyUnitSimplified {

private String questionnaireId;
private String collectionInstrumentId;
/**
* @deprecated We will not receive this piece of information anymore
*/
@Deprecated(forRemoval = true, since = "2026-01-01")
private String campaignId;
private String interrogationId;
private String surveyUnitId;
private String usualSurveyUnitId;
private Mode mode;
private LocalDateTime validationDate;
private RawResponseDto.QuestionnaireStateEnum questionnaireState;
private List<VariableModel> variablesUpdate;
private List<VariableModel> externalVariables;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package fr.insee.genesis.controller.dto.rawdata;

import fr.insee.genesis.domain.model.surveyunit.rawdata.LunaticJsonRawDataModel;
import fr.insee.genesis.domain.model.surveyunit.rawdata.RawResponseModel;

import java.util.List;

public record CombinedRawDataDto(
List<RawResponseModel> rawResponseModels,
List<LunaticJsonRawDataModel> lunaticRawDataModels
) {
}

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ public List<ScheduleDto> dataProcessingContextListToScheduleDtoList(List<DataPro
}
return dtos;
}

public DataProcessingContextModel scheduleDtoToDataProcessingContext (ScheduleDto schedule){
return DataProcessingContextModel.builder()
.partitionId(schedule.surveyName())
.collectionInstrumentId(schedule.collectionInstrumentId())
.lastExecution(schedule.lastExecution())
.kraftwerkExecutionScheduleList(schedule.kraftwerkExecutionScheduleList())
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package fr.insee.genesis.controller.rest;

import fr.insee.genesis.controller.dto.rawdata.CombinedRawDataDto;
import fr.insee.genesis.domain.service.rawdata.CombinedRawDataService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Slf4j
@Controller
@RequestMapping(path = "/combined-raw-data" )
@RequiredArgsConstructor
public class CombinedRawDataController {

private static final String INTERROGATION_ID = "interrogationId";
private final CombinedRawDataService combinedRawDataService;


@Operation(summary = "Retrieve combined raw responses and Lunatic raw data for a given interrogationId")
@GetMapping
@PreAuthorize("hasAnyRole('ADMIN', 'USER_PLATINE')")
public ResponseEntity<CombinedRawDataDto> getCombinetRawData(
@RequestParam(INTERROGATION_ID) String interrogationId
){
CombinedRawDataDto data = combinedRawDataService.getCombinedRawDataByInterrogationId(interrogationId);

if (data.rawResponseModels().isEmpty()) {
return ResponseEntity.notFound().build();
}

return ResponseEntity.ok(data);
}

}
Loading
Loading