Code Monkey home page Code Monkey logo

standup's Introduction

README

Summary

Standup is an app that logs daily status updates. It is in perpetual Beta which is to say that it probably has bugs and you shouldn't bet a million dollars on it.

We developed it with the following priorities:

  1. Lets the team, stake holders and everyone else see status for team members across projects.
  2. Lets us do that asynchronously. Conference calls were getting difficult to schedule because of the range of timezones we're in.
  3. Lets us see who's blocked on what---then scrummasters can go through and work to unblock people.

Years passed. It was cool, then time passed and it bitrotted and in that time we discovered we had various needs and Persona was dying. So a small elite group of us rewrote it in Django.

This is Standup v2--a Django rewrite of the original.

Who builds Standups

Standups development is done by contributors (including you!). No one is paid to work on it. It's not part of anyone's quarterly goals.

If there are changes you need, your options are these:

  1. Implement/fix it yourself.
  2. Find someone else to do it.

You can see a summary of project activity.

The Standups service is maintained by Paul and Will. Swag donations are encouraged and welcome!

Hacking

To set up a local dev environment for hacking:

  1. Clone the repo:

    $ git clone git://github.com/mozilla/standup.git
    $ cd standup
    
  2. Configure.

  3. Run:

    $ make run
    

Then connect to it at http://localhost:8000/.

Oh, but wait--what can you do with it? Well, for testing purposes, you can use the included bin/standup-cmd which is a command-line tool you can use to create statuses.

Example:

$ ./bin/standup-cmd localhost:8000 ou812 willkg sumo "hi."

Configuration

See standup/settings.py for settings you can define in the environment.

Testing

We use pytest for testing. To run the tests, do:

$ make test

Remember to run tests before submitting pull requests!

We also have a set of smoketests.

To run them against your local dev environment:

  1. To start up Standup in one terminal, run:

    $ make run
    
  2. In another terminal, run:

    $ make test-smoketest
    

To run the tests against another server, use the SERVER_URL environment variable:

$ SERVER_URL=http://example.com make test-smoketest

To run on Heroku

  1. Create a heroku app:

    heroku apps:create myapp
    
  2. Push the code:

    git push heroku master
    
  3. Set up required environment variables:

    heroku config:set SECRET_KEY=<KEYHERE>
    heroku config:set ALLOWED_HOSTS=<HEROKU_HOST_HERE>
    

    You can see other variables you can set in the environment in standup/settings.py.

  4. You should be all set!

standup's People

Contributors

arai-a avatar comzeradd avatar freddyb avatar groovecoder avatar jayfk avatar jezdez avatar manishearth avatar mreid-moz avatar mythmon avatar openjck avatar pmac avatar pyup-bot avatar rehandalal avatar rlr avatar robhudson avatar sheeri avatar tobbi avatar tofumatt avatar willkg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

standup's Issues

Error messages should be JSON in the API, not HTML.

This is hard for a bot to parse ;)

"<!doctype html>\n<html>\n<head>\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n  <title></title>\n  <link rel=\"stylesheet\" type=\"text/css\" href=\"/static/css/normalize.css\">\n  <link rel=\"stylesheet/less\" type=\"text/css\" href=\"/static/less/style.less\">\n  <script src=\"/static/js/less.js\"></script>\n</head>\n<body>\n  <header>\n    <div class=\"container_8\">\n      <div class=\"grid_2\">\n        <a class=\"logo\" href=\"/\">standup</a>\n      </div>\n      <div class=\"grid_6\">\n        <nav>\n          <ul>\n            <li><a href=\"#\">Admin</a></li>\n          </ul>\n        </nav>\n      </div>\n    </div>\n  </header>\n\n  <div class=\"container_8 cf\">\n    \n  <div class=\"grid_8\">\n    <h1>500: Something went wrong...</h1>\n  </div>\n\n    <div class=\"grid_8\">\n      <footer>\n        <a href=\"https://github.com/rlr/standup\">Contribute to this site.</a>\n        <br>Found a bug? <a href=\"https://github.com/rlr/standup/issues\">File an issue!\n      </footer>\n    </div>\n  </div>\n</body>\n</html>"

Add teams

We should be able to group users into teams. Each user can be in 0 or 1 teams (nullable FK).

automatically submit status reports for github activity

in #mdndev we have a lot of:

12:02:21 - github: [kuma] groovecoder pushed 2 new commits to master: https://github.com/mozilla/kuma/compare/affa7ce93d20...d8609f7d32dd
12:02:21 - github: kuma/master dceb729 Les Orchard: fix bug 821988: Use wiki bleach filter on revision content
12:02:21 - github: kuma/master d8609f7 luke crouch: Merge pull request #790 from lmorchard/821988-revision-content-xss...

would be great if rogerroger could pick up 'Les Orchard: fix bug 821988' and 'luke crouch: merge pull request #790" and make them "fixed bug 821988" and "merged pull 790" status reports?

Linkify bugs

Something like Bug 123456 or bug #123456 should be linkified to bugzilla.

restructure code into a project

Currently the code is all in app.py with an app_test.py, but we should restructure it into a "proper" Python project. That probably entails:

standup/ (repo)
|- README.rst
|- LICENSE
|- ...
|- standup/ (python module)
    |- __init__.py
    |- app.py
    |- templates/
    |- tests/
        |- __init__.py
        |- test_app.py

web app front end

I think it would be super to add a web app front end for this that's primarily javascript and uses the API. We'd give it an appcache and then people could install it locally.

It'd have a twitter like interface: box for new status things and a timeline of the last 50 status things on the site for your team. Maybe also have a "report" for anything tagged with "block*".

Or something like that. That'd be pretty helpful.

Status updates with no project

So it looks like @openjck created a project for his "personal" standups that don't really relate to a project. So maybe we should change the behavior so that PM'ing the bot will post an update with no project that shows up only on the individual user page and the main stream.

Cannot log in via Persona

When I try to login to the production site with Persona, I consistently get an error message: "We were unable to sign you in. Please try again.". Not sure if this is meant to be working yet or if it's still experimental.

remove top-level __init__.py

You don't need the top-level __init__.py. You only need __init__.py in Python module directories. So, in your Procfile, you say "standup.app" where "standup" is a module that needs a __init__.py, but the parent does not need one. The PYTHONPATH should include the top level directory.

If that's not the case, then something is fishy.

Create a simple admin app

I see projects like flask-admin and formalchemy. Figure out what to use and implement a basic admin to do the basic CRUD stuff.

Attachments for statuses

It would be cool to have attachments for statuses. I'm thinking kind of like facebook where posting a youtube url attaches a youtube video to the status etc.

standup.tests.test_app:AppTestCase.test_update_user fails

Looks like @rehandalal implemented the update user api with this route:

@app.route('/api/v1/user/<id>/', methods=['POST'])

But then @mythmon changed it to this route:

@app.route('/api/v1/user/<username>/', methods=['POST'])

in d8e3a6d.

I'm not sure which is what we actually intend. I don't want to change it because I can't tell what ramification it has on standup-irc. However, changing it to username seems like it's now inconsistent with other api routes.

Regardless, I'm pretty sure this change broke the test_update_user test:

======================================================================
FAIL: Test that a user can update their own settings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/willkg/mozilla/standup/standup/tests/test_app.py", line 168, in test_update_user
    self.assertEqual(response.status_code, 200)
AssertionError: 403 != 200

That's failing because it's passing in a user id and not a username and then the api kicks up a 403 "You cannot modify this user."

tests shouldn't require local_settings.py

Currently, the tests fail if you don't have a local_settings.py file. That's bad. It really should use a test_settings.py file where we can control the settings rather than use local_settings.py which will vary from installation to installation. Otherwise we have tests that succeed/fail depending on the environment and that's not wildly useful.

Generate reports of status updates

I would love if Standup could generate a report of status updates. For example, a report that showed all status updates made by #mdndev on July 29, or a report of all status updates made by me in the last week.

This could be useful in communicating progress to managers, stakeholders, and others.

Use Pacific Time

I noticed that Standup seems to be using UTC. Many of the status reports I file in the evening show up in the next day instead.

Maybe it would be better to use Pacific Time (the UTC of Mozilla!) instead.

"No funny characters!"

