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

SorrTask1075_Unit_test_hpandas_dassert_valid_remap #1080

Merged

Conversation

smitpatel49
Copy link
Contributor

@smitpatel49 smitpatel49 self-assigned this Jul 13, 2024
@smitpatel49 smitpatel49 added the PR_for_reviewers The PR needs to be reviewed by Team Leaders label Jul 13, 2024
@smitpatel49
Copy link
Contributor Author

smitpatel49 commented Jul 13, 2024

Can you please give me suggestions on how to improve on this one @sonaalKant, @samarth9008 mainly test3 and test4 as I was expecting an error raise but it went through. Also, what other input variations could be made, especially with to_remap for rows / columns remap.
Thank you.

@smitpatel49 smitpatel49 requested review from samarth9008 and DanilYachmenev and removed request for Sameep2808 July 13, 2024 02:34
@samarth9008
Copy link
Collaborator

samarth9008 commented Jul 15, 2024

Can you show the error while running test 3 and 4?

Would be nice if you can explain what condition you are trying to check in those tests.

@samarth9008
Copy link
Collaborator

Also, what other input variations could be made, especially with to_remap for rows / columns remap.

I would check all the conditions, assertions where the function would break and check those conditions.

Copy link
Contributor

@gpsaggese gpsaggese left a comment

Choose a reason for hiding this comment

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

LGTM. One comment about checking the PR after the linter

helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
@smitpatel49
Copy link
Contributor Author

@samarth9008, I just wanted to make sure that my method in test 3 was correct and I didn't have any error in test4, but I was curious regarding the input as it had duplicate keys in the dictionary and was expecting some error.

remap_dict = {
            "dummy_value_1": "1, 2, 3",
            "dummy_value_2": "A, B, C",
            "dummy_value_1": "A1, B2, C3",
        }

@smitpatel49 smitpatel49 added PR_for_authors The PR needs changes and removed PR_for_reviewers The PR needs to be reviewed by Team Leaders labels Jul 15, 2024
@smitpatel49 smitpatel49 added PR_for_reviewers The PR needs to be reviewed by Team Leaders and removed PR_for_authors The PR needs changes labels Jul 15, 2024
@smitpatel49 smitpatel49 requested a review from gpsaggese July 15, 2024 22:46
Copy link
Contributor

@gpsaggese gpsaggese left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@samarth9008 samarth9008 left a comment

Choose a reason for hiding this comment

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

Lets add tests for this 2 lines as well

hdbg.dassert_isinstance(to_remap, list)
hdbg.dassert_isinstance(remap_dict, dict)

helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
@smitpatel49 smitpatel49 added PR_for_authors The PR needs changes and removed PR_for_reviewers The PR needs to be reviewed by Team Leaders labels Jul 19, 2024
@smitpatel49 smitpatel49 added PR_for_reviewers The PR needs to be reviewed by Team Leaders and removed PR_for_authors The PR needs changes labels Jul 22, 2024
@smitpatel49
Copy link
Contributor Author

Awaiting further review/ instructions on this one. @samarth9008, @gpsaggese, @sonaalKant , @DanilYachmenev

Copy link
Collaborator

@samarth9008 samarth9008 left a comment

Choose a reason for hiding this comment

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

Some nits from my side.

helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
helpers/test/test_hpandas.py Show resolved Hide resolved
helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
helpers/test/test_hpandas.py Outdated Show resolved Hide resolved
@smitpatel49 smitpatel49 requested a review from samarth9008 July 25, 2024 11:10
Copy link
Collaborator

@samarth9008 samarth9008 left a comment

Choose a reason for hiding this comment

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

@smitpatel49
Copy link
Contributor Author

That was my initial question regarding the input, the function mentions row/ columns to map, the to_remap list will contain columns as in keys but how to include values as when calling hdbg.dassert_is_subset we take the list as whole - just containing keys.

@gpsaggese
Copy link
Contributor

What's the next step here? IMO it's best to merge and do a follow up PR. We don't want PRs on deck for 2 weeks. A PR should be merged in 1-2 days max.

@smitpatel49
Copy link
Contributor Author

I think that would be appropriate. I have been waiting on review from others and active response for a very long time on this PR.

Copy link
Collaborator

@samarth9008 samarth9008 left a comment

Choose a reason for hiding this comment

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

LG merging.

@samarth9008
Copy link
Collaborator

We don't want PRs on deck for 2 weeks. A PR should be merged in 1-2 days max.

The blockage was from my side as I have multiple things going on so couldn't find time to review these PRs.

@samarth9008 samarth9008 merged commit 168d08d into master Jul 31, 2024
1 check passed
@samarth9008 samarth9008 deleted the SorrTask1075_Unit_test_hpandas_dassert_valid_remap branch July 31, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR_for_reviewers The PR needs to be reviewed by Team Leaders
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants