Skip to content

Commit

Permalink
hdp-spec (#16), i18n+l10n (#15): added Russian test file
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Mar 18, 2021
1 parent a0cb023 commit 3049e23
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# cd tests/hrecipe
# hdpcli --export-to-hxl-json-processing-specs hello-world.hrecipe.mul.hdp.yml
# hdpcli --export-to-hxl-json-processing-specs hello-world.hrecipe.mul.hdp.yml | jq '.[1]' | hxlspec
# hdpcli --export-to-hxl-json-processing-specs tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml
# hdpcli --export-to-hxl-json-processing-specs tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml | jq '.[1]' | hxlspec
---
- hsilo:
linguam: MUL # https://iso639-3.sil.org/code/mul
Expand All @@ -19,7 +18,7 @@
- ST
- TL
grupum:
- hello-world
- salve-mundi
tag:
- CPLP
htransformare:
Expand Down
66 changes: 66 additions & 0 deletions tests/hrecipe/salve-mundi.hrecipe.rus.hdp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# hdpcli tests/hrecipe/salve-mundi.hrecipe.rus.hdp.yml
# hdpcli --export-to-hxl-json-processing-specs tests/hrecipe/salve-mundi.hrecipe.rus.hdp.yml
# hdpcli --export-to-hxl-json-processing-specs tests/hrecipe/salve-mundi.hrecipe.rus.hdp.yml | jq '.[1]' | hxlspec
---
- силосная:
группа:
- salve-mundi
описание:
ENG: Hello World!
POR: Olá Mundo!
страна:
- AO
- BR
- CV
- GQ
- GW
- MO
- MZ
- PT
- ST
- TL
тег:
- CPLP
язык: MUL
трансформация-данных:
- _recipe:
- aggregators:
- sum(population) as Population#population
filter: count
patterns: adm1+name,adm1+code
- filter: clean_data
number: population
number_format: .0f
идентификатор: example-processing-with-a-JSON-spec
пример:
- источник:
_sheet_index: 1
iri: https://data.humdata.org/dataset/yemen-humanitarian-needs-overview
- источник:
данные:
- - header 1
- header 2
- header 3
- - '#item +id'
- '#item +name'
- '#item +value'
- - ACME1
- ACME Inc.
- '123'
- - XPTO1
- XPTO org
- '456'
цель:
данные:
- - header 1
- header 2
- header 3
- - '#item +id'
- '#item +name'
- '#item +value'
- - ACME1
- ACME Inc.
- '123'
- - XPTO1
- XPTO org
- '456'
14 changes: 7 additions & 7 deletions tests/manual-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@ hdpcli --export-to-hxl-json-processing-specs tests/hxl-processing-specs/hxl-proc
# This allow filter the HDP internal dictionary

# Returns empty:
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --non-grupum hello-world
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --non-grupum salve-mundi

# Returns something
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --verum-grupum hello-world
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --verum-grupum salve-mundi

# Retuns something
hdpcli tests/hrecipe/yemen-01.hrecipe.mul.hdp.yml --verum-urn yemen

# Retuns something
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --verum-urn hello-world --verum-grupum hello-world
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --verum-urn salve-mundi --verum-grupum salve-mundi

# export languages
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --objectivum-linguam RUS
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --objectivum-linguam RUS

### hdpcli --objectivum-linguam ZZZ (export to language) .......................
# this will export to a new know language
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --objectivum-linguam ARA
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --objectivum-linguam POR
hdpcli tests/hrecipe/hello-world.hrecipe.mul.hdp.yml --objectivum-linguam RUS
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --objectivum-linguam ARA
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --objectivum-linguam POR
hdpcli tests/hrecipe/salve-mundi.hrecipe.mul.hdp.yml --objectivum-linguam RUS

# hdpcli --export-to-hxl-json-processing-specs tests/hxl-processing-specs/hxl-processing-specs-test-01.mul.hdp.yml | jq '.[0]' | hxlspec | tabulate

Expand Down

0 comments on commit 3049e23

Please sign in to comment.