-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from InseeFr/develop
Merging develop in master
- Loading branch information
Showing
23 changed files
with
6,150 additions
and
4,936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build and upload Release Candidate | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'develop' | ||
|
||
jobs: | ||
build-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Build and test with Maven | ||
run: mvn install -Djar.finalName="lunatic-model" -B -V --file pom.xml | ||
- name: Get current version | ||
id: version | ||
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{steps.version.outputs.prop}}-rc | ||
release_name: "Release Candidate ${{steps.version.outputs.prop}}" | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: target/lunatic-model.jar | ||
asset_name: lunatic-model.jar | ||
asset_content_type: application/java-archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Lunatic CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
|
||
build-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
# Because of gitbook support | ||
node-version: 10 | ||
- run: | | ||
npm i -g gitbook-cli | ||
gitbook install | ||
gitbook build | ||
working-directory: ./docs/ | ||
- run: cp -a ./docs/_book/. ./deploy/ | ||
- name: Upload deploy artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: deploy | ||
path: deploy/ | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build-assets | ||
steps: | ||
- name: Download deploy artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: deploy | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: . |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Les données | ||
|
||
## Données au format JSON | ||
|
||
```json | ||
{ | ||
"COLLECTED": { | ||
"variable1": { | ||
"PREVIOUS": "Previous", | ||
"COLLECTED": "Collected", | ||
"FORCED": null, | ||
"EDITED": 34, | ||
"INPUTED": "Inputed" | ||
}, | ||
"variable2": { | ||
"PREVIOUS": ["previous individu1", "previous individu2"], | ||
"COLLECTED": ["individu1", "individu2"] | ||
}, | ||
"variable3": { | ||
"PREVIOUS": [ | ||
["previous individu1", "previous individu2"], | ||
["previous individu3", "previous individu4"] | ||
], | ||
"COLLECTED": [ | ||
["individu1", "individu2"], | ||
["individu3", "individu4"] | ||
] | ||
}, | ||
"variable4": { | ||
"COLLECTED": [ | ||
[ | ||
[true, true], | ||
["individu3", "individu4"] | ||
], | ||
[ | ||
["individu5", "individu6"], | ||
["individu7", "individu8"] | ||
] | ||
] | ||
} | ||
}, | ||
"EXTERNAL": { | ||
"variableExt1": ["External var", "External var2"], | ||
"variableExt2": "External var2" | ||
} | ||
} | ||
``` | ||
|
||
## Donnéee équivalente au format XML | ||
|
||
```xml | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Data> | ||
<COLLECTED> | ||
<variable1> | ||
<PREVIOUS type="string">Previous</PREVIOUS> | ||
<COLLECTED type="string">Collected</COLLECTED> | ||
<FORCED type="null"/> | ||
<EDITED type="number">34</EDITED> | ||
<INPUTED type="string">Inputed</INPUTED> | ||
</variable1> | ||
<variable2> | ||
<PREVIOUS> | ||
<PREVIOUS type="string">previous individu1</PREVIOUS> | ||
<PREVIOUS type="string">previous individu2</PREVIOUS> | ||
</PREVIOUS> | ||
<COLLECTED> | ||
<COLLECTED type="string">individu1</COLLECTED> | ||
<COLLECTED type="string">individu2</COLLECTED> | ||
</COLLECTED> | ||
</variable2> | ||
<variable3> | ||
<PREVIOUS> | ||
<PREVIOUS> | ||
<PREVIOUS type="string">previous individu1</PREVIOUS> | ||
<PREVIOUS type="string">previous individu2</PREVIOUS> | ||
</PREVIOUS> | ||
<PREVIOUS> | ||
<PREVIOUS type="string">previous individu3</PREVIOUS> | ||
<PREVIOUS type="string">previous individu4</PREVIOUS> | ||
</PREVIOUS> | ||
</PREVIOUS> | ||
<COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED type="string">individu1</COLLECTED> | ||
<COLLECTED type="string">individu2</COLLECTED> | ||
</COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED type="string">individu3</COLLECTED> | ||
<COLLECTED type="string">individu4</COLLECTED> | ||
</COLLECTED> | ||
</COLLECTED> | ||
</variable3> | ||
<variable4> | ||
<COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED type="boolean">true</COLLECTED> | ||
<COLLECTED type="boolean">true</COLLECTED> | ||
</COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED type="string">individu3</COLLECTED> | ||
<COLLECTED type="string">individu4</COLLECTED> | ||
</COLLECTED> | ||
</COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED type="string">individu5</COLLECTED> | ||
<COLLECTED type="string">individu6</COLLECTED> | ||
</COLLECTED> | ||
<COLLECTED> | ||
<COLLECTED type="string">individu7</COLLECTED> | ||
<COLLECTED type="string">individu8</COLLECTED> | ||
</COLLECTED> | ||
</COLLECTED> | ||
</COLLECTED> | ||
</variable4> | ||
</COLLECTED> | ||
<EXTERNAL> | ||
<variableExt1> | ||
<variableExt1 type="string">External var</variableExt1> | ||
<variableExt1 type="string">External var2</variableExt1> | ||
</variableExt1> | ||
<variableExt2 type="string">External var2</variableExt2> | ||
</EXTERNAL> | ||
</Data> | ||
|
||
``` | ||
|
||
## Transformations JSON <-> XML | ||
|
||
```java | ||
File in = new File("/in/data.json"); | ||
JSONLunaticDataToXML translator = new JSONLunaticDataToXML(); | ||
File xmlOut = translator.transform(in); | ||
``` | ||
|
||
## Transformations XML <-> JSON | ||
|
||
```java | ||
File in = new File("/in/data.xml"); | ||
XMLLunaticDataToJSON translator = new XMLLunaticDataToJSON(); | ||
File jsonData = translator.transform(in); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.