-
Notifications
You must be signed in to change notification settings - Fork 323
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
Improved Google Analytics integration #11484
Conversation
distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics_Account.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics_Account.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Google_Api/0.0.0-dev/src/Google_Analytics_Account.enso
Outdated
Show resolved
Hide resolved
## PRIVATE | ||
to_text : Text | ||
to_text self = case self of | ||
Google_Analytics_Field.Dimension _ -> self.apiName + " (Dimension)" | ||
Google_Analytics_Field.Metric _ -> self.apiName + " (Metric)" | ||
|
||
## PRIVATE | ||
to_display_text : Text | ||
to_display_text self = case self of | ||
Google_Analytics_Field.Dimension _ -> "GA Dimension { " + self.apiName + " (" + self.category + ")}" | ||
Google_Analytics_Field.Metric _ -> "GA Metric { " + self.apiName + " (" + self.category + ")}" |
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.
What is the reasoning why to_text
becomes foo (Dimension)
and to_display_text
becomes GA Dimension { foo (category) }
?
tbh I'm not sure what are our 'guidelines' for what each of these representations shall look like. I know that to_display_text
was created in the past to limit the size of text representations of large data structures (i.e. ensuring that a 1M vector can still be displayed and not overwhelm the visualization protocol). So overall to_display_text
was meant to be the 'shorter' one.
But I guess over time they also grew that to_display_text
is the one 'more' human readable.
I wanted to understand why the particular choice here. Not at all questioning it's correctness - I have absolutely no idea what the text representations should be here - that's why I'm asking.
## Have to do date parsing first to allow for pure numeric formats. | ||
date_parsers = [self.make_date_time_parser, self.make_date_parser, self.make_time_of_day_parser] |
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 comment is appreciated, it would not be at all apparent why/if the ordering is significant. Thanks.
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 widgets look awesome!
Got some minor comments/questions, but looks good overall. I would appreciate some pointers explaining some unexpected stuff (like where the "MOCK"
account is coming from).
I was a bit on the fence about the main 'read' logic being moved into Java. On one hand, it felt good to have it in Enso because it is a good example of how powerful the language can be - that you can create a whole integration with a Java library purely from Enso, using the polyglot
imports. It is certainly possible to do all of this in Enso, although possibly with a bit more hoops here and there. And for the longer term, I think it's important - to be able to convince users that Enso can be used also for more 'low level' library integrations. But for now, I do think it being in Java will probably be quicker to extend and easier to maintain, given the superior tooling. So I'm not saying we should change anything, just wanted to a little bit of sadness that we are not preferring to use our own language, even if it's possible (but in this particular context the decision does make sense).
@jdunkerley seems like you've unintentionally checked in (obsolete) files under |
Add calling through account to property to metric/dim .
Caching for metadata.
Alter Table parse so Date is recognised. Expose Table.from_java_table to allow internal building of Table.
Java format.
PR comment.
Test for no format still being integer.
4bdf188
to
63e9fee
Compare
Pull Request Description
Google_Credential.new
method.Google_Analytics.list_accounts
).Google_Analytics.list_properties
).Google_Analytics_Account
,Google_Analytics_Property
andGoogle_Analytics_Field
with some helper methods.account
,property
andcredentials
.dimensions
andmetrics
with defaults and then reading from Admin API.start_date
andend_date
onGoogle_Analytics.read
.parse
with auto type by reordering to allow numeric dates to be parsed.Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.