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

icu_datagen_bikeshed -> icu_provider_source #5173

Merged
merged 4 commits into from
Jul 4, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
88 changes: 44 additions & 44 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ members = [
# Provider
"provider/adapters",
"provider/baked",
"provider/bikeshed",
"provider/source",
"provider/blob",
"provider/core",
"provider/core/macros",
Expand Down Expand Up @@ -152,7 +152,7 @@ icu_harfbuzz = { version = "~0.2.0", path = "ffi/harfbuzz", default-features = f

# Provider
icu_provider_export = { version = "~1.5.0", path = "provider/export", default-features = false }
icu_datagen_bikeshed = { version = "~1.5.0", path = "provider/bikeshed", default-features = false }
icu_provider_source = { version = "~1.5.0", path = "provider/source", default-features = false }
icu_provider = { version = "~1.5.0", path = "provider/core", default-features = false }
icu_provider_macros = { version = "~1.5.0", path = "provider/core/macros", default-features = false }
icu_provider_adapters = { version = "~1.5.0", path = "provider/adapters", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion components/collator/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ fn test_vi() {
}

#[test]
// See DatagenProvider test_zh_non_baked for gb2312 and big5han tests
// See SourceDataProvider test_zh_non_baked for gb2312 and big5han tests
fn test_zh() {
// Note: ㄅ is Bopomofo.

Expand Down
2 changes: 1 addition & 1 deletion provider/core/README.md

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

2 changes: 1 addition & 1 deletion provider/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
//! [`Yokeable`]: yoke::Yokeable
//! [`impl_dynamic_data_provider!`]: dynutil::impl_dynamic_data_provider
//! [`icu_provider_adapters`]: ../icu_provider_adapters/index.html
//! [`DatagenProvider`]: ../icu_provider_export/struct.DatagenProvider.html
//! [`SourceDataProvider`]: ../icu_provider_export/struct.SourceDataProvider.html
//! [`as_downcasting()`]: any::AsDowncastingAnyProvider::as_downcasting
//! [`as_deserializing()`]: buf::AsDeserializingBufferProvider::as_deserializing
//! [`FsDataProvider`]: ../icu_provider_fs/struct.FsDataProvider.html
Expand Down
2 changes: 1 addition & 1 deletion provider/export/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ postcard = { workspace = true }
simple_logger = { workspace = true }
icu = { path = "../../components/icu", default-features = false, features = ["datagen"] }
icu_locale = { path = "../../components/locale" }
icu_datagen_bikeshed = { path = "../bikeshed" }
icu_provider_source = { path = "../source" }

[features]
default = ["rayon", "fs_exporter", "blob_exporter", "baked_exporter"]
Expand Down
4 changes: 2 additions & 2 deletions provider/export/README.md

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

10 changes: 5 additions & 5 deletions provider/export/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
//! ```no_run
//! use icu_provider_export::blob_exporter::*;
//! use icu_provider_export::prelude::*;
//! use icu_datagen_bikeshed::DatagenProvider;
//! use icu_provider_source::SourceDataProvider;
//! use std::fs::File;
//!
//! let provider = DatagenProvider::new_latest_tested();
//! let provider = SourceDataProvider::new_latest_tested();
//!
//! ExportDriver::new([LocaleFamily::FULL], DeduplicationStrategy::None.into(), LocaleFallbacker::try_new_unstable(&provider).unwrap())
//! .with_markers([icu::list::provider::AndListV2Marker::INFO])
Expand Down Expand Up @@ -97,16 +97,16 @@ use std::hash::Hash;
/// Configuration for a data export operation.
///
/// Note that this only configures *which data* is exported. The input provider, usually
/// `DatagenProvider`, might expose more options about the data itself.
/// `SourceDataProvider`, might expose more options about the data itself.
///
/// # Examples
///
/// ```no_run
/// use icu_provider_export::blob_exporter::*;
/// use icu_provider_export::prelude::*;
/// use icu_datagen_bikeshed::DatagenProvider;
/// use icu_provider_source::SourceDataProvider;
///
/// let provider = DatagenProvider::new_latest_tested();
/// let provider = SourceDataProvider::new_latest_tested();
///
/// ExportDriver::new([LocaleFamily::FULL], DeduplicationStrategy::None.into(), LocaleFallbacker::try_new_unstable(&provider).unwrap())
/// .with_markers([icu::list::provider::AndListV2Marker::INFO])
Expand Down
12 changes: 6 additions & 6 deletions provider/icu4x-datagen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ version.workspace = true
icu_provider = { workspace = true }
icu = { workspace = true, features = ["datagen"] }
icu_provider_export = { workspace = true, features = ["rayon"] }
icu_datagen_bikeshed = { workspace = true, optional = true }
icu_provider_source = { workspace = true, optional = true }
icu_registry = { workspace = true }

icu_provider_blob = { workspace = true, features = ["export"], optional = true }
Expand All @@ -32,20 +32,20 @@ simple_logger = { workspace = true }

[features]
default = ["use_wasm", "networking", "fs_exporter", "blob_exporter", "baked_exporter", "provider"]
provider = ["dep:icu_datagen_bikeshed"]
provider = ["dep:icu_provider_source"]
baked_exporter = ["icu_provider_export/baked_exporter"]
blob_exporter = ["icu_provider_export/blob_exporter"]
blob_input = ["dep:icu_provider_blob", "icu/datagen", "icu_provider/export"]
fs_exporter = ["icu_provider_export/fs_exporter"]
# Use wasm for building codepointtries
use_wasm = ["icu_datagen_bikeshed?/use_wasm"]
use_wasm = ["icu_provider_source?/use_wasm"]
# Use local ICU4C libraries for building codepointtries
# (will do nothing if used with `use_wasm`)
# If neither `use_wasm` nor `use_icu4c` are enabled,
# rule based segmenter data will not be generated.
use_icu4c = ["icu_datagen_bikeshed?/use_icu4c"]
networking = ["icu_datagen_bikeshed?/networking"]
experimental = ["icu_datagen_bikeshed?/experimental", "icu/experimental"]
use_icu4c = ["icu_provider_source?/use_icu4c"]
networking = ["icu_provider_source?/networking"]
experimental = ["icu_provider_source?/experimental", "icu/experimental"]

[package.metadata.cargo-all-features]
# We don't need working CPT builders for check
Expand Down
28 changes: 14 additions & 14 deletions provider/icu4x-datagen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

use clap::{Parser, ValueEnum};
use eyre::WrapErr;
#[cfg(feature = "provider")]
use icu_datagen_bikeshed::DatagenProvider;
use icu_provider::export::ExportableProvider;
use icu_provider::hello_world::HelloWorldV1Marker;
use icu_provider_export::prelude::*;
#[cfg(feature = "provider")]
use icu_provider_source::SourceDataProvider;
use simple_logger::SimpleLogger;
use std::collections::HashMap;
use std::path::PathBuf;
Expand Down Expand Up @@ -354,12 +354,12 @@ fn main() -> eyre::Result<()> {

#[cfg(feature = "provider")]
() => {
let mut p = DatagenProvider::new_custom();
let mut p = SourceDataProvider::new_custom();

p = p.with_collation_han_database(match cli.collation_han_database {
CollationHanDatabase::Unihan => icu_datagen_bikeshed::CollationHanDatabase::Unihan,
CollationHanDatabase::Unihan => icu_provider_source::CollationHanDatabase::Unihan,
CollationHanDatabase::Implicit => {
icu_datagen_bikeshed::CollationHanDatabase::Implicit
icu_provider_source::CollationHanDatabase::Implicit
}
});

Expand All @@ -370,7 +370,7 @@ fn main() -> eyre::Result<()> {
p = match (cli.cldr_root, cli.cldr_tag.as_str()) {
(Some(path), _) => p.with_cldr(&path)?,
#[cfg(feature = "networking")]
(_, "latest") => p.with_cldr_for_tag(DatagenProvider::LATEST_TESTED_CLDR_TAG),
(_, "latest") => p.with_cldr_for_tag(SourceDataProvider::LATEST_TESTED_CLDR_TAG),
#[cfg(feature = "networking")]
(_, tag) => p.with_cldr_for_tag(tag),
#[cfg(not(feature = "networking"))]
Expand All @@ -385,7 +385,7 @@ fn main() -> eyre::Result<()> {
(Some(path), _) => p.with_icuexport(&path)?,
#[cfg(feature = "networking")]
(_, "latest") => {
p.with_icuexport_for_tag(DatagenProvider::LATEST_TESTED_ICUEXPORT_TAG)
p.with_icuexport_for_tag(SourceDataProvider::LATEST_TESTED_ICUEXPORT_TAG)
}
#[cfg(feature = "networking")]
(_, tag) => p.with_icuexport_for_tag(tag),
Expand All @@ -401,7 +401,7 @@ fn main() -> eyre::Result<()> {
(Some(path), _) => p.with_segmenter_lstm(&path)?,
#[cfg(feature = "networking")]
(_, "latest") => {
p.with_segmenter_lstm_for_tag(DatagenProvider::LATEST_TESTED_SEGMENTER_LSTM_TAG)
p.with_segmenter_lstm_for_tag(SourceDataProvider::LATEST_TESTED_SEGMENTER_LSTM_TAG)
}
#[cfg(feature = "networking")]
(_, tag) => p.with_segmenter_lstm_for_tag(tag),
Expand All @@ -416,9 +416,9 @@ fn main() -> eyre::Result<()> {
if cli.locales.as_slice() == ["recommended"] {
preprocessed_locales = Some(PreprocessedLocales::LanguageIdentifiers(
p.locales_for_coverage_levels([
icu_datagen_bikeshed::CoverageLevel::Modern,
icu_datagen_bikeshed::CoverageLevel::Moderate,
icu_datagen_bikeshed::CoverageLevel::Basic,
icu_provider_source::CoverageLevel::Modern,
icu_provider_source::CoverageLevel::Moderate,
icu_provider_source::CoverageLevel::Basic,
])?
.into_iter()
.collect(),
Expand All @@ -427,9 +427,9 @@ fn main() -> eyre::Result<()> {
.locales
.iter()
.map(|s| match &**s {
"basic" => Some(icu_datagen_bikeshed::CoverageLevel::Basic),
"moderate" => Some(icu_datagen_bikeshed::CoverageLevel::Moderate),
"modern" => Some(icu_datagen_bikeshed::CoverageLevel::Modern),
"basic" => Some(icu_provider_source::CoverageLevel::Basic),
"moderate" => Some(icu_provider_source::CoverageLevel::Moderate),
"modern" => Some(icu_provider_source::CoverageLevel::Modern),
_ => None,
})
.collect::<Option<Vec<_>>>()
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

[package]
name = "icu_datagen_bikeshed"
name = "icu_provider_source"
description = "A data provider based on CLDR and ICU data."
license = "Unicode-3.0"
include = [
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions provider/bikeshed/README.md → provider/source/README.md

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

Loading
Loading