Skip to content

Commit

Permalink
Merge pull request #74 from constellation-rs/doc
Browse files Browse the repository at this point in the history
Remove "doc" feature now it's no longer needed
  • Loading branch information
mergify[bot] committed Jun 21, 2020
2 parents a2a24ba + e527412 commit c0831dc
Show file tree
Hide file tree
Showing 24 changed files with 82 additions and 126 deletions.
24 changes: 11 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "amadeus"
version = "0.2.1"
version = "0.2.2"
license = "Apache-2.0"
authors = ["Alec Mocatta <alec@mocatta.net>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -14,7 +14,7 @@ parquet postgres aws s3 cloudfront elb json csv logs hadoop hdfs arrow common cr
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.2.1"
documentation = "https://docs.rs/amadeus/0.2.2"
readme = "README.md"
edition = "2018"

Expand All @@ -30,21 +30,19 @@ parquet = ["amadeus-parquet", "amadeus-derive/parquet"]
postgres = ["amadeus-postgres", "amadeus-derive/postgres"]
csv = ["amadeus-serde", "amadeus-derive/serde"]
json = ["amadeus-serde", "amadeus-derive/serde"]
# "doc" works around https://github.com/rust-lang/rust/issues/58011
doc = ["amadeus-core/doc", "amadeus-aws/doc", "amadeus-commoncrawl/doc", "amadeus-postgres/doc", "amadeus-serde/doc"] # "amadeus-parquet/doc" when https://github.com/rust-lang/cargo/issues/3494 is resolved

[package.metadata.docs.rs]
features = ["doc", "constellation", "aws", "commoncrawl", "postgres", "csv", "json"]
features = ["constellation", "aws", "commoncrawl", "parquet", "postgres", "csv", "json"]

[dependencies]
amadeus-core = { version = "=0.2.1", path = "amadeus-core" }
amadeus-derive = { version = "=0.2.1", path = "amadeus-derive" }
amadeus-types = { version = "=0.2.1", path = "amadeus-types" }
amadeus-aws = { version = "=0.2.1", path = "amadeus-aws", optional = true }
amadeus-commoncrawl = { version = "=0.2.1", path = "amadeus-commoncrawl", optional = true }
amadeus-parquet = { version = "=0.2.1", path = "amadeus-parquet", optional = true }
amadeus-postgres = { version = "=0.2.1", path = "amadeus-postgres", optional = true }
amadeus-serde = { version = "=0.2.1", path = "amadeus-serde", optional = true }
amadeus-core = { version = "=0.2.2", path = "amadeus-core" }
amadeus-derive = { version = "=0.2.2", path = "amadeus-derive" }
amadeus-types = { version = "=0.2.2", path = "amadeus-types" }
amadeus-aws = { version = "=0.2.2", path = "amadeus-aws", optional = true }
amadeus-commoncrawl = { version = "=0.2.2", path = "amadeus-commoncrawl", optional = true }
amadeus-parquet = { version = "=0.2.2", path = "amadeus-parquet", optional = true }
amadeus-postgres = { version = "=0.2.2", path = "amadeus-postgres", optional = true }
amadeus-serde = { version = "=0.2.2", path = "amadeus-serde", optional = true }
constellation-rs = { version = "0.1", default-features = false, optional = true }
derive-new = "0.5"
doc-comment = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</p>

<p align="center">
<a href="https://docs.rs/amadeus/0.2.1/amadeus/">📖 Docs</a> | <a href="https://constellation.rs/amadeus">🌐 Home</a> | <a href="https://constellation.zulipchat.com/#narrow/stream/213231-amadeus">💬 Chat</a>
<a href="https://docs.rs/amadeus/0.2.2/amadeus/">📖 Docs</a> | <a href="https://constellation.rs/amadeus">🌐 Home</a> | <a href="https://constellation.zulipchat.com/#narrow/stream/213231-amadeus">💬 Chat</a>
</p>

## Amadeus provides:
Expand Down Expand Up @@ -50,7 +50,7 @@ We aim to create a community that is welcoming and helpful to anyone that is int

Amadeus has deep, pluggable, integration with various file formats, databases and interfaces:

| Data format | [`Source`](https://docs.rs/amadeus/0.2.1/amadeus/trait.Source.html) | [`Destination`](https://docs.rs/amadeus/0.2.1/amadeus/trait.Destination.html) |
| Data format | [`Source`](https://docs.rs/amadeus/0.2.2/amadeus/trait.Source.html) | [`Destination`](https://docs.rs/amadeus/0.2.2/amadeus/trait.Destination.html) |
|---|---|---|
| CSV |||
| JSON |||
Expand Down
14 changes: 4 additions & 10 deletions amadeus-aws/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-aws"
version = "0.2.1"
version = "0.2.2"
license = "Apache-2.0"
authors = ["Alec Mocatta <alec@mocatta.net>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,23 +10,17 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.2.1"
documentation = "https://docs.rs/amadeus/0.2.2"
readme = "README.md"
edition = "2018"

[badges]
azure-devops = { project = "alecmocatta/amadeus", pipeline = "tests" }
maintenance = { status = "actively-developed" }

[features]
doc = ["amadeus-core/doc"]

[package.metadata.docs.rs]
features = ["doc"]

[dependencies]
amadeus-core = { version = "=0.2.1", path = "../amadeus-core" }
amadeus-types = { version = "=0.2.1", path = "../amadeus-types" }
amadeus-core = { version = "=0.2.2", path = "../amadeus-core" }
amadeus-types = { version = "=0.2.2", path = "../amadeus-types" }
async-compression = { version = "0.3.3", features = ["gzip", "futures-bufread"] }
async-trait = "0.1"
chrono = { version = "0.4", default-features = false }
Expand Down
10 changes: 5 additions & 5 deletions amadeus-aws/src/cloudfront.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ impl Source for Cloudfront {
type Item = CloudfrontRow;
type Error = AwsError;

#[cfg(not(feature = "doc"))]
#[cfg(not(doc))]
type ParStream =
impl amadeus_core::par_stream::ParallelStream<Item = Result<Self::Item, Self::Error>>;
#[cfg(feature = "doc")]
#[cfg(doc)]
type ParStream =
DistParStream<amadeus_core::util::ImplDistributedStream<Result<Self::Item, Self::Error>>>;
#[cfg(not(feature = "doc"))]
#[cfg(not(doc))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;
#[cfg(feature = "doc")]
#[cfg(doc)]
type DistStream = amadeus_core::util::ImplDistributedStream<Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down Expand Up @@ -124,7 +124,7 @@ impl Source for Cloudfront {
.map(FnMut!(
|x: Result<Result<CloudfrontRow, _>, _>| x.and_then(self::identity)
));
#[cfg(feature = "doc")]
#[cfg(doc)]
let ret = amadeus_core::util::ImplDistributedStream::new(ret);
ret
}
Expand Down
2 changes: 1 addition & 1 deletion amadeus-aws/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-aws/0.2.1")]
#![doc(html_root_url = "https://docs.rs/amadeus-aws/0.2.2")]
#![feature(type_alias_impl_trait)]

mod cloudfront;
Expand Down
14 changes: 4 additions & 10 deletions amadeus-commoncrawl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-commoncrawl"
version = "0.2.1"
version = "0.2.2"
license = "MIT OR Apache-2.0"
authors = ["Stephen Becker IV <github@deathbyescalator.com>", "Alec Mocatta <alec@mocatta.net>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,23 +10,17 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.2.1"
documentation = "https://docs.rs/amadeus/0.2.2"
readme = "README.md"
edition = "2018"

[badges]
azure-devops = { project = "alecmocatta/amadeus", pipeline = "tests" }
maintenance = { status = "actively-developed" }

[features]
doc = ["amadeus-core/doc"]

[package.metadata.docs.rs]
features = ["doc"]

[dependencies]
amadeus-core = { version = "=0.2.1", path = "../amadeus-core" }
amadeus-types = { version = "=0.2.1", path = "../amadeus-types" }
amadeus-core = { version = "=0.2.2", path = "../amadeus-core" }
amadeus-types = { version = "=0.2.2", path = "../amadeus-types" }
async-compression = { version = "0.3.3", features = ["gzip", "futures-bufread"] }
futures = "0.3"
nom = "4.2.3"
Expand Down
12 changes: 6 additions & 6 deletions amadeus-commoncrawl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-commoncrawl/0.2.1")]
#![doc(html_root_url = "https://docs.rs/amadeus-commoncrawl/0.2.2")]
#![feature(type_alias_impl_trait)]

mod commoncrawl;
Expand Down Expand Up @@ -58,15 +58,15 @@ impl Source for CommonCrawl {
type Item = Webpage<'static>;
type Error = io::Error;

#[cfg(not(feature = "doc"))]
#[cfg(not(doc))]
type ParStream =
impl amadeus_core::par_stream::ParallelStream<Item = Result<Self::Item, Self::Error>>;
#[cfg(feature = "doc")]
#[cfg(doc)]
type ParStream =
DistParStream<amadeus_core::util::ImplDistributedStream<Result<Self::Item, Self::Error>>>;
#[cfg(not(feature = "doc"))]
#[cfg(not(doc))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;
#[cfg(feature = "doc")]
#[cfg(doc)]
type DistStream = amadeus_core::util::ImplDistributedStream<Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand All @@ -88,7 +88,7 @@ impl Source for CommonCrawl {
WarcParser::new(body)
}
.flatten_stream()));
#[cfg(feature = "doc")]
#[cfg(doc)]
let ret = amadeus_core::util::ImplDistributedStream::new(ret);
ret
}
Expand Down
7 changes: 2 additions & 5 deletions amadeus-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-core"
version = "0.2.1"
version = "0.2.2"
license = "Apache-2.0"
authors = ["Alec Mocatta <alec@mocatta.net>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,17 +10,14 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.2.1"
documentation = "https://docs.rs/amadeus/0.2.2"
readme = "README.md"
edition = "2018"

[badges]
azure-devops = { project = "alecmocatta/amadeus", pipeline = "tests" }
maintenance = { status = "actively-developed" }

[features]
doc = []

[dependencies]
async-trait = "0.1"
derive-new = "0.5"
Expand Down
2 changes: 1 addition & 1 deletion amadeus-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-core/0.2.1")]
#![doc(html_root_url = "https://docs.rs/amadeus-core/0.2.2")]
#![feature(never_type)]
#![feature(specialization)]
#![feature(read_initializer)]
Expand Down
11 changes: 1 addition & 10 deletions amadeus-core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ use std::{
any::type_name, error, fmt, hash::{Hash, Hasher}, io, marker::PhantomData, pin::Pin, sync::Arc, task::{Context, Poll}
};

use crate::par_stream::{DistributedStream, ParallelStream};
#[cfg(feature = "doc")]
use crate::{
par_stream::{StreamTask, StreamTaskAsync}, sink::Sink
par_stream::{DistributedStream, ParallelStream, StreamTask, StreamTaskAsync}, sink::Sink
};

pub struct ResultExpand<T, E>(pub Result<T, E>);
Expand Down Expand Up @@ -110,10 +108,8 @@ where
}
}

#[cfg(feature = "doc")]
#[doc(hidden)]
pub struct ImplDistributedStream<T>(PhantomData<fn() -> T>);
#[cfg(feature = "doc")]
impl<T> ImplDistributedStream<T> {
pub fn new<U>(_drop: U) -> Self
where
Expand All @@ -122,7 +118,6 @@ impl<T> ImplDistributedStream<T> {
Self(PhantomData)
}
}
#[cfg(feature = "doc")]
impl<T: 'static> DistributedStream for ImplDistributedStream<T> {
type Item = T;
type Task = ImplTask<T>;
Expand All @@ -134,7 +129,6 @@ impl<T: 'static> DistributedStream for ImplDistributedStream<T> {
unreachable!()
}
}
#[cfg(feature = "doc")]
impl<T: 'static> ParallelStream for ImplDistributedStream<T> {
type Item = T;
type Task = ImplTask<T>;
Expand All @@ -147,11 +141,9 @@ impl<T: 'static> ParallelStream for ImplDistributedStream<T> {
}
}

