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

add brew analytics command #173

Merged
merged 1 commit into from
May 1, 2016
Merged

add brew analytics command #173

merged 1 commit into from
May 1, 2016

Conversation

xu-cheng
Copy link
Member

@xu-cheng xu-cheng commented May 1, 2016

No description provided.

@xu-cheng xu-cheng added the discussion Input solicited from others label May 1, 2016
@MikeMcQuaid
Copy link
Member

Looks great to me. Mind updating https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md to note to use it instead of the commands?

@@ -0,0 +1,44 @@
#: * `analytics` [`state`]:
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to point to the analytics documentation in here and use the language from there (anonymous user behaviour analytics)

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@DomT4
Copy link
Member

DomT4 commented May 1, 2016

Heh, was talking about this with Mike the other day. You beat me to actually getting the work done 😃.

#: * `analytics` [`state`]:
#: Display analytics state.
#:
#: * `analytics` `on`|`off`:
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be

#:  * `analytics` (`on`|`off`):

to be consistent with other documentation we have where there's a list of mandatory alternatives.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@DomT4
Copy link
Member

DomT4 commented May 1, 2016

Part of me wonders if HOMEBREW_NO_ANALYTICS_THIS_RUN shouldn't be set permanently for this command. It seems a little counterproductive to track anonymous usage at the same time someone is considering whether to stay opted in/out.

@UniqMartin
Copy link
Contributor

Good work! It would be great to also update the shell completion of your shell to work with this new command.

Part of me wonders if HOMEBREW_NO_ANALYTICS_THIS_RUN shouldn't be set permanently for this command. It seems a little counterproductive to track anonymous usage at the same time someone is considering whether to stay opted in/out.

We could consider adding it to the list of commands exempt from tracking (we're already excluding brew commands).

@DomT4
Copy link
Member

DomT4 commented May 1, 2016

Your suggestion sounds good to me, FWIW.

Edit - Reworded for clarity.

@xu-cheng
Copy link
Member Author

xu-cheng commented May 1, 2016

Part of me wonders if HOMEBREW_NO_ANALYTICS_THIS_RUN shouldn't be set permanently for this command. It seems a little counterproductive to track anonymous usage at the same time someone is considering whether to stay opted in/out.

We could consider adding it to the list of commands exempt from tracking (we're already excluding brew commands).

I think we should do this in another PR. Because there are many other commands (e.g, --prefix) belong to this category. At the same time, I'm wondering should we only send screen view for only selective commands as personally I don't feel that such statistics can help us much.

Addressed other comments.

@MikeMcQuaid
Copy link
Member

Currently brew analytics off will be tracked and create the UUID file, no? Also missing the change to the analytics documentation.

@xu-cheng
Copy link
Member Author

xu-cheng commented May 1, 2016

Currently brew analytics off will be tracked and create the UUID file, no?

Good point, fixed this.

Also missing the change to the analytics documentation.

What do you mean? Isn't it already in there? https://github.com/Homebrew/brew/pull/173/files#diff-de62681d221dc414a999cf7eec2f0f36

@MikeMcQuaid
Copy link
Member

@xu-cheng Sorry, I missed that before, my mistake.

@xu-cheng
Copy link
Member Author

xu-cheng commented May 1, 2016

NP, just want to check if I missing anything.

Ready to ship?

case "$HOMEBREW_COMMAND" in
--prefix|analytics|command|commands)
return ;;
esac
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit, but so far we seem to prefer either

case "$HOMEBREW_COMMAND" in
  --prefix|analytics|command|commands)
    return
    ;;
esac

or

case "$HOMEBREW_COMMAND" in
  --prefix|analytics|command|commands) return;;
esac

@UniqMartin
Copy link
Contributor

Ready to ship?

One final (and very minor) remark, but otherwise 👍.

@xu-cheng xu-cheng merged commit 98aff27 into Homebrew:master May 1, 2016
@xu-cheng xu-cheng deleted the analytics branch May 1, 2016 14:04
@UniqMartin UniqMartin mentioned this pull request May 1, 2016
5 tasks
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion Input solicited from others
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants