Skip to content

Commit

Permalink
Move tutorials, rename docs (unicode-org#4694)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Mar 19, 2024
1 parent b1ca8b6 commit 16c7584
Show file tree
Hide file tree
Showing 221 changed files with 326 additions and 1,511 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/artifacts-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
cd ffi/npm
make lib/index.mjs
npm install typedoc
node_modules/typedoc/bin/typedoc lib/index.d.ts --out docs --readme ../../docs/tutorials/js.md --basePath lib
node_modules/typedoc/bin/typedoc lib/index.d.ts --out docs --readme ../../tutorials/js.md --basePath lib
cd ../..
- name: Upload docs to Google Cloud Storage (non-main)
Expand Down Expand Up @@ -282,19 +282,19 @@ jobs:
- name: Init packages
run: |
npm -C ffi/npm ci
npm -C docs/tutorials/npm ci
npm -C tutorials/npm ci
- name: Run Webpack
run: npm -C docs/tutorials/npm run build
run: npm -C tutorials/npm run build

- name: Put index.html in dist for temp URL
run: |
cp docs/tutorials/npm/index.html docs/tutorials/npm/dist/index.html
printf "const gcs=document.createElement('script');gcs.setAttribute('src','./bundle.js');document.body.appendChild(gcs);" > docs/tutorials/npm/dist/index.js
cp tutorials/npm/index.html tutorials/npm/dist/index.html
printf "const gcs=document.createElement('script');gcs.setAttribute('src','./bundle.js');document.body.appendChild(gcs);" > tutorials/npm/dist/index.js
- name: Upload wasm-demo bundle to Google Cloud Storage
run: |
gsutil -m cp -r docs/tutorials/npm/dist/* gs://${{ env.GCP_MAIN_BUCKET_ID }}/gha/wasm-demo
gsutil -m cp -r tutorials/npm/dist/* gs://${{ env.GCP_MAIN_BUCKET_ID }}/gha/wasm-demo
- name: "⭐⭐⭐ Links to Uploaded Artifacts ⭐⭐⭐"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ jobs:
id: gn-third-party-tools-cache
with:
path: |
docs/tutorials/gn/third_party_tools
key: ${{ runner.os }}-${{ hashFiles('tools/make/gn.toml', 'docs/tutorials/gn/Cargo.lock') }}
tutorials/gn/third_party_tools
key: ${{ runner.os }}-${{ hashFiles('tools/make/gn.toml', 'tutorials/gn/Cargo.lock') }}
- name: Install GN Third-Party Tools
if: steps.gn-third-party-tools-cache.outputs.cache-hit != 'true'
run: cargo make gn-install
Expand Down
4 changes: 2 additions & 2 deletions .gn
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
buildconfig = "//docs/tutorials/gn/BUILDCONFIG.gn"
root = "//docs/tutorials/gn:default"
buildconfig = "//tutorials/gn/BUILDCONFIG.gn"
root = "//tutorials/gn:default"
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ components/normalizer/ @hsivonen @echeran
components/plurals/ @zbraniecki @sffc
components/segmenter/ @aethanyc @makotokato @sffc
components/timezone/ @nordzilla
docs/tutorials/gn/ @sffc
tutorials/gn/ @sffc
ffi/capi/ @Manishearth
ffi/ecma402/ @filmil
ffi/harfbuzz/ @hsivonen
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[workspace]
resolver = "2"
members = [
# KEEP IN SYNC WITH workspace.dependencies and docs/tutorials/.cargo/config.toml
# KEEP IN SYNC WITH workspace.dependencies and tutorials/.cargo/config.toml

# Components
"components/calendar",
Expand Down Expand Up @@ -89,7 +89,7 @@ members = [
"tools/md-tests",
"ffi/dart/tools/datagen",
]
# Note: Workspaces in subdirectories, such as docs/tutorials/crates, are
# Note: Workspaces in subdirectories, such as tutorials/crates, are
# implicitly excluded from the main workspace.
exclude = [
# Testdata will still be published in the 1.x stream, but is deprecated
Expand All @@ -98,7 +98,7 @@ exclude = [
# first.
"provider/testdata",
# Tutorials are tested outside the workspace to simulate external users
"docs",
"tutorials",
]

[workspace.package]
Expand All @@ -122,7 +122,7 @@ include = [
]

[workspace.dependencies]
# KEEP IN SYNC WITH workspace.members and docs/tutorials/.cargo/config.toml
# KEEP IN SYNC WITH workspace.members and tutorials/.cargo/config.toml

# Components
icu = { version = "~1.4.0", path = "components/icu", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
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 ).

extend = [
{ path = "./docs/tutorials/gn/gn.toml"}, #
{ path = "./tutorials/gn/gn.toml"}, #
{ path = "./tools/make/data.toml"}, #
{ path = "./tools/make/valgrind.toml"}, #
{ path = "./tools/make/tidy.toml"}, #
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The design goals of `ICU4X` are:

## Documentation

For an introduction to the project, please visit the ["Introduction to ICU4X for Rust"](docs/tutorials/intro.md) tutorial. Further tutorials can be found in the [tutorial index](docs/tutorials/index.md).
For an introduction to the project, please visit the ["Introduction to ICU4X for Rust"](tutorials/intro.md) tutorial. Further tutorials can be found in the [tutorial index](tutorials/index.md).

For technical information on how to use ICU4X, visit our [API docs (latest stable)](https://docs.rs/icu/latest/) or [API docs (tip of main)](https://unicode-org.github.io/icu4x/rustdoc/icu/).

Expand Down
2 changes: 1 addition & 1 deletion components/calendar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
//! ```
//! [`ICU4X`]: ../icu/index.html
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/casemap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
//!
//! [`ICU4X`]: ../icu/index.html
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/collator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// adapted from ICU4C and, therefore, are subject to the ICU license as
// described in LICENSE.

// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/collections/src/codepointtrie/cptrie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use zerovec::ZeroVecError;
/// the index array is larger. The minimum size is the "fast max" limit, which is the limit of the range
/// of code points with 2 array lookups.
///
/// See the document [Unicode Properties and Code Point Tries in ICU4X](https://github.com/unicode-org/icu4x/blob/main/docs/design/properties_code_point_trie.md).
/// See the document [Unicode Properties and Code Point Tries in ICU4X](https://github.com/unicode-org/icu4x/blob/main/documents/design/properties_code_point_trie.md).
///
/// Also see [`UCPTrieType`](https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ucptrie_8h.html) in ICU4C.
#[derive(Clone, Copy, PartialEq, Debug, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion components/collections/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
//! It is an implementation of the existing [ICU4C UCharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1UCharsTrie.html)
//! / [ICU4J CharsTrie](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/util/CharsTrie.html) API.
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/datetime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
//! [`timezone::CustomTimeZone`]: icu::timezone::{CustomTimeZone}
//! [`TimeZoneFormatter`]: time_zone::TimeZoneFormatter
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/decimal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
//!
//! [`FixedDecimalFormatter`]: FixedDecimalFormatter
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/src/compactdecimal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Compact decimal
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(
not(test),
deny(
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/src/displaynames/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// TODO: expand documentation

// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(
not(test),
deny(
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//! It will usually undergo a major SemVer bump for every ICU4X release. Components in this
//! crate will eventually stabilize and move to the `icu` crate.
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
// No boilerplate, each module has their own
#![allow(clippy::module_inception)]
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/src/transliterate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! See [`Transliterator`].
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(
not(test),
deny(
Expand Down
2 changes: 1 addition & 1 deletion components/experimental/src/unicodeset_parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! [`ICU4X`]: ../icu/index.html
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(
not(test),
deny(
Expand Down
2 changes: 1 addition & 1 deletion components/icu/README.md

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

4 changes: 2 additions & 2 deletions components/icu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@
//! [`Locale`]: crate::locid::Locale
//! [`SymbolsV1`]: crate::decimal::provider::DecimalSymbolsV1
//! [`icu4x-datagen`]: https://docs.rs/icu_datagen/latest/icu_datagen/
//! [data management tutorial]: https://github.com/unicode-org/icu4x/blob/main/docs/tutorials/data_provider.md#loading-additional-data-at-runtime
//! [data management tutorial]: https://github.com/unicode-org/icu4x/blob/main/tutorials/data_provider.md#loading-additional-data-at-runtime
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/locid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
//! [`ICU4X`]: ../icu/index.html
//! [`Unicode Extensions`]: extensions
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/locid_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
//! [`UTS #35: Unicode LDML 3. Likely Subtags`]: https://www.unicode.org/reports/tr35/#Likely_Subtags.
//! [`UTS #35: Unicode LDML 3. LocaleId Canonicalization`]: http://unicode.org/reports/tr35/#LocaleId_Canonicalization,
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/normalizer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/plurals/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
//!
//! [Language Plural Rules]: https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/properties/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
//! [`CodePointMapData`]: crate::maps::CodePointMapData
//! [`sets`]: crate::sets
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/segmenter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
//!
//! See [`SentenceSegmenter`] for more examples.
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
2 changes: 1 addition & 1 deletion components/timezone/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
//! assert_eq!("amce", time_zone.metazone_id.unwrap().0.as_str());
//! ```
// https://github.com/unicode-org/icu4x/blob/main/docs/process/boilerplate.md#library-annotations
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(
not(test),
Expand Down
80 changes: 0 additions & 80 deletions docs/tutorials/.cargo/config.toml

This file was deleted.

File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ICU4X is highly modular allowing users to easily select and chunk pieces of the

### Flexible Data Management

[Data management](https://github.com/unicode-org/icu4x/blob/main/docs/design/data_pipeline.md) is a complex subcomponent of every internationalization ecosystem. Inflexible data management forces users to select which data and which locales are going to be available to users, which is a practice that goes against the idea of universal access to the system.
[Data management](https://github.com/unicode-org/icu4x/blob/main/documents/design/data_pipeline.md) is a complex subcomponent of every internationalization ecosystem. Inflexible data management forces users to select which data and which locales are going to be available to users, which is a practice that goes against the idea of universal access to the system.

What’s more, such architecture forces trade-offs and compromises in which benefiting some users puts additional cost on other users, companies and degrades performance.

Expand Down
Loading

0 comments on commit 16c7584

Please sign in to comment.