#[cfg(feature = "doc")]
#[doc(hidden)]
#[derive(Serialize, Deserialize)]
pub struct ImplTask<T>(PhantomData<fn() -> T>);
#[cfg(feature = "doc")]
impl<T> StreamTask for ImplTask<T>
where
T: 'static,
Expand All @@ -163,7 +155,6 @@ where
self
}
}
#[cfg(feature = "doc")]
impl<T: 'static> StreamTaskAsync for ImplTask<T> {
type Item = T;

Expand Down
4 changes: 2 additions & 2 deletions amadeus-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-derive"
version = "0.2.1"
version = "0.2.2"
license = "Apache-2.0"
authors = ["Alec Mocatta <alec@mocatta.net>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,7 +10,7 @@ Harmonious distributed data analysis in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.2.1"
documentation = "https://docs.rs/amadeus/0.2.2"
readme = "README.md"
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion amadeus-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#![doc(html_root_url = "https://docs.rs/amadeus-derive/0.2.1")]
#![doc(html_root_url = "https://docs.rs/amadeus-derive/0.2.2")]
#![recursion_limit = "400"]
#![allow(clippy::useless_let_if_seq)]

Expand Down
14 changes: 4 additions & 10 deletions amadeus-parquet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amadeus-parquet"
version = "0.2.1"
version = "0.2.2"
license = "Apache-2.0"
authors = ["Alec Mocatta <alec@mocatta.net>", "Apache Arrow <dev@arrow.apache.org>"]
categories = ["concurrency", "science", "database", "parser-implementations", "text-processing"]
Expand All @@ -10,23 +10,17 @@ An Apache Parquet implementation in Rust.
"""
repository = "https://github.com/alecmocatta/amadeus"
homepage = "https://github.com/alecmocatta/amadeus"
documentation = "https://docs.rs/amadeus/0.2.1"
documentation = "https://docs.rs/amadeus/0.2.2"
readme = "README.md"
edition = "2018"

[badges]
azure-devops = { project = "alecmocatta/amadeus", pipeline = "tests" }
maintenance = { status = "actively-developed" }

[features]
doc = ["amadeus-core/doc"]

[package.metadata.docs.rs]
features = ["doc"]

[dependencies]
amadeus-core = { version = "=0.2.1", path = "../amadeus-core" }
amadeus-types = { version = "=0.2.1", path = "../amadeus-types" }
amadeus-core = { version = "=0.2.2", path = "../amadeus-core" }
amadeus-types = { version = "=0.2.2", path = "../amadeus-types" }
async-trait = "0.1"
brotli = "3.3"
byteorder = "1.2"
Expand Down
12 changes: 6 additions & 6 deletions amadeus-parquet/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![doc(html_root_url = "https://docs.rs/amadeus-parquet/0.2.1")]
#![doc(html_root_url = "https://docs.rs/amadeus-parquet/0.2.2")]
#![feature(bufreader_seek_relative)]
#![feature(read_initializer)]
#![feature(specialization)]
Expand Down Expand Up @@ -69,15 +69,15 @@ where
<<<F as File>::Partition as Partition>::Page as Page>::Error,
>;

#[cfg(not(feature = "doc"))]
#[cfg(not(doc))]
type ParStream =
impl amadeus_core::par_stream::ParallelStream<Item = Result<Self::Item, Self::Error>>;
#[cfg(feature = "doc")]
#[cfg(doc)]
type ParStream =
DistParStream<amadeus_core::util::ImplDistributedStream<Result<Self::Item, Self::Error>>>;
#[cfg(not(feature = "doc"))]
#[cfg(not(doc))]
type DistStream = impl DistributedStream<Item = Result<Self::Item, Self::Error>>;
#[cfg(feature = "doc")]
#[cfg(doc)]
type DistStream = amadeus_core::util::ImplDistributedStream<Result<Self::Item, Self::Error>>;

fn par_stream(self) -> Self::ParStream {
Expand Down Expand Up @@ -116,7 +116,7 @@ where
.map(ResultExpandIter::new)
.flatten_stream()
.map(|row: Result<Result<Row, Self::Error>, Self::Error>| Ok(row??))));
#[cfg(feature = "doc")]
#[cfg(doc)]
let ret = amadeus_core::util::ImplDistributedStream::new(ret);
ret
}
Expand Down

0 comments on commit c0831dc

Please sign in to comment.