Skip to content

Conversation

ceferisbarov
Copy link
Contributor

I am still trying to make the code more readable. Suggestions are welcome.

Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

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

Great start @ceferisbarov , left a first round of reviews.

@ceferisbarov ceferisbarov requested a review from juliohm May 6, 2022 12:12
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.91%. Comparing base (25bb1d1) to head (50f3bf4).
Report is 378 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   92.49%   92.91%   +0.42%     
==========================================
  Files          21       22       +1     
  Lines         506      536      +30     
==========================================
+ Hits          468      498      +30     
  Misses         38       38              

☔ 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.

@ceferisbarov ceferisbarov requested review from eliascarv and juliohm May 7, 2022 09:02
@ceferisbarov
Copy link
Contributor Author

@juliohm Test set grew too large. I think we can create a function to avoid repeating the same lines.

Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

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

That is looking great now @ceferisbarov. I have a final suggestion before we merge this. Can you please replace all tests you have written by simple tests of the form:

@test TableTransforms._camel("apple banana") == "AppleBanana"
@test TableTransforms._snake("apple banana") == "apple_banana"
...

That way we can make sure that we cover various types of strings.

After the above set of tests you can simply add two more tests with tables to make sure that apply and revert are working with column and row tables. Also reapply and isrevertible.

Comment on lines 693 to 695
@test TableTransforms._camel("apple_Banana") == "Apple_Banana"
@test TableTransforms._snake("apple_Banana") == "apple_banana"
@test TableTransforms._upper("apple_Banana") == "APPLE_BANANA"
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 organize these tests differently. For example, consider the camel case. Your would like to write a list of strings like ["apple banana", "Apple_banana", ...] and then apply the camel case function to all elements of the list to make sure all results are equal to "AppleBanana".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@juliohm I am trying something like this now, but I came across an edge case. What should TableTransforms._snake("_A") return? Do we strip spaces and underscores or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@juliohm I have added some tests with for loop. I am pretty sure I can replace them with @testset macro, documentation is not clear about syntax. I will add more tests after we agree on syntax and style.

Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

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

@ceferisbarov please request a review whenever you feel that the PR is ready. Attached you can find another round of suggestions.

Co-authored-by: Júlio Hoffimann <[email protected]>
@ceferisbarov ceferisbarov requested a review from juliohm May 10, 2022 19:20
Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

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

Can you also add tests for columns with special characters such as A-B, A#, etc?

Co-authored-by: Júlio Hoffimann <[email protected]>
@juliohm
Copy link
Member

juliohm commented May 11, 2022 via email

@ceferisbarov ceferisbarov requested a review from juliohm May 12, 2022 14:01
Copy link
Member

@juliohm juliohm left a comment

Choose a reason for hiding this comment

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

I think we are almost done with this one @ceferisbarov , can you please take a look at this new set of revisions?

@ceferisbarov ceferisbarov requested a review from juliohm May 16, 2022 23:25
@juliohm
Copy link
Member

juliohm commented May 17, 2022

@eliascarv anything else I missed before we can merge this?

@eliascarv
Copy link
Member

For me everything is excellent.

@juliohm juliohm merged commit 988265e into JuliaML:master May 17, 2022
@juliohm
Copy link
Member

juliohm commented May 17, 2022

Another great addition @ceferisbarov ! 🎉

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

Successfully merging this pull request may close these issues.

4 participants