-
Notifications
You must be signed in to change notification settings - Fork 362
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
BigQuery code generator #1342
BigQuery code generator #1342
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1342 +/- ##
==========================================
- Coverage 61.79% 61.66% -0.14%
==========================================
Files 292 294 +2
Lines 7882 7912 +30
==========================================
+ Hits 4871 4879 +8
- Misses 3011 3033 +22
Continue to review full report at Codecov.
|
(If this looks good, I'll only merge the first commit, and put the rest in another PR that has the implementation as well.) |
Overnight I've worked out some ways I can make the code much cleaner. Should do exactly the same thing though... feel free to hold off reviewing until I've pinged this thread again. |
00a70fa
to
41615e4
Compare
Okay, refactoring complete. Now most of the code works in terms of Parameter objects, which allows a lot more uniformity. |
The solution file changes are due to dotnet/project-system#1821 |
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.
Crude, but better than copy/pasting :)
LGTM
// Methods modifying labels on datasets | ||
|
||
#region SetDatasetLabel | ||
/// <summary> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
} | ||
} | ||
|
||
private static IEnumerable<string> ModifyCode(ApiMethod method, IEnumerable<string> existingCode) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Still a work in progress, but could massively reduce the scope for copy/paste typos.
8d0c035
to
36b7856
Compare
(Reduced to one commit, so no actual generated code. Will merge on green, then start working on the labels feature...) |
The code generator code itself is reasonably ugly, but that's not too much of a concern.
The second commit shows an example with four methods for label modification.
If we like this tool in general, I'll probably go back and apply it to the subset of existing methods that an easily be templated.