Permalink
Browse files

merged

  • Loading branch information...
ctb committed Feb 26, 2010
2 parents ea00a18 + d0ef1bc commit e21ee0f495a00520ce7b845f21b8c6576a2be815
Showing with 863 additions and 480 deletions.
  1. +21 −6 README.html
  2. +24 −6 README.txt
  3. +48 −0 client/build-nose.py
  4. +46 −0 client/build-quixote
  5. +321 −303 client/pony_client.py
  6. +4 −0 client/test_client/__init__.py
  7. +104 −10 client/test_client/test_git_client.py
  8. +9 −1 client/test_client/test_hg_client.py
  9. +163 −0 client/test_client/test_svn_client.py
  10. +1 −0 examples/change-receiver/github-notify.json
  11. +49 −0 examples/change-receiver/github-receiver.cgi
  12. +14 −0 examples/change-receiver/test-post-github-notify.py
  13. +4 −1 pony_build/coordinator.py
  14. +0 −35 pony_build/qx_web/util.py
  15. +0 −42 pony_build/server.py
  16. +0 −69 pony_build/tests/test_webhook_notify.py
  17. +4 −4 pony_build/tests/testutil.py
  18. 0 pony_build/{qx_web → web}/__init__.py
  19. +1 −1 pony_build/{qx_web → web}/run.py
  20. 0 pony_build/{qx_web → web}/templates/base.html
  21. 0 pony_build/{qx_web → web}/templates/empty.html
  22. 0 pony_build/{qx_web → web}/templates/feed_base.html
  23. 0 pony_build/{qx_web → web}/templates/feed_generic_index.html
  24. 0 pony_build/{qx_web → web}/templates/feed_generic_package_index.html
  25. 0 pony_build/{qx_web → web}/templates/feed_index.html
  26. 0 pony_build/{qx_web → web}/templates/forms.html
  27. BIN pony_build/{qx_web → web}/templates/img/background.png
  28. BIN pony_build/{qx_web → web}/templates/img/dark_line.png
  29. BIN pony_build/{qx_web → web}/templates/img/light_line.png
  30. 0 pony_build/{qx_web → web}/templates/package_all.html
  31. 0 pony_build/{qx_web → web}/templates/package_base.html
  32. 0 pony_build/{qx_web → web}/templates/package_summary.html
  33. 0 pony_build/{qx_web → web}/templates/results_base.html
  34. 0 pony_build/{qx_web → web}/templates/results_files_index.html
  35. 0 pony_build/{qx_web → web}/templates/results_index.html
  36. 0 pony_build/{qx_web → web}/templates/results_inspect.html
  37. 0 pony_build/{qx_web → web}/templates/style.css
  38. 0 pony_build/{qx_web → web}/templates/top_index.html
  39. 0 pony_build/{qx_web → web}/urls.py
  40. +48 −0 pony_build/web/util.py
  41. +2 −2 setup.py
