• Stars
    star
    141
  • Rank 251,477 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A system to share your appreciation

Build Status

Yelp Love

Yelp Love

Yelp Love lets you show others your appreciation for something they've done. Did they make you laugh in your darkest hour? Did they save your ass? Did they help fix that bug? Send them love!

Features

  • Send love to one or more recipients (publicly or privately)
  • Email notifications when users receive love
  • Viewing the most recent 20 loves sent or received by any user
  • Leaderboard with the top 20 users who sent and received love
  • API that allows external applications to send and retrieve love data
  • Manual or automated synchronization between Yelp Love and your employee data
  • Admin section to manage aliases and API keys

To get an idea what Yelp Love looks like go and check out the screenshots.

Installation

Yelp Love runs on Google App Engine. In order to install Yelp Love you will need a Google account and the Google App Engine SDK for Python 2.7.

Create a new project

Follow the instructions on creating a project and initializing your App Engine app - you'll also need to set up billing and give Cloud Build permission to deploy your app.

Prepare for deployment

Copy the example config file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.

Initial deployment

Finally, run

$ make deploy

This will open a browser window for you to authenticate yourself with your Google account and will upload your local application code to Google App Engine.

If the initial deployment fails with a Cloud Build error, try running

$ gcloud app deploy

manually. After that, make deploy should do the job, and will make sure everything is uploaded properly - including the worker service, database indexes and so on.

Once the deployment succeeds open your browser and navigate to your application URL, normally https://project_id.appspot.com.

Import employee data

CSV

Create a file employees.csv in the import directory, add all your employee data, and deploy it. We‘ve put an example csv file in that directory so you can get an idea of which fields Yelp Love requires for an employee.

Once the CSV file is deployed point your browser to https://project_id.appspot.com/employees/import. and follow the instructions.

JSON via Amazon S3

Create a file employees.json, add all your employee data, and save it in an S3 bucket. We‘ve put an example JSON file in the import directory so you can get an idea of which fields Yelp Love requires for an employee.

The S3 bucket name must be configured in config.py.

In order to access the S3 bucket you have to save AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY using the Secret model. Locally you can open up the interactive console and execute the following code:

from models import Secret

Secret(id='AWS_ACCESS_KEY_ID', value='change-me').put()
Secret(id='AWS_SECRET_ACCESS_KEY', value='change-me').put()

In production you can either use the Datastore UI or the Remote API.

To kick off the final import you have to run:

from logic import employee
employee.load_employees()

You can also setup a cronjob to keep employee data up to date. Checkout cron.yaml for further details.

Development

Prerequisites

Before you can run Yelp Love on your local machine please install the Google App Engine SDK for Python. You can get it from Google directly or use your favorite packet manager.

Running the application locally

Deployment

When you bumped versions in the appropriate files you can deploy your changes by running make deploy.

If you are seeing the following error:

Error 404: --- begin server output ---
This application does not exist (project_id=u'PROJECT-ID'). To create an App Engine application in this project, run "gcloud app create" in your console.

This is because GAE is no longer automatically initialized, you must run gcloud app create using the Google Cloud Shell (not your terminal...I know...confusing) before deploying on App Engine for the first time. See the screenshot below: GAE cloud shell

Once your code has been uploaded to Google, you must activate the newly deployed version in the Developer Console. Then you're done!

API

Yelp Love also ships with an API which will be available under https://project_id.appspot.com/api. All data of successful GET requests is sent as JSON.

Authentication

Successful requests to the API require an API key. These can be created in the Admin section of the application. Authenticating with an invalid API key will return 401 Unauthorized.

Endpoints

All names, e.g. sender or recipient in the following examples refer to employee usernames.

Retrieve love

GET /love?sender=foo&recipient=bar&limit=20

You must provide either a sender or a recipient. The limit parameter is optional - no limiting will be applied if omitted.

Example
curl "https://project_id.appspot.com/api/love?sender=hammy&api_key=secret"
[
  {
    "timestamp": "2017-02-10T18:10:08.552636",
    "message": "New Barking Release! <3",
    "sender": "hammy",
    "recipient": "darwin"
  }
]

Send love

POST /love

Sending love requires 3 parameters: sender, recipient, and message. The recipient parameter may contain multiple comma-separated usernames.

Example
curl -X POST -F "sender=hammy" -F "recipient=john,jane" -F "message=YOLO" -F "api_key=secret"  https://project_id.appspot.com/api/love
Love sent to john, jane!

Autocomplete usernames

GET /autocomplete?term=ham

The autocomplete endpoint will return all employees which first_name, last_name, or username match the given term.

Example
curl "https://project_id.appspot.com/api/autocomplete?term=ha&api_key=secret"
[
  {
    "label": "Hammy Yo (hammy)",
    "value": "hammy"
  },
  {
    "label": "Johnny Hamburger (jham)",
    "value": "jham"
  }
]

Original Authors and Contributors

For more info check out the Authors file.

License

Yelp Love is licensed under the MIT license.

Contributing

Everyone is encouraged to contribute to Yelp Love by forking the Github repository and making a pull request or opening an issue.

More Repositories

1

elastalert

Easy & Flexible Alerting With ElasticSearch
Python
7,926
star
2

dumb-init

A minimal init system for Linux containers
Python
6,624
star
3

detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.
Python
3,395
star
4

mrjob

Run MapReduce jobs on Hadoop or Amazon Web Services
Python
2,609
star
5

osxcollector

A forensic evidence collection & analysis toolkit for OS X
Python
1,858
star
6

paasta

An open, distributed platform as a service
Python
1,655
star
7

undebt

A fast, straightforward, reliable tool for performing massive, automated code refactoring
Python
1,632
star
8

MOE

A global, black box optimization engine for real world metric optimization.
C++
1,306
star
9

dockersh

A shell which places users into individual docker containers
Go
1,282
star
10

dataset-examples

Samples for users of the Yelp Academic Dataset
Python
1,189
star
11

yelp.github.io

A showcase of projects we've open sourced and open source projects we use
JavaScript
701
star
12

bravado

Bravado is a python client library for Swagger 2.0 services
Python
600
star
13

yelp-api

Examples of code using our v2 API
PHP
580
star
14

service-principles

A guide to service principles at Yelp for our service oriented architecture
423
star
15

swagger-gradle-codegen

💫 A Gradle Plugin to generate your networking code from Swagger
Kotlin
407
star
16

pyleus

Pyleus is a Python framework for developing and launching Storm topologies.
Python
406
star
17

mysql_streamer

MySQLStreamer is a database change data capture and publish system.
Python
405
star
18

yelp-fusion

Yelp Fusion API
Python
396
star
19

docker-custodian

Keep docker hosts tidy
Python
354
star
20

android-school

The best videos from the Android community and beyond
349
star
21

Tron

Next generation batch process scheduling and management
Python
340
star
22

kafka-utils

Python
312
star
23

bento

A delicious framework for building modularized Android user interfaces, by Yelp.
Kotlin
305
star
24

Testify

A more pythonic testing framework.
Python
303
star
25

clusterman

Cluster Autoscaler for Kubernetes and Mesos
Python
295
star
26

kotlin-android-workshop

A Kotlin Workshop for engineers familiar with Java and Android development.
Kotlin
289
star
27

threat_intel

Threat Intelligence APIs
Python
264
star
28

python-gearman

Gearman API - Client, worker, and admin client interfaces
Python
242
star
29

nrtsearch

A high performance gRPC server on top of Apache Lucene
Java
239
star
30

py_zipkin

Provides utilities to facilitate the usage of Zipkin in Python
Python
223
star
31

fuzz-lightyear

A pytest-inspired, DAST framework, capable of identifying vulnerabilities in a distributed, micro-service ecosystem through chaos engineering testing and stateful, Swagger fuzzing.
Python
193
star
32

yelp-python

A Python library for the Yelp API
Python
182
star
33

venv-update

Synchronize your virtualenv quickly and exactly.
Python
178
star
34

firefly

Firefly is a web application aimed at powerful, flexible time series graphing for web developers.
JavaScript
171
star
35

amira

AMIRA: Automated Malware Incident Response & Analysis
Python
151
star
36

YLTableView

Objective-C
146
star
37

aactivator

Automatically source and unsource a project's environment
Python
139
star
38

lemon-reset

Consistent, cross-browser React DOM tags, powered by CSS Modules. 🍋
JavaScript
131
star
39

detect-secrets-server

Python
109
star
40

bravado-core

Python
108
star
41

data_pipeline

Data Pipeline Clientlib provides an interface to tail and publish to data pipeline topics.
Python
108
star
42

dataloader-codegen

🤖 dataloader-codegen is an opinionated JavaScript library for automatically generating DataLoaders over a set of resources (e.g. HTTP endpoints).
TypeScript
107
star
43

yelp-ruby

A Ruby gem for communicating with the Yelp REST API
Ruby
105
star
44

swagger_spec_validator

Python
103
star
45

ybinlogp

A fast mysql binlog parser
C
97
star
46

beans

Bringing people together, one cup of coffee at a time
Python
90
star
47

casper

A fast web application platform built in Rust and Luau
Rust
86
star
48

schematizer

A schema store service that tracks and manages all the schemas used in the Data Pipeline
Python
85
star
49

requirements-tools

requirements-tools contains scripts for working with Python requirements, primarily in applications.
Python
81
star
50

osxcollector_output_filters

Filters that process and transform the output of osxcollector
Python
76
star
51

sensu_handlers

Custom Sensu Handlers to support a multi-tenant environment, allowing checks themselves to emit the type of handler behavior they need in the event json
Ruby
75
star
52

kegmate

Arduino/iPad powered kegerator
Objective-C
72
star
53

graphql-guidelines

GraphQL @ Yelp Schema Guidelines
Makefile
70
star
54

ephemeral-port-reserve

Find an unused port, reliably
Python
66
star
55

parcelgen

Helpful tool to make data objects easier for Android
Python
65
star
56

yelp-ios

Objective-C
62
star
57

salsa

A tool for exporting iOS components into Sketch 📱💎
Swift
62
star
58

docker-observium

Observium docker image with both professional and community edition support, ldap auth, and easy plugin support.
ApacheConf
57
star
59

yelp-android

Java
55
star
60

terraform-provider-signalform

SignalForm is a terraform provider to codify SignalFx detectors, charts and dashboards
Go
44
star
61

mycroft

Python
42
star
62

terraform-provider-gitfile

Terraform provider for checking out git repositories and making changes
Go
40
star
63

pidtree-bcc

eBPF tool for logging process ancestry of outbound TCP connections
Python
40
star
64

ffmpeg-android

Shell
39
star
65

pushmanager

Pushmanager is a web application to manage source code deployments.
Python
38
star
66

zygote

A Python HTTP process management utility.
Python
38
star
67

yelp_kafka

An extension of the kafka-python package that adds features like multiprocess consumers.
Python
38
star
68

pgctl

Manage sets of developer services -- "playground control"
Python
31
star
69

EMRio

Elastic MapReduce instance optimizer
Python
31
star
70

s3mysqldump

Dump mysql tables to s3, and parse them
Python
31
star
71

pyramid_zipkin

Pyramid tween to add Zipkin service spans
Python
28
star
72

android-varanus

A client-side Android library to monitor and limit network traffic sent by your apps
Kotlin
27
star
73

puppet-netstdlib

A collection of Puppet functions for interacting with the network
Ruby
27
star
74

sqlite3dbm

sqlite-backed dictionary conforming to the dbm interface
Python
27
star
75

send_nsca

Pure-python NSCA client
Python
26
star
76

data_pipeline_avro_util

Provides a Pythonic interface for reading and writing Avro schemas
Python
26
star
77

cocoapods-readonly

Automatically locks all CocoaPod source files.
Ruby
26
star
78

uwsgi_metrics

Python
26
star
79

docker-push-latest-if-changed

Python
25
star
80

WebImageView

An enhanced and improved ImageView for Android that displays images loaded over the interwebs
Java
25
star
81

task_processing

Interfaces and shared infrastructure for generic task processing at Yelp.
Python
23
star
82

PushmasterApp

(Legacy) Yelp pushmaster application built on Google App Engine
Python
22
star
83

tlspretense-service

A Docker container that exposes tlspretense on a port.
Makefile
20
star
84

puppet-uchiwa

Puppet module for installing Uchiwa
Ruby
20
star
85

yelp_cheetah

cheetah, hacked by yelpers
Python
20
star
86

logfeeder

Python
20
star
87

fido

Asynchronous HTTP client built on top of Crochet and Twisted
Python
20
star
88

pyramid-hypernova

A Python client for Airbnb's Hypernova server, for use with the Pyramid web framework.
Python
19
star
89

swagger-spec-compatibility

Python library to check Swagger Spec backward compatibility
Python
19
star
90

mr3po

protocols for use with mrjob
Python
16
star
91

YPFastDateParser

A class for parsing strings into NSDate instances, several times faster than NSDateFormatter
Objective-C
15
star
92

yelp_uri

Utilities for dealing with URIs, invented and maintained by Yelp.
Python
14
star
93

pysensu-yelp

A Python library to emit Sensu events that the Yelp Sensu Handlers can understand for Self-Service Sensu Monitoring
Python
14
star
94

terraform-provider-cloudhealth

Terraform provider for Cloudhealth
Go
14
star
95

yelp-rails-example

An example Rails application that uses the Yelp gem to integrate with the API
Ruby
13
star
96

named_decorator

Dynamically name wrappers based on their callees to untangle profiles of large python codebases
Python
12
star
97

pt-online-schema-change-plugins

Perl
11
star
98

puppet-cron

A super great cron Puppet module with timeouts, locking, monitoring, and more!
Ruby
11
star
99

doloop

Task loop for keeping things updated
Python
10
star
100

environment_tools

Tools for programmatically describing Yelp's different environments (prod, dev, stage)
Python
10
star