Skip to content

refactor: Rename --hidden-columns to --hidden-column in CLI#37

Merged
EgeKaraismailogluQC merged 5 commits into
mainfrom
hidden-column
May 22, 2026
Merged

refactor: Rename --hidden-columns to --hidden-column in CLI#37
EgeKaraismailogluQC merged 5 commits into
mainfrom
hidden-column

Conversation

@EgeKaraismailogluQC
Copy link
Copy Markdown
Collaborator

@EgeKaraismailogluQC EgeKaraismailogluQC commented May 21, 2026

Motivation

In the CLI, --hidden-columns is a repeatable option. Therefore, it feels nicer for the name to be singular: --hidden-column.

Changes

Renamed the option to --hidden-column.

Example

diffly left.parquet right.parquet --primary-key pk --hidden-column foo --hidden-column bar

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (11dbd13) to head (44653d2).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #37   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines         1014      1018    +4     
=========================================
+ Hits          1014      1018    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the diffly CLI to use a singular repeatable flag name (--hidden-column) instead of the previous plural form (--hidden-columns), aligning the option name with how it’s used (multiple occurrences).

Changes:

  • Renamed the Typer CLI option parameter from hidden_columns to hidden_column (resulting in --hidden-column).
  • Wired the renamed CLI argument through to comparison.summary(hidden_columns=...).
Comments suppressed due to low confidence (1)

diffly/cli.py:131

  • The CLI option was renamed to hidden_column (i.e., --hidden-column), but the help text for sample_k_rows_only and show_sample_primary_key_per_change earlier in this function still refers to hidden_columns. This will confuse users reading --help; update those help strings to reference the new option name (or avoid hard-coding the option name in the message).
    hidden_column: Annotated[
        list[str],
        typer.Option(
            help=(
                "Columns for which no values are printed, e.g. because they contain"
                "sensitive information."
            )
        ),
    ] = [],

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By marking this as breaking, we'd need to jump to v2. I don't think this is warranted. Is there a way to make typer accept --hidden-columns but map it to --hidden-column and emit a warning?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@EgeKaraismailogluQC
Copy link
Copy Markdown
Collaborator Author

EgeKaraismailogluQC commented May 21, 2026

By marking this as breaking, we'd need to jump to v2. I don't think this is warranted. Is there a way to make typer accept --hidden-columns but map it to --hidden-column and emit a warning?

Good point Oliver Borchert (@borchero). There is nothing too fancy in typer that I am aware of, I just kept --hidden-columns but turned it to a hidden option such that it is not displayed in the help dialog. We now raise a FutureWarning if it is used:

> pixi run diffly left.parquet right.parquet --primary-key id --hidden-columns secret
/Users/.../git/diffly/diffly/cli.py:140: FutureWarning: `--hidden-columns` is deprecated, use `--hidden-column` instead.
  warnings.warn(
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                     Diffly Summary                                     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
   Primary key: id

 Schemas
 ▔▔▔▔▔▔▔
   Schemas match exactly (column count: 3).

 Rows
 ▔▔▔▔
   Left count             Right count
       4      (no change)      4

   ┏━┯━┯━┯━┯━┓
   ┃-│-│-│-│-┃                1  left only   (25.00%)
   ┠─┼─┼─┼─┼─┨╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
   ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃  2  equal       (66.67%)  │
   ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴  3  joined
   ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃  1  unequal     (33.33%)  │
   ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
                 ┃+│+│+│+│+┃  1  right only  (25.00%)
                 ┗━┷━┷━┷━┷━┛

 Columns
 ▔▔▔▔▔▔▔
   ┌────────┬─────────┐
   │ secret │ 100.00% │
   │ val    │  66.67% │
   └────────┴─────────┘

This part annoys me a little bit: warnings.warn( since it looks cut-off. Does that look fine to you?

@MariusMerkleQC
Copy link
Copy Markdown
Collaborator

We still need to remove ! in the PR title indicating the breaking change, right?

@EgeKaraismailogluQC EgeKaraismailogluQC changed the title refactor!: Rename --hidden-columns to --hidden-column in CLI refactor: Rename --hidden-columns to --hidden-column in CLI May 21, 2026
@EgeKaraismailogluQC EgeKaraismailogluQC merged commit 760dfa5 into main May 22, 2026
18 checks passed
@EgeKaraismailogluQC EgeKaraismailogluQC deleted the hidden-column branch May 22, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants