Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give user control to customize output formatting #75

Open
MrPowers opened this issue Oct 1, 2023 · 2 comments
Open

Give user control to customize output formatting #75

MrPowers opened this issue Oct 1, 2023 · 2 comments

Comments

@MrPowers
Copy link
Owner

MrPowers commented Oct 1, 2023

As noted in this pull request (#68), we want to give the user the ability to control the formatting of the output.

The formatting should be easy to configure for a given test and also easy to set globally for the entire test suite.

Here are the main concepts we want to model:

The formatting should let the user configure color, underline, and bold.

These settings should be globally applicable to all the interfaces in the project including schema comparisons, DataFrame comparisons, StructField comparisons, and column comparisons.

Something like this could work:

{
  "mismatched_rows": ["red", "bold"],
  "matched_rows": "blue",
  "mismatched_cells": ["white", "underline"],
  "print_dif": True,
  "print_mismatched_cols": True
}

The user should be able to set this globally and then override for a given test (they should be able to partially override).

The user should also be able to ignore this entirely and just rely on the built-in defaults.

Hopefully we can make the outputs look good on both Mac and Windows machines.

@MrPowers
Copy link
Owner Author

Let's start with this:

{
  "mismatched_rows": ["red", "bold"],
  "matched_rows": "blue",
  "mismatched_cells": ["white", "underline"],
  "matched_cells": ["blue", "bold"]
}

We will need to document the supported colors and font styles.

@asears
Copy link

asears commented Mar 12, 2024

Hi there,

Is there any way to turn formats off or adjust for Databricks? In Databricks we see ANSI character codes in the output instead of nicely colored results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants