From e3c8a6dd83fe3cb13f4a04cfe2a104650189e562 Mon Sep 17 00:00:00 2001 From: Matthijs Brobbel Date: Mon, 17 Feb 2025 17:20:49 +0100 Subject: [PATCH 1/2] Use `doc_auto_cfg` for docs.rs and add logo and icon --- arrow-arith/Cargo.toml | 6 +++--- arrow-arith/src/lib.rs | 6 ++++++ arrow-array/Cargo.toml | 7 +++---- arrow-array/src/lib.rs | 6 ++++++ arrow-avro/Cargo.toml | 6 +++--- arrow-avro/src/lib.rs | 6 ++++++ arrow-buffer/Cargo.toml | 6 +++--- arrow-buffer/src/lib.rs | 6 ++++++ arrow-cast/Cargo.toml | 5 +---- arrow-cast/src/lib.rs | 6 ++++++ arrow-csv/Cargo.toml | 4 +++- arrow-csv/src/lib.rs | 6 ++++++ arrow-data/Cargo.toml | 3 +-- arrow-data/src/lib.rs | 6 ++++++ arrow-flight/src/lib.rs | 7 +++++++ arrow-integration-test/Cargo.toml | 6 +++--- arrow-integration-test/src/lib.rs | 6 ++++++ arrow-ipc/Cargo.toml | 4 +++- arrow-ipc/src/lib.rs | 6 ++++++ arrow-json/Cargo.toml | 5 +++-- arrow-json/src/lib.rs | 6 ++++++ arrow-ord/Cargo.toml | 4 +++- arrow-ord/src/lib.rs | 6 ++++++ arrow-row/Cargo.toml | 7 +++---- arrow-row/src/lib.rs | 6 ++++++ arrow-schema/Cargo.toml | 3 +-- arrow-schema/src/lib.rs | 8 +++++++- arrow-select/Cargo.toml | 7 +++---- arrow-select/src/lib.rs | 9 ++++++++- arrow-string/Cargo.toml | 4 +++- arrow-string/src/lib.rs | 9 ++++++++- arrow/Cargo.toml | 4 +--- arrow/src/lib.rs | 6 ++++++ object_store/src/lib.rs | 1 + parquet/src/lib.rs | 6 ++++++ parquet_derive/Cargo.toml | 3 +++ parquet_derive/src/lib.rs | 6 ++++++ parquet_derive_test/Cargo.toml | 3 +++ parquet_derive_test/src/lib.rs | 6 ++++++ 39 files changed, 173 insertions(+), 44 deletions(-) diff --git a/arrow-arith/Cargo.toml b/arrow-arith/Cargo.toml index 66696df8aa04..a3fdafa823a2 100644 --- a/arrow-arith/Cargo.toml +++ b/arrow-arith/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_arith" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-array = { workspace = true } arrow-buffer = { workspace = true } @@ -40,5 +42,3 @@ arrow-data = { workspace = true } arrow-schema = { workspace = true } chrono = { workspace = true } num = { version = "0.4", default-features = false, features = ["std"] } - -[dev-dependencies] diff --git a/arrow-arith/src/lib.rs b/arrow-arith/src/lib.rs index c8b6412e5efc..ef0eaa8c2115 100644 --- a/arrow-arith/src/lib.rs +++ b/arrow-arith/src/lib.rs @@ -17,6 +17,12 @@ //! Arrow arithmetic and aggregation kernels +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] pub mod aggregate; #[doc(hidden)] // Kernels to be removed in a future release diff --git a/arrow-array/Cargo.toml b/arrow-array/Cargo.toml index 6eae8e24677d..baced3ea0a2b 100644 --- a/arrow-array/Cargo.toml +++ b/arrow-array/Cargo.toml @@ -30,10 +30,8 @@ rust-version = { workspace = true } [lib] name = "arrow_array" -path = "src/lib.rs" bench = false - [target.'cfg(target_arch = "wasm32")'.dependencies] ahash = { version = "0.8", default-features = false, features = ["compile-time-rng"] } @@ -50,6 +48,9 @@ num = { version = "0.4.1", default-features = false, features = ["std"] } half = { version = "2.1", default-features = false, features = ["num-traits"] } hashbrown = { version = "0.15.1", default-features = false } +[package.metadata.docs.rs] +all-features = true + [features] ffi = ["arrow-schema/ffi", "arrow-data/ffi"] force_validate = [] @@ -58,8 +59,6 @@ force_validate = [] rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } criterion = { version = "0.5", default-features = false } -[build-dependencies] - [[bench]] name = "occupancy" harness = false diff --git a/arrow-array/src/lib.rs b/arrow-array/src/lib.rs index 0fc9d30ab6e3..97a945c2c7be 100644 --- a/arrow-array/src/lib.rs +++ b/arrow-array/src/lib.rs @@ -221,6 +221,12 @@ //! [DataFusion]: https://github.com/apache/arrow-datafusion //! [RecordBatchStream]: https://docs.rs/datafusion/latest/datafusion/execution/trait.RecordBatchStream.html +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![deny(rustdoc::broken_intra_doc_links)] #![warn(missing_docs)] diff --git a/arrow-avro/Cargo.toml b/arrow-avro/Cargo.toml index c103c2ecc0f3..34955113a29f 100644 --- a/arrow-avro/Cargo.toml +++ b/arrow-avro/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_avro" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [features] default = ["deflate", "snappy", "zstd"] deflate = ["flate2"] @@ -49,7 +51,5 @@ snap = { version = "1.0", default-features = false, optional = true } zstd = { version = "0.13", default-features = false, optional = true } crc = { version = "3.0", optional = true } - [dev-dependencies] rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } - diff --git a/arrow-avro/src/lib.rs b/arrow-avro/src/lib.rs index d01d681b7af0..c48e7817d2af 100644 --- a/arrow-avro/src/lib.rs +++ b/arrow-avro/src/lib.rs @@ -20,6 +20,12 @@ //! [Apache Arrow]: https://arrow.apache.org //! [Apache Avro]: https://avro.apache.org/ +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] #![allow(unused)] // Temporary diff --git a/arrow-buffer/Cargo.toml b/arrow-buffer/Cargo.toml index 68bfe8ddf732..5414ad43ae04 100644 --- a/arrow-buffer/Cargo.toml +++ b/arrow-buffer/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_buffer" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] bytes = { version = "1.4" } num = { version = "0.4", default-features = false, features = ["std"] } @@ -42,8 +44,6 @@ half = { version = "2.1", default-features = false } criterion = { version = "0.5", default-features = false } rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } -[build-dependencies] - [[bench]] name = "bit_mask" harness = false diff --git a/arrow-buffer/src/lib.rs b/arrow-buffer/src/lib.rs index 34e432208ada..6bed9ad985bc 100644 --- a/arrow-buffer/src/lib.rs +++ b/arrow-buffer/src/lib.rs @@ -17,6 +17,12 @@ //! Low-level buffer abstractions for [Apache Arrow Rust](https://docs.rs/arrow) +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + // used by [`buffer::mutable::dangling_ptr`] #![cfg_attr(miri, feature(strict_provenance))] #![warn(missing_docs)] diff --git a/arrow-cast/Cargo.toml b/arrow-cast/Cargo.toml index 4046f5226094..9bf4cb241a27 100644 --- a/arrow-cast/Cargo.toml +++ b/arrow-cast/Cargo.toml @@ -30,11 +30,10 @@ rust-version = { workspace = true } [lib] name = "arrow_cast" -path = "src/lib.rs" bench = false [package.metadata.docs.rs] -features = ["prettyprint"] +all-features = true [features] prettyprint = ["comfy-table"] @@ -60,8 +59,6 @@ criterion = { version = "0.5", default-features = false } half = { version = "2.1", default-features = false } rand = "0.8" -[build-dependencies] - [[bench]] name = "parse_timestamp" harness = false diff --git a/arrow-cast/src/lib.rs b/arrow-cast/src/lib.rs index 6eac1be37c88..5a255c5586ce 100644 --- a/arrow-cast/src/lib.rs +++ b/arrow-cast/src/lib.rs @@ -17,6 +17,12 @@ //! Functions for converting from one data type to another in [Apache Arrow](https://docs.rs/arrow) +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] pub mod cast; pub use cast::*; diff --git a/arrow-csv/Cargo.toml b/arrow-csv/Cargo.toml index 8823924eb55b..a9de0e634cb5 100644 --- a/arrow-csv/Cargo.toml +++ b/arrow-csv/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_csv" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-array = { workspace = true } arrow-cast = { workspace = true } diff --git a/arrow-csv/src/lib.rs b/arrow-csv/src/lib.rs index 5ce1bc6c3396..1f6f200a71e6 100644 --- a/arrow-csv/src/lib.rs +++ b/arrow-csv/src/lib.rs @@ -17,6 +17,12 @@ //! Transfer data between the Arrow memory format and CSV (comma-separated values). +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] pub mod reader; diff --git a/arrow-data/Cargo.toml b/arrow-data/Cargo.toml index c83f867523d5..fbed24fea1fa 100644 --- a/arrow-data/Cargo.toml +++ b/arrow-data/Cargo.toml @@ -30,7 +30,6 @@ rust-version = { workspace = true } [lib] name = "arrow_data" -path = "src/lib.rs" bench = false [features] @@ -42,7 +41,7 @@ force_validate = [] ffi = ["arrow-schema/ffi"] [package.metadata.docs.rs] -features = ["ffi"] +all-features = true [dependencies] diff --git a/arrow-data/src/lib.rs b/arrow-data/src/lib.rs index a7feca6cd976..563213d2a218 100644 --- a/arrow-data/src/lib.rs +++ b/arrow-data/src/lib.rs @@ -19,6 +19,12 @@ //! //! For a higher-level, strongly-typed interface see [arrow_array](https://docs.rs/arrow_array) +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] mod data; pub use data::*; diff --git a/arrow-flight/src/lib.rs b/arrow-flight/src/lib.rs index 1dd2700794f3..b3cbe69b86d5 100644 --- a/arrow-flight/src/lib.rs +++ b/arrow-flight/src/lib.rs @@ -36,6 +36,13 @@ //! `flight-sql-experimental` feature of this crate to be activated. //! //! [Flight SQL]: https://arrow.apache.org/docs/format/FlightSql.html + +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![allow(rustdoc::invalid_html_tags)] #![warn(missing_docs)] // The unused_crate_dependencies lint does not work well for crates defining additional examples/bin targets diff --git a/arrow-integration-test/Cargo.toml b/arrow-integration-test/Cargo.toml index 8afbfacff7c3..d560d4fd8363 100644 --- a/arrow-integration-test/Cargo.toml +++ b/arrow-integration-test/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_integration_test" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow = { workspace = true } arrow-buffer = { workspace = true } @@ -40,5 +42,3 @@ hex = { version = "0.4", default-features = false, features = ["std"] } serde = { version = "1.0", default-features = false, features = ["rc", "derive"] } serde_json = { version = "1.0", default-features = false, features = ["std"] } num = { version = "0.4", default-features = false, features = ["std"] } - -[build-dependencies] diff --git a/arrow-integration-test/src/lib.rs b/arrow-integration-test/src/lib.rs index f025009c22de..bd178ef24abf 100644 --- a/arrow-integration-test/src/lib.rs +++ b/arrow-integration-test/src/lib.rs @@ -21,6 +21,12 @@ //! //! This is not a canonical format, but provides a human-readable way of verifying language implementations +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] use arrow_buffer::{IntervalDayTime, IntervalMonthDayNano, ScalarBuffer}; use hex::decode; diff --git a/arrow-ipc/Cargo.toml b/arrow-ipc/Cargo.toml index 735f7a14a2f8..805dbed4c68a 100644 --- a/arrow-ipc/Cargo.toml +++ b/arrow-ipc/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_ipc" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-array = { workspace = true } arrow-buffer = { workspace = true } diff --git a/arrow-ipc/src/lib.rs b/arrow-ipc/src/lib.rs index 4638abdb4ed3..9d260266db33 100644 --- a/arrow-ipc/src/lib.rs +++ b/arrow-ipc/src/lib.rs @@ -38,6 +38,12 @@ //! [FileReader]: reader::FileReader //! [FileWriter]: writer::FileWriter +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] pub mod convert; pub mod reader; diff --git a/arrow-json/Cargo.toml b/arrow-json/Cargo.toml index 564cb9433b3d..00adc813a1e6 100644 --- a/arrow-json/Cargo.toml +++ b/arrow-json/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_json" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-array = { workspace = true } arrow-buffer = { workspace = true } @@ -59,4 +61,3 @@ rand = { version = "0.8", default-features = false, features = ["std", "std_rng" [[bench]] name = "serde" harness = false - diff --git a/arrow-json/src/lib.rs b/arrow-json/src/lib.rs index bb02d0a3176c..6c70295e8898 100644 --- a/arrow-json/src/lib.rs +++ b/arrow-json/src/lib.rs @@ -63,6 +63,12 @@ //! [binary-to-text encoding]: https://en.wikipedia.org/wiki/Binary-to-text_encoding //! +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![deny(rustdoc::broken_intra_doc_links)] #![warn(missing_docs)] diff --git a/arrow-ord/Cargo.toml b/arrow-ord/Cargo.toml index 8d74d2f97d72..ca8f1960a74a 100644 --- a/arrow-ord/Cargo.toml +++ b/arrow-ord/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_ord" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-array = { workspace = true } arrow-buffer = { workspace = true } diff --git a/arrow-ord/src/lib.rs b/arrow-ord/src/lib.rs index 93fcb98a00f5..2ad43e89fa09 100644 --- a/arrow-ord/src/lib.rs +++ b/arrow-ord/src/lib.rs @@ -43,6 +43,12 @@ //! ``` //! +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] pub mod cmp; #[doc(hidden)] diff --git a/arrow-row/Cargo.toml b/arrow-row/Cargo.toml index 90d99684d265..45c30c9d7035 100644 --- a/arrow-row/Cargo.toml +++ b/arrow-row/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_row" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-array = { workspace = true } arrow-buffer = { workspace = true } @@ -45,6 +47,3 @@ half = { version = "2.1", default-features = false } arrow-cast = { workspace = true } arrow-ord = { workspace = true } rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } - -[features] - diff --git a/arrow-row/src/lib.rs b/arrow-row/src/lib.rs index d0fad12210db..abe7e91021f9 100644 --- a/arrow-row/src/lib.rs +++ b/arrow-row/src/lib.rs @@ -125,6 +125,12 @@ //! [compared]: PartialOrd //! [compare]: PartialOrd +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] use std::cmp::Ordering; use std::hash::{Hash, Hasher}; diff --git a/arrow-schema/Cargo.toml b/arrow-schema/Cargo.toml index ffea42db6653..ca9057cfafc2 100644 --- a/arrow-schema/Cargo.toml +++ b/arrow-schema/Cargo.toml @@ -30,7 +30,6 @@ rust-version = "1.64" [lib] name = "arrow_schema" -path = "src/lib.rs" bench = false [dependencies] @@ -49,7 +48,7 @@ ffi = ["bitflags"] serde = ["dep:serde"] [package.metadata.docs.rs] -features = ["ffi"] +all-features = true [dev-dependencies] bincode = { version = "1.3.3", default-features = false } diff --git a/arrow-schema/src/lib.rs b/arrow-schema/src/lib.rs index a83e23e27592..d1befbd04ff8 100644 --- a/arrow-schema/src/lib.rs +++ b/arrow-schema/src/lib.rs @@ -15,9 +15,15 @@ // specific language governing permissions and limitations // under the License. -#![warn(missing_docs)] //! Arrow logical types +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![warn(missing_docs)] + mod datatype; pub use datatype::*; diff --git a/arrow-select/Cargo.toml b/arrow-select/Cargo.toml index 023788799c94..e05f45525deb 100644 --- a/arrow-select/Cargo.toml +++ b/arrow-select/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_select" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-buffer = { workspace = true } arrow-data = { workspace = true } @@ -41,8 +43,5 @@ arrow-array = { workspace = true } num = { version = "0.4", default-features = false, features = ["std"] } ahash = { version = "0.8", default-features = false} -[features] -default = [] - [dev-dependencies] rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] } diff --git a/arrow-select/src/lib.rs b/arrow-select/src/lib.rs index e8f45441c481..10d858bda10b 100644 --- a/arrow-select/src/lib.rs +++ b/arrow-select/src/lib.rs @@ -15,9 +15,16 @@ // specific language governing permissions and limitations // under the License. -#![warn(missing_docs)] //! Arrow selection kernels +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + +#![warn(missing_docs)] + pub mod concat; mod dictionary; pub mod filter; diff --git a/arrow-string/Cargo.toml b/arrow-string/Cargo.toml index 0757067dc898..95aa289178d9 100644 --- a/arrow-string/Cargo.toml +++ b/arrow-string/Cargo.toml @@ -30,9 +30,11 @@ rust-version = { workspace = true } [lib] name = "arrow_string" -path = "src/lib.rs" bench = false +[package.metadata.docs.rs] +all-features = true + [dependencies] arrow-buffer = { workspace = true } arrow-data = { workspace = true } diff --git a/arrow-string/src/lib.rs b/arrow-string/src/lib.rs index d199c38bf439..f31e01cce63d 100644 --- a/arrow-string/src/lib.rs +++ b/arrow-string/src/lib.rs @@ -15,9 +15,16 @@ // specific language governing permissions and limitations // under the License. -#![warn(missing_docs)] //! Arrow string kernels +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + +#![warn(missing_docs)] + mod binary_like; mod binary_predicate; pub mod concat_elements; diff --git a/arrow/Cargo.toml b/arrow/Cargo.toml index 88231b7f6160..13bb3387be14 100644 --- a/arrow/Cargo.toml +++ b/arrow/Cargo.toml @@ -34,8 +34,6 @@ edition = { workspace = true } rust-version = { workspace = true } [lib] -name = "arrow" -path = "src/lib.rs" bench = false [dependencies] @@ -58,7 +56,7 @@ pyo3 = { version = "0.23", default-features = false, optional = true } half = { version = "2.1", default-features = false, optional = true } [package.metadata.docs.rs] -features = ["prettyprint", "ipc_compression", "ffi", "pyarrow"] +all-features = true [features] default = ["csv", "ipc", "json"] diff --git a/arrow/src/lib.rs b/arrow/src/lib.rs index 7fc5acdc1b19..ed4c3a4efd54 100644 --- a/arrow/src/lib.rs +++ b/arrow/src/lib.rs @@ -362,6 +362,12 @@ //! [DataFusion]: https://github.com/apache/arrow-datafusion //! [issue tracker]: https://github.com/apache/arrow-rs/issues +#![doc( + html_logo_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_white-bg.svg", + html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![deny(clippy::redundant_clone)] #![warn(missing_debug_implementations)] #![warn(missing_docs)] diff --git a/object_store/src/lib.rs b/object_store/src/lib.rs index cffcbbdd4353..2a5b4650732c 100644 --- a/object_store/src/lib.rs +++ b/object_store/src/lib.rs @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. +#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![deny(rustdoc::broken_intra_doc_links, rustdoc::bare_urls, rust_2018_idioms)] #![warn( missing_copy_implementations, diff --git a/parquet/src/lib.rs b/parquet/src/lib.rs index 3ca0dbe98791..f656a6cfbab5 100644 --- a/parquet/src/lib.rs +++ b/parquet/src/lib.rs @@ -82,6 +82,12 @@ //! [Logical Types]: https://github.com/apache/parquet-format/blob/master/LogicalTypes.md //! [object_store]: https://docs.rs/object_store/latest/object_store/ +#![doc( + html_logo_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg", + html_favicon_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] /// Defines a an item with an experimental public API /// diff --git a/parquet_derive/Cargo.toml b/parquet_derive/Cargo.toml index 68d19e54c4f4..033d5173402e 100644 --- a/parquet_derive/Cargo.toml +++ b/parquet_derive/Cargo.toml @@ -36,3 +36,6 @@ proc-macro2 = { version = "1.0", default-features = false } quote = { version = "1.0", default-features = false } syn = { version = "2.0", features = ["extra-traits"] } parquet = { workspace = true } + +[package.metadata.docs.rs] +all-features = true diff --git a/parquet_derive/src/lib.rs b/parquet_derive/src/lib.rs index a35cebb3a105..7040bf3095d7 100644 --- a/parquet_derive/src/lib.rs +++ b/parquet_derive/src/lib.rs @@ -18,6 +18,12 @@ //! This crate provides a procedural macro to derive //! implementations of a RecordWriter and RecordReader +#![doc( + html_logo_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg", + html_favicon_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![warn(missing_docs)] #![recursion_limit = "128"] diff --git a/parquet_derive_test/Cargo.toml b/parquet_derive_test/Cargo.toml index a3a4b58fea95..168d10891d3c 100644 --- a/parquet_derive_test/Cargo.toml +++ b/parquet_derive_test/Cargo.toml @@ -33,3 +33,6 @@ parquet = { workspace = true } parquet_derive = { path = "../parquet_derive", default-features = false } chrono = { workspace = true } uuid = { version = "1", features = ["v4"] } + +[package.metadata.docs.rs] +all-features = true diff --git a/parquet_derive_test/src/lib.rs b/parquet_derive_test/src/lib.rs index 2cd69d03d731..92d078f7601e 100644 --- a/parquet_derive_test/src/lib.rs +++ b/parquet_derive_test/src/lib.rs @@ -15,6 +15,12 @@ // specific language governing permissions and limitations // under the License. +#![doc( + html_logo_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg", + html_favicon_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg" +)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![allow(clippy::approx_constant)] use parquet_derive::{ParquetRecordReader, ParquetRecordWriter}; From 1d5c179a4ead753696dfb4e5b3488d846b7440b5 Mon Sep 17 00:00:00 2001 From: Matthijs Brobbel Date: Mon, 17 Feb 2025 17:39:10 +0100 Subject: [PATCH 2/2] Rustfmt --- arrow-arith/src/lib.rs | 1 - arrow-array/src/lib.rs | 1 - arrow-avro/src/lib.rs | 1 - arrow-buffer/src/lib.rs | 1 - arrow-cast/src/lib.rs | 1 - arrow-csv/src/lib.rs | 1 - arrow-data/src/lib.rs | 1 - arrow-flight/src/lib.rs | 1 - arrow-integration-test/src/lib.rs | 1 - arrow-ipc/src/lib.rs | 1 - arrow-json/src/lib.rs | 1 - arrow-ord/src/lib.rs | 1 - arrow-row/src/lib.rs | 1 - arrow-select/src/lib.rs | 1 - arrow-string/src/lib.rs | 1 - arrow/src/lib.rs | 1 - parquet/src/lib.rs | 1 - parquet_derive/src/lib.rs | 1 - parquet_derive_test/src/lib.rs | 1 - 19 files changed, 19 deletions(-) diff --git a/arrow-arith/src/lib.rs b/arrow-arith/src/lib.rs index ef0eaa8c2115..63640c51c3ce 100644 --- a/arrow-arith/src/lib.rs +++ b/arrow-arith/src/lib.rs @@ -22,7 +22,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] pub mod aggregate; #[doc(hidden)] // Kernels to be removed in a future release diff --git a/arrow-array/src/lib.rs b/arrow-array/src/lib.rs index 97a945c2c7be..91696540d219 100644 --- a/arrow-array/src/lib.rs +++ b/arrow-array/src/lib.rs @@ -226,7 +226,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![deny(rustdoc::broken_intra_doc_links)] #![warn(missing_docs)] diff --git a/arrow-avro/src/lib.rs b/arrow-avro/src/lib.rs index c48e7817d2af..11a4af8afd04 100644 --- a/arrow-avro/src/lib.rs +++ b/arrow-avro/src/lib.rs @@ -25,7 +25,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] #![allow(unused)] // Temporary diff --git a/arrow-buffer/src/lib.rs b/arrow-buffer/src/lib.rs index 6bed9ad985bc..174cdc4d9c18 100644 --- a/arrow-buffer/src/lib.rs +++ b/arrow-buffer/src/lib.rs @@ -22,7 +22,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - // used by [`buffer::mutable::dangling_ptr`] #![cfg_attr(miri, feature(strict_provenance))] #![warn(missing_docs)] diff --git a/arrow-cast/src/lib.rs b/arrow-cast/src/lib.rs index 5a255c5586ce..b042a7338519 100644 --- a/arrow-cast/src/lib.rs +++ b/arrow-cast/src/lib.rs @@ -22,7 +22,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] pub mod cast; pub use cast::*; diff --git a/arrow-csv/src/lib.rs b/arrow-csv/src/lib.rs index 1f6f200a71e6..8532cf59a218 100644 --- a/arrow-csv/src/lib.rs +++ b/arrow-csv/src/lib.rs @@ -22,7 +22,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] pub mod reader; diff --git a/arrow-data/src/lib.rs b/arrow-data/src/lib.rs index 563213d2a218..a023b1d98cb6 100644 --- a/arrow-data/src/lib.rs +++ b/arrow-data/src/lib.rs @@ -24,7 +24,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] mod data; pub use data::*; diff --git a/arrow-flight/src/lib.rs b/arrow-flight/src/lib.rs index b3cbe69b86d5..2ed59f3a3884 100644 --- a/arrow-flight/src/lib.rs +++ b/arrow-flight/src/lib.rs @@ -42,7 +42,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![allow(rustdoc::invalid_html_tags)] #![warn(missing_docs)] // The unused_crate_dependencies lint does not work well for crates defining additional examples/bin targets diff --git a/arrow-integration-test/src/lib.rs b/arrow-integration-test/src/lib.rs index bd178ef24abf..baa76059f9c6 100644 --- a/arrow-integration-test/src/lib.rs +++ b/arrow-integration-test/src/lib.rs @@ -26,7 +26,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] use arrow_buffer::{IntervalDayTime, IntervalMonthDayNano, ScalarBuffer}; use hex::decode; diff --git a/arrow-ipc/src/lib.rs b/arrow-ipc/src/lib.rs index 9d260266db33..aa10031933c6 100644 --- a/arrow-ipc/src/lib.rs +++ b/arrow-ipc/src/lib.rs @@ -43,7 +43,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] pub mod convert; pub mod reader; diff --git a/arrow-json/src/lib.rs b/arrow-json/src/lib.rs index 6c70295e8898..1c19315171ab 100644 --- a/arrow-json/src/lib.rs +++ b/arrow-json/src/lib.rs @@ -68,7 +68,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![deny(rustdoc::broken_intra_doc_links)] #![warn(missing_docs)] diff --git a/arrow-ord/src/lib.rs b/arrow-ord/src/lib.rs index 2ad43e89fa09..99b0451992cf 100644 --- a/arrow-ord/src/lib.rs +++ b/arrow-ord/src/lib.rs @@ -48,7 +48,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] pub mod cmp; #[doc(hidden)] diff --git a/arrow-row/src/lib.rs b/arrow-row/src/lib.rs index abe7e91021f9..714ef5e9f0ce 100644 --- a/arrow-row/src/lib.rs +++ b/arrow-row/src/lib.rs @@ -130,7 +130,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] use std::cmp::Ordering; use std::hash::{Hash, Hasher}; diff --git a/arrow-select/src/lib.rs b/arrow-select/src/lib.rs index 10d858bda10b..1648dc2833d8 100644 --- a/arrow-select/src/lib.rs +++ b/arrow-select/src/lib.rs @@ -22,7 +22,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] pub mod concat; diff --git a/arrow-string/src/lib.rs b/arrow-string/src/lib.rs index f31e01cce63d..4c90d783ff4d 100644 --- a/arrow-string/src/lib.rs +++ b/arrow-string/src/lib.rs @@ -22,7 +22,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] mod binary_like; diff --git a/arrow/src/lib.rs b/arrow/src/lib.rs index ed4c3a4efd54..ad98b7167dcb 100644 --- a/arrow/src/lib.rs +++ b/arrow/src/lib.rs @@ -367,7 +367,6 @@ html_favicon_url = "https://arrow.apache.org/img/arrow-logo_chevrons_black-txt_transparent-bg.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![deny(clippy::redundant_clone)] #![warn(missing_debug_implementations)] #![warn(missing_docs)] diff --git a/parquet/src/lib.rs b/parquet/src/lib.rs index f656a6cfbab5..bd86ca3636d0 100644 --- a/parquet/src/lib.rs +++ b/parquet/src/lib.rs @@ -87,7 +87,6 @@ html_favicon_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] /// Defines a an item with an experimental public API /// diff --git a/parquet_derive/src/lib.rs b/parquet_derive/src/lib.rs index 7040bf3095d7..2084fabae0ad 100644 --- a/parquet_derive/src/lib.rs +++ b/parquet_derive/src/lib.rs @@ -23,7 +23,6 @@ html_favicon_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![warn(missing_docs)] #![recursion_limit = "128"] diff --git a/parquet_derive_test/src/lib.rs b/parquet_derive_test/src/lib.rs index 92d078f7601e..962f5517ce60 100644 --- a/parquet_derive_test/src/lib.rs +++ b/parquet_derive_test/src/lib.rs @@ -20,7 +20,6 @@ html_favicon_url = "https://raw.githubusercontent.com/apache/parquet-format/25f05e73d8cd7f5c83532ce51cb4f4de8ba5f2a2/logo/parquet-logos_1.svg" )] #![cfg_attr(docsrs, feature(doc_auto_cfg))] - #![allow(clippy::approx_constant)] use parquet_derive::{ParquetRecordReader, ParquetRecordWriter};