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

Change filter_blank_rows when_any parameter to have a more user-friendly type #7935

Conversation

Cassandra-Clark
Copy link
Contributor

Pull Request Description

Added Blank_Selector constructor and applied to remove_blank_columns, select_blank_columns, filter_blank_rows for #7931 . Changed when_any to when for readability.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the guide
  • All code has been tested:
    • Unit tests have been written where possible.

Copy link
Member

@jdunkerley jdunkerley left a comment

Choose a reason for hiding this comment

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

Think still a WIP - worth making these in progress PRs draft so we know.

Comment on lines 226 to 230
col_aggregate = if when_any then Aggregate_Column.Maximum _ else Aggregate_Column.Minimum _
col_aggregate = case when of
Blank_Selector.Any_Cell_Blank -> Aggregate_Column.Maximum
Blank_Selector.All_Cells_Blank -> Aggregate_Column.Minimum
Copy link
Member

Choose a reason for hiding this comment

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

Does this work without the _ underscores??

IIRC without the underscore this uses default values and creates a Aggregate_Column.Maximum 0 which will always check the first column. That will inevitably be incorrect once columns.length > 1.

Do the tests still succeed with that? If yes, I think we will need to expand the tests to ensure such an error is caught to avoid regressions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shifted this to include _ underscores

@Cassandra-Clark Cassandra-Clark dismissed jdunkerley’s stale review October 19, 2023 14:25

changes made to final PR

@Cassandra-Clark Cassandra-Clark force-pushed the 7931-change-filter_blank_rows-when_any-parameter-to-have-a-more-user-friendly-type branch from a2ba764 to 878823a Compare October 19, 2023 15:13
@Cassandra-Clark Cassandra-Clark marked this pull request as draft October 19, 2023 15:15
@Cassandra-Clark Cassandra-Clark marked this pull request as ready for review October 24, 2023 15:33
Cassandra-Clark and others added 10 commits October 31, 2023 10:05
Added Blank_Selector constructor and applied to remove_blank_columns, select_blank_columns, filter_blank_rows
…tor.enso

Co-authored-by: James Dunkerley <jdunkerley@users.noreply.github.com>
Co-authored-by: James Dunkerley <jdunkerley@users.noreply.github.com>
Added Blank_Selector constructor and applied to remove_blank_columns, select_blank_columns, filter_blank_rows
@Cassandra-Clark Cassandra-Clark force-pushed the 7931-change-filter_blank_rows-when_any-parameter-to-have-a-more-user-friendly-type branch from 253362a to e415a95 Compare October 31, 2023 14:08
@jdunkerley jdunkerley added the CI: Ready to merge This PR is eligible for automatic merge label Nov 1, 2023
@mergify mergify bot merged commit b5d6628 into develop Nov 1, 2023
34 of 35 checks passed
@mergify mergify bot deleted the 7931-change-filter_blank_rows-when_any-parameter-to-have-a-more-user-friendly-type branch November 1, 2023 16:51
@@ -196,14 +197,15 @@ type Table_Column_Helper
completely blank or have some blanks.

Arguments:
- when_any: By default, only columns consisting of all blank cells are
selected. If set to `True`, columns with one or more blank values are
-TODO docs
Copy link
Member

Choose a reason for hiding this comment

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

The TODO should be removed

@@ -0,0 +1,6 @@
## TODO Documents
Copy link
Member

Choose a reason for hiding this comment

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

I think we should add a piece of docs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change filter_blank_rows when_any parameter to have a more user-friendly type
5 participants