When a status contains non-ascii characters, there is a 400 response with the text

{"description": "The browser (or proxy) sent a request that this server could not understand."}

Bot does not allow spaces in names

STR:

  1. rogerroger: !update name John Karahalis openjck

Actual result:
<rogerroger> I'm a failure, I couldn't do it.

Expected result:
Bot updates name to "John Karahalis"

ditch markdown headers

So an update like this:
#mfbt in Toronto

Gets converted into:
<h1>mfbt in Toronto</h1>

Not sure if we can partially implement markdown to only support certain features we want, since we probably don't need headlines and stuff. Plus we can prevent @ednapiranha from spamming the main feed with images.

Double status message

I told rogerroger to post a status update and it asked me to register with NickServ. After registering I sent an identical update and it posted two identical updates on the website.

use nose

We should switch the app to use nose. Then we get eq_ and some other nice things.

adjust url for webhook

We're probably going to want to change things at some point. Given that, my vote is that the end point for the webhook should be something like this:

/api/v1/status/

Also, it should have a trailing slash.

This makes it more inline with tastypie which I'm using as a "defacto convention".

proper 404s

There are a few places in the code that have:

# TODO: raise a proper 404

So I created an issue for that.

Formatting updates

We should probably have a filter or parser to do some fancy formatting for updates. This includes:

  • Breaking out lists into actual HTML unordered lists. So 1. did something 2. did something else becomes <ul><li>did something</li><li>did something else</li></ul>. Likewise with - did something - did something else.
  • Make hashtags into labels. So #blocked and #tag would be removed from the content and float over to the start of the message into specially styled boxes to be labels.
  • bug 12345 or bug #12345 would link to bugzilla
  • pull 123 or pull #123 would link to github pull requests
  • *something* would become something
  • **something** would become something
  • url's should be converted to anchor tags

posting from web site with meh account ISEs

When you log into standups, it logs you in by your email address. If you previously only used the irc bot to post statuses, then your account has no email address associated with it. So then when you go to post from the web site, it tries to create a new account for you and if the username portion of your email address matches an existing account, then it DIES!

Some problems:

  1. We should probably nix the "create a user account if there isn't one when posting from the web". I'm not sure what we should do instead, though. How should you associate a persona login with a user account that might already exist since you posted from IRC?
  2. When you log into the website for the first time, it should figure out all the account hoo-hah right there. If you don't have an account, then it should create one for you or associate you to an existing account. Maybe we should turn it around and force people to log in to the web site to create the account instead of automatically generating one from irc?
  3. When the sql stuff dies, it shouldn't kick up an ISE. Instead it should log something useful so we can see it in the logs and then kick up the 500 error page template.

Notifications

So now that we have comments on Standup I suppose it would be nice to have a notification system to tell you when someone has commented on one of your updates.

Show all status updates from a specified date

Show all status updates from a specified date. This would not be as nice as #63 (full-fledged reports) but would still be very handy.

For example:

http://standu.ps/user/openjck/2012-08-20
All updates filed by openjck on 2012-08-20.

http://standu.ps/project/mdndev/2012-08-20
All updates filed in #mdndev on 2012-08-20.

http://standu.ps/team/sumo/2012-08-20
All updates filed by SUMO on 2012-08-20.

I tried to fork Standup to add this in myself, but I'm not a Django guy so I got a little over my head. Any guidance you can share?

support emoji

http://www.emoji-cheat-sheet.com/

We should add support for those using some syntax. I very much look forward to the day I can use :trollface:, :rage3: and ๐Ÿ’ฉ--especially that last one. Doesn't have to be the syntax that github uses. Any is fine.

Fix the timezone issues

So @mythmon's soluton was a pretty good first attempt at fixing but we should probably go with @rlr's suggested solution to use javascript to set a cookie with the timezone on first visit and then adjust the timezone server side.

need a Halp page

In the upper right hand corner should be a Halp link to the Halp page. Halp is like Help, but probably less useful. It'd cover the following:

  1. how to get rogerroger in your channel.
  2. syntax for standup messages and noting that some tags have special behavior.
  3. link to code, issues and all that (which duplicates the links at the bottom, but I think those are so far at the bottom they're not easy to bump into)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.