View
@@ -327,13 +327,13 @@ <h1><a id="requirements" name="requirements">Requirements</a></h1>
<h1><a id="pony-build-server" name="pony-build-server">pony-build server</a></h1>
<p>The command:</p>
<pre class="literal-block">
-python -m pony_build.qx_web.run &lt;shelve filename&gt; &lt;port&gt;
+python -m pony_build.web.run &lt;shelve filename&gt; -p &lt;port&gt;
</pre>
<p>will run the Quixote-based pony-build Web app on the given port,
-reading &amp; writing from the shelve database in 'filename'.</p>
+reading &amp; writing from the sqlite database in 'filename'.</p>
<p>For example,</p>
<pre class="literal-block">
-python -m pony_build.qx_web.run test.db 8080
+python -m pony_build.web.run test.db -p 8080
</pre>
<p>will run a server that can be accessed on <a class="reference" href="http://localhost:8080/">http://localhost:8080/</a>. This
server will report on whatever results are sent to it by the client (see
@@ -418,7 +418,7 @@ <h2><a id="notifications" name="notifications">Notifications</a></h2>
someone else deal with translating those into e-mail alerts, etc.</p>
<p>All of the RSS feeds that pony-build makes available can be posted to
pubsubhubbub with the proper configuration (see -P and -S options to
-<tt class="docutils literal"><span class="pre">pony_build.qx_web.run</span></tt>). A simple example CGI callback script that
+<tt class="docutils literal"><span class="pre">pony_build.web.run</span></tt>). A simple example CGI callback script that
sends an e-mail is available in
<tt class="docutils literal"><span class="pre">examples/push-cgi/notifier/push-subscriber.cgi</span></tt> in the pony-build
source distribution.</p>
@@ -450,10 +450,15 @@ <h1><a id="some-medium-term-ideas" name="some-medium-term-ideas">Some medium-ter
<div class="section">
<h1><a id="development" name="development">Development</a></h1>
<p>pony-build is hosted on github, at: <a class="reference" href="http://github.com/ctb/pony-build">http://github.com/ctb/pony-build</a></p>
-<p>To run the tests:</p>
+<p>To run the server tests:</p>
<pre class="literal-block">
python -m pony_build.tests.run
</pre>
+<p>To run the client tests:</p>
+<pre class="literal-block">
+cd client
+nosetests
+</pre>
</div>
<div class="section">
<h1><a id="design-and-ideas-for-the-future" name="design-and-ideas-for-the-future">Design and Ideas for the Future</a></h1>
@@ -520,6 +525,12 @@ <h2><a id="some-general-design-principles" name="some-general-design-principles"
</blockquote>
</div>
<div class="section">
+<h2><a id="contributors" name="contributors">Contributors</a></h2>
+<p>Jacob Kaplan-Moss, Max Laite, Jack Carlson, Fatima Cherkaoui, and Khushboo
+Shakya have all contributed code and ideas.</p>
+<p>(If I'm missing anyone, please drop me a note!)</p>
+</div>
+<div class="section">
<h2><a id="acks" name="acks">Acks</a></h2>
<p>Titus says: Jesse Noller, Doug Philips, and Josh Williams discussed
things with me and are, collectively, entirely responsible for any bad
@@ -533,12 +544,16 @@ <h2><a id="acks" name="acks">Acks</a></h2>
<a class="reference" href="http://lists.idyll.org/pipermail/testing-in-python/2009-March/001277.html">http://lists.idyll.org/pipermail/testing-in-python/2009-March/001277.html</a></blockquote>
<p>where Kumar suggests that I just use Hudson for chrissakes. He's
probably right.</p>
+<p>Eric Holscher and Jacob Kaplan-Moss took the pony-build idea and ran
+with it, producing a parallel universe of Django-based reporting
+servers and REST-ish clients that report via JSON. Check out
+devmason.com and 'pony_barn' to see their approach in action.</p>
</div>
<div class="section">
<h2><a id="references" name="references">References</a></h2>
<p>webhooks: <a class="reference" href="http://webhooks.pbworks.com/">http://webhooks.pbworks.com/</a></p>
<p>--</p>
-<p>CTB 8/24/09</p>
+<p>CTB 2/24/10</p>
</div>
</div>
</div>
View
@@ -48,14 +48,14 @@ pony-build server
The command: ::
- python -m pony_build.qx_web.run <shelve filename> <port>
+ python -m pony_build.web.run <shelve filename> -p <port>
will run the Quixote-based pony-build Web app on the given port,
-reading & writing from the shelve database in 'filename'.
+reading & writing from the sqlite database in 'filename'.
For example, ::
- python -m pony_build.qx_web.run test.db 8080
+ python -m pony_build.web.run test.db -p 8080
will run a server that can be accessed on http://localhost:8080/. This
server will report on whatever results are sent to it by the client (see
@@ -155,7 +155,7 @@ someone else deal with translating those into e-mail alerts, etc.
All of the RSS feeds that pony-build makes available can be posted to
pubsubhubbub with the proper configuration (see -P and -S options to
-``pony_build.qx_web.run``). A simple example CGI callback script that
+``pony_build.web.run``). A simple example CGI callback script that
sends an e-mail is available in
``examples/push-cgi/notifier/push-subscriber.cgi`` in the pony-build
source distribution.
@@ -195,10 +195,15 @@ Development
pony-build is hosted on github, at: http://github.com/ctb/pony-build
-To run the tests::
+To run the server tests::
python -m pony_build.tests.run
+To run the client tests::
+
+ cd client
+ nosetests
+
Design and Ideas for the Future
===============================
@@ -270,6 +275,14 @@ soon let buildbot pick up the higher-end ideas if they're game, too.
send "final results, authenticate with update token"
receive "ack"
+Contributors
+------------
+
+Jacob Kaplan-Moss, Max Laite, Jack Carlson, Fatima Cherkaoui, and Khushboo
+Shakya have all contributed code and ideas.
+
+(If I'm missing anyone, please drop me a note!)
+
Acks
----
@@ -290,11 +303,16 @@ You can also read this discussion starting here,
where Kumar suggests that I just use Hudson for chrissakes. He's
probably right.
+Eric Holscher and Jacob Kaplan-Moss took the pony-build idea and ran
+with it, producing a parallel universe of Django-based reporting
+servers and REST-ish clients that report via JSON. Check out
+devmason.com and 'pony_barn' to see their approach in action.
+
References
----------
webhooks: http://webhooks.pbworks.com/
--
-CTB 8/24/09
+CTB 2/24/10
View
@@ -0,0 +1,48 @@
+#! /usr/bin/env python
+import sys
+import pprint
+from pony_client import BuildCommand, TestCommand, do, send, \
+ TempDirectoryContext, SetupCommand, HgClone, check, parse_cmdline, \
+ PythonPackageEgg
+
+options, args = parse_cmdline()
+
+python_exe = 'python'
+if args:
+ python_exe = args[0]
+
+repo_url = 'http://bitbucket.org/jpellerin/nose/'
+
+tags = ['nose']
+name = 'build-nose'
+
+server_url = options.server_url
+
+if not options.force_build:
+ if not check(name, server_url, tags=tags):
+ print 'check build says no need to build; bye'
+ sys.exit(0)
+
+context = TempDirectoryContext()
+commands = [ HgClone(repo_url, name='checkout'),
+ BuildCommand([python_exe, 'setup.py', 'build_ext', '-i'],
+ name='compile'),
+ TestCommand([python_exe, 'setup.py', 'test'], name='run tests'),
+ PythonPackageEgg(python_exe)]
+
+results = do(name, commands, context=context)
+client_info, reslist, files = results
+
+if options.report:
+ print 'result: %s; sending' % (client_info['success'],)
+ send(server_url, results, tags=tags)
+else:
+ print 'build result:'
+ pprint.pprint(client_info)
+ pprint.pprint(reslist)
+
+ print '(NOT SENDING BUILD RESULT TO SERVER)'
+
+if not client_info['success']:
+ sys.exit(-1)
+
View
@@ -0,0 +1,46 @@
+#! /usr/bin/env python
+import sys
+import pprint
+from pony_client import BuildCommand, TestCommand, do, send, \
+ TempDirectoryContext, SetupCommand, GitClone, check, parse_cmdline, \
+ PythonPackageEgg, test_python_version
+
+options, _ = parse_cmdline()
+
+python_exe = options.python_executable
+
+if not test_python_version(python_exe):
+ print "Unable to find " + python_exe + ". Failing..."
+ sys.exit(1)
+
+repo_url = 'git://quixote.ca/quixote'
+
+tags = [python_exe] + options.tagset
+name = 'quixote'
+
+server_url = options.server_url
+
+if not options.force_build:
+ if not check(name, server_url, tags=tags):
+ print 'check build says no need to build; bye'
+ sys.exit(0)
+
+context = TempDirectoryContext()
+commands = [ GitClone(repo_url, name='checkout'),
+ BuildCommand([python_exe, 'setup.py', 'install'], name='compile')]
+
+results = do(name, commands, context=context)
+client_info, reslist, files = results
+
+if options.report:
+ print 'result: %s; sending' % (client_info['success'],)
+ send(server_url, results, tags=tags)
+else:
+ print 'build result:'
+ pprint.pprint(client_info)
+ pprint.pprint(reslist)
+
+ print '(NOT SENDING BUILD RESULT TO SERVER)'
+
+if not client_info['success']:
+ sys.exit(-1)
Oops, something went wrong.

0 comments on commit e21ee0f

Please sign in to comment.