-
Notifications
You must be signed in to change notification settings - Fork 110
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
chore: allow users context traits and underscore divide numbers configuration #3703
Conversation
src/warehouse/v0/util.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not being used since we set the default version to v1.
Test report for this run is available at: https://test-integrations-dev.s3.amazonaws.com/integrations-test-reports/rudder-transformer/3703/test-report.html |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3703 +/- ##
===========================================
+ Coverage 88.69% 88.86% +0.16%
===========================================
Files 594 595 +1
Lines 32413 32425 +12
Branches 7727 7711 -16
===========================================
+ Hits 28750 28815 +65
+ Misses 3342 3333 -9
+ Partials 321 277 -44 ☔ View full report in Codecov by Sentry. |
d21ec7b
to
85f7f2d
Compare
25ba755
to
77673c2
Compare
src/warehouse/snakecase/snakecase.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following implementation has been take from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the additional change for reUnicodeWordsWithNumbers
which has two additional regexes:
${rsDigit}+${rsUpper}?${rsLower}+
, // Digits followed by lowercase letters (e.g., "123abc")${rsDigit}+${rsUpper}+
, // Digits followed by uppercase letters (e.g., "123ABC")
const reUnicodeWordsWithNumbers = RegExp(
[
`${rsUpper}?${rsLower}+${rsDigit}+`, // Lowercase letters followed by digits (e.g., "abc123")
`${rsUpper}+${rsDigit}+`, // Uppercase letters followed by digits (e.g., "ABC123")
`${rsDigit}+${rsUpper}?${rsLower}+`, // Digits followed by lowercase letters (e.g., "123abc")
`${rsDigit}+${rsUpper}+`, // Digits followed by uppercase letters (e.g., "123ABC")
`${rsUpper}?${rsLower}+${rsOptContrLower}(?=${[rsBreak, rsUpper, '$'].join('|')})`, // Regular words, lowercase letters followed by optional contractions
`${rsMiscUpper}+${rsOptContrUpper}(?=${[rsBreak, rsUpper + rsMiscLower, '$'].join('|')})`, // Miscellaneous uppercase characters with optional contractions
`${rsUpper}?${rsMiscLower}+${rsOptContrLower}`, // Miscellaneous lowercase sequences with optional contractions
`${rsUpper}+${rsOptContrUpper}`, // All uppercase words with optional contractions (e.g., "THIS")
rsOrdUpper, // Ordinals for uppercase (e.g., "1ST", "2ND")
rsOrdLower, // Ordinals for lowercase (e.g., "1st", "2nd")
`${rsDigit}+`, // Pure digits (e.g., "123")
rsEmoji, // Emojis (e.g., 😀, ❤️)
].join('|'),
'g',
);
e1b7aae
to
3c5a3c7
Compare
867402c
3c5a3c7
to
867402c
Compare
ca3fed3
to
4e1eb91
Compare
Quality Gate passedIssues Measures |
What are the changes introduced in this PR?
allowUsersContextTraits
when set to false, ifcontext.traits.*
is present, it will be added only ascontext_traits_*
.underscoreDivideNumbers
when set to false, if a column has a format like "*v3*
", it will be formatted to "*v3*
".What is the related Linear task?
Developer checklist
Reviewer checklist