OpenTreeOfLife/phylesystem-api — pull request #109 by mtholder (2014-09-10 11:46:26+00:00)
Title: Alert clogged push

Resubmitting this as a new pull request (after I merged the last pull request and then merged master into
this branch). I closed the last request, because it lacked those changes.

The main change is to add a push_failure service that returns a JSON object with a "pushes_succeeding" set to False if the last push to GitHub failed.

While doing this (and setting up the tests on a local instance), it was also convenient to tweak the behavior of the GET of a study/. Now, the duplicateStudyIDs property of the response JSON will only be included if OTI could be reached. Previously, if OTI was not reachable, the GET would fail with an exception. (implementing this here let me test my core changes without getting OTI set up on my testing study repo).

testing:
See TESTING.md for the tests. They should pass. If you then add a commit to the GitHub version of your testing phylesystem repo (through some mechanism other than the phylesystem-api) then the test_study_push.py should start to fail. When it is failing, the http://DOMAIN/phylesystem/v1/push_failure URL should show a failure.
If you do a "git origin pull master" on your testing repo, then the tests should start to work again (and http://DOMAIN/phylesystem/v1/push_failure should start to report that the pushes are succeeding).