Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datagen API improvements #3705

Merged
merged 4 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ description = "Run all tests for the CI 'testdata' job"
category = "CI"
dependencies = [
"testdata-check",
"testdata-legacy",
]

[tasks.ci-job-test-docs]
Expand Down
3 changes: 1 addition & 2 deletions components/calendar/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/collator/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/datetime/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/decimal/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/list/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/locid_transform/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/normalizer/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/plurals/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/properties/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/segmenter/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions components/timezone/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
23 changes: 0 additions & 23 deletions docs/tutorials/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/tutorials/crates/baked/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fn main() {
let mut options = BakedOptions::default();
// Overwrite the baked data if it was already present:
options.overwrite = true;
options.use_separate_crates = false;


icu_datagen::datagen(
Expand Down
3 changes: 1 addition & 2 deletions experimental/casemap/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions experimental/compactdecimal/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions experimental/displaynames/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
3 changes: 1 addition & 2 deletions experimental/relativetime/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
"segmenter_lstm": "Latest",
"export": {
"Baked": {
"output_path": "data",
"use_separate_crates": true,
"path": "data",
"pretty": true
}
},
Expand Down
8 changes: 5 additions & 3 deletions provider/adapters/tests/data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
},
"locales": "All",
"cldr": "Latest",
"icu_export": "Latest",
"segmenter_lstm": "Latest",
"icu_export": "None",
"segmenter_lstm": "None",
"export": {
"Blob": "blob.postcard"
"Blob": {
"path": "blob.postcard"
}
},
"fallback": "Legacy",
"overwrite": true
Expand Down
22 changes: 22 additions & 0 deletions provider/adapters/tests/data/langtest/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"keys": {
"Explicit": [
"core/helloworld@1"
]
},
"locales": {
"Explicit": [
"de"
]
},
"cldr": "None",
"icu_export": "None",
"segmenter_lstm": "None",
"export": {
"Fs": {
"path": "de",
"syntax": "Json"
}
},
"overwrite": true
}
22 changes: 22 additions & 0 deletions provider/adapters/tests/data/langtest/ro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"keys": {
"Explicit": [
"core/helloworld@1"
]
},
"locales": {
"Explicit": [
"ro"
]
},
"cldr": "None",
"icu_export": "None",
"segmenter_lstm": "None",
"export": {
"Fs": {
"path": "ro",
"syntax": "Json"
}
},
"overwrite": true
}
16 changes: 16 additions & 0 deletions provider/blob/tests/data/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"keys": {
"Explicit": [
"core/helloworld@1"
]
},
"cldr": "None",
"icu_export": "None",
"segmenter_lstm": "None",
"export": {
"Blob": {
"path": "hello_world.postcard"
}
},
"overwrite": true
}
2 changes: 1 addition & 1 deletion provider/datagen/src/baked_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Default for Options {
Self {
pretty: false,
insert_feature_gates: false,
use_separate_crates: false,
use_separate_crates: true,
overwrite: false,
}
}
Expand Down
Loading
Loading