Ensure that command usage starts uppercase and ends period (#11278)

# Description

This repeats #8268 to make all command usage strings start with an
uppercase letter and end with a period per #5056

Adds a test to ensure that commands won't regress

Part of #5066

# User-Facing Changes

Command usage is now consistent

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

Automatic documentation updates
This commit is contained in:
Eric Hodel
2023-12-10 06:28:54 -08:00
committed by GitHub
parent 3e5f81ae14
commit ecb3b3a364
22 changed files with 81 additions and 32 deletions

View File

@ -319,7 +319,7 @@ macro_rules! lazy_expr_command {
expr_command!(
ExprList,
"dfr implode",
"Aggregates a group to a Series",
"Aggregates a group to a Series.",
vec![Example {
description: "",
example: "",
@ -334,7 +334,7 @@ expr_command!(
expr_command!(
ExprAggGroups,
"dfr agg-groups",
"creates an agg_groups expression",
"Creates an agg_groups expression.",
vec![Example {
description: "",
example: "",
@ -349,7 +349,7 @@ expr_command!(
expr_command!(
ExprCount,
"dfr count",
"creates a count expression",
"Creates a count expression.",
vec![Example {
description: "",
example: "",
@ -364,7 +364,7 @@ expr_command!(
expr_command!(
ExprNot,
"dfr expr-not",
"creates a not expression",
"Creates a not expression.",
vec![Example {
description: "Creates a not expression",
example: "(dfr col a) > 2) | dfr expr-not",
@ -379,7 +379,7 @@ expr_command!(
lazy_expr_command!(
ExprMax,
"dfr max",
"Creates a max expression or aggregates columns to their max value",
"Creates a max expression or aggregates columns to their max value.",
vec![
Example {
description: "Max value from columns in a dataframe",
@ -424,7 +424,7 @@ lazy_expr_command!(
lazy_expr_command!(
ExprMin,
"dfr min",
"Creates a min expression or aggregates columns to their min value",
"Creates a min expression or aggregates columns to their min value.",
vec![
Example {
description: "Min value from columns in a dataframe",
@ -469,7 +469,7 @@ lazy_expr_command!(
lazy_expr_command!(
ExprSum,
"dfr sum",
"Creates a sum expression for an aggregation or aggregates columns to their sum value",
"Creates a sum expression for an aggregation or aggregates columns to their sum value.",
vec![
Example {
description: "Sums all columns in a dataframe",
@ -514,7 +514,7 @@ lazy_expr_command!(
lazy_expr_command!(
ExprMean,
"dfr mean",
"Creates a mean expression for an aggregation or aggregates columns to their mean value",
"Creates a mean expression for an aggregation or aggregates columns to their mean value.",
vec![
Example {
description: "Mean value from columns in a dataframe",
@ -559,7 +559,7 @@ lazy_expr_command!(
expr_command!(
ExprMedian,
"dfr median",
"Creates a median expression for an aggregation",
"Creates a median expression for an aggregation.",
vec![Example {
description: "Median aggregation for a group-by",
example: r#"[[a b]; [one 2] [one 4] [two 1]]
@ -590,7 +590,7 @@ expr_command!(
lazy_expr_command!(
ExprStd,
"dfr std",
"Creates a std expression for an aggregation of std value from columns in a dataframe",
"Creates a std expression for an aggregation of std value from columns in a dataframe.",
vec![
Example {
description: "Std value from columns in a dataframe",
@ -636,7 +636,7 @@ lazy_expr_command!(
lazy_expr_command!(
ExprVar,
"dfr var",
"Create a var expression for an aggregation",
"Create a var expression for an aggregation.",
vec![
Example {
description:

View File

@ -15,7 +15,7 @@ impl Command for ExprOtherwise {
}
fn usage(&self) -> &str {
"completes a when expression."
"Completes a when expression."
}
fn signature(&self) -> Signature {

View File

@ -16,7 +16,7 @@ impl Command for LazyFetch {
}
fn usage(&self) -> &str {
"collects the lazyframe to the selected rows."
"Collects the lazyframe to the selected rows."
}
fn signature(&self) -> Signature {

View File

@ -17,7 +17,7 @@ impl Command for LazyFlatten {
}
fn usage(&self) -> &str {
"An alias for dfr explode"
"An alias for dfr explode."
}
fn signature(&self) -> Signature {

View File

@ -121,7 +121,7 @@ lazy_command!(
"dfr reverse",
"Reverses the LazyFrame",
vec![Example {
description: "Reverses the dataframe",
description: "Reverses the dataframe.",
example: "[[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr reverse",
result: Some(
NuDataFrame::try_from_columns(vec![
@ -147,7 +147,7 @@ lazy_command!(
lazy_command!(
LazyCache,
"dfr cache",
"Caches operations in a new LazyFrame",
"Caches operations in a new LazyFrame.",
vec![Example {
description: "Caches the result into a new LazyFrame",
example: "[[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr reverse | dfr cache",

View File

@ -16,7 +16,7 @@ impl Command for LazySortBy {
}
fn usage(&self) -> &str {
"sorts a lazy dataframe based on expression(s)."
"Sorts a lazy dataframe based on expression(s)."
}
fn signature(&self) -> Signature {