Merge lp:~free.ekanayaka/txamqp/travis-integration into lp:txamqp

Proposed by Free Ekanayaka
Status: Merged
Merged at revision: 75
Proposed branch: lp:~free.ekanayaka/txamqp/travis-integration
Merge into: lp:txamqp
Diff against target: 114 lines (+29/-16)
4 files modified
.travis.yml (+8/-0)
doc/README (+16/-13)
requirements.txt (+1/-0)
src/txamqp/test/test_basic.py (+4/-3)
To merge this branch: bzr merge lp:~free.ekanayaka/txamqp/travis-integration
Reviewer Review Type Date Requested Status
txAMQP Team Pending
Review via email: mp+296788@code.launchpad.net

Description of the change

This branch adds a .travis.yml file with basic configuration for making txamqp tests running on Travis.

An example build is available here:

https://travis-ci.org/freeekanayaka/txamqp

It already caught a small flakiness in a test (apparently basic_qos should be sent before publishing messages, although I couldn't reproduce that failure locally).

I also added a README.md file which symlinks to the (now markdown-ified) doc/README. If there's no need to keep those files under doc/, I could just move them to the top-level dir. The CI badge snippet for now points at my Travis account, but I noticed that GitHub already has a "txamqp" organization, so it'd be nice if we could add an official GitHub mirror of lp:txlongpoll at https://github.com/txamqp/txamqp.

Note that Launchpad only supports syncing a branch *from* GitHub, but not *to*. However it's easy to do that via webhooks. I already have a service that could handle the job, so if you wish it'd be just be a matter of adding that special URL in Launchpad and granting my ssh key write access to GitHub.

You can see how the rendered README looks like here:

https://github.com/freeekanayaka/txamqp

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.travis.yml'
2--- .travis.yml 1970-01-01 00:00:00 +0000
3+++ .travis.yml 2016-06-08 13:24:16 +0000
4@@ -0,0 +1,8 @@
5+sudo: false
6+dist: trusty
7+language: python
8+python:
9+ - 2.7
10+services: rabbitmq
11+install: pip install -r requirements.txt
12+script: cd src; TXAMQP_BROKER=RABBITMQ trial txamqp
13
14=== added symlink 'README.md'
15=== target is u'doc/README'
16=== modified file 'doc/README'
17--- doc/README 2009-08-15 10:27:56 +0000
18+++ doc/README 2016-06-08 13:24:16 +0000
19@@ -1,51 +1,54 @@
20+## Python library for communicating with AMQP peers and brokers using Twisted
21+[![Build Status](https://travis-ci.org/freeekanayaka/txamqp.svg?branch=master)](https://travis-ci.org/freeekanayaka/txamqp)
22+
23 This is a quick post on getting started using the txAMQP library with RabbitMQ,
24 based on Dan Reverri's article "Getting started with RabbitMQ, Python, Twisted,
25 and txAMQP on Ubuntu 9.04" [http://www.apparatusproject.org/blog/?p=38]
26
27-Install RabbitMQ
28+### Install RabbitMQ
29
30 If you're using Debian (or a derivative, like Ubuntu) and RabbitMQ is not
31 included in your distribution, you can add RabbitMQ's APT repository:
32
33-http://www.rabbitmq.com/debian.html#apt
34+ http://www.rabbitmq.com/debian.html#apt
35
36-Running RabbitMQ
37+### Running RabbitMQ
38
39 If you installed RabbitMQ using the Debian package, it will be automatically
40 started. If not, you'll find an init.d file in /etc/init.d/rabbitmq-server
41
42-Install Twisted
43+### Install Twisted
44
45 As of 2009-07-09, txAMQP is being developed using Twisted 8.2.0, it may
46 work with older versions, but it's not guaranteed. In case you are using
47 Ubuntu, and the version available is not recent enough, you can install
48 Twisted through its PPA:
49
50-https://launchpad.net/~twisted-dev/+archive/ppa
51+ https://launchpad.net/~twisted-dev/+archive/ppa
52
53-Install txAMQP
54+### Install txAMQP
55
56 The instructions below install txAQMP from trunk. There are Ubuntu packages
57 available if you prefer, refer to the following page for more details:
58
59-https://launchpad.net/~txamqpteam/+archive/ppa
60+ https://launchpad.net/~txamqpteam/+archive/ppa
61
62 a. Install Bazaar
63
64-$ sudo apt-get install bzr
65+ $ sudo apt-get install bzr
66
67 b. Fetch txAQMP
68
69-$ cd ~
70-$ bzr branch lp:txamqp txamqp
71+ $ cd ~
72+ $ bzr branch lp:txamqp txamqp
73
74 If you get the error "bzr: ERROR: Unknown repository format: 'Bazaar
75 RepositoryFormatKnitPack6 (bzr 1.9)", you'll need to upgrade Bazaar. You may
76 do so following the instructions at:
77
78-http://bazaar-vcs.org/Download
79+ http://bazaar-vcs.org/Download
80
81 c. Install txAMQP
82
83-$ cd txamqp
84-$ sudo python setup.py install
85+ $ cd txamqp
86+ $ sudo python setup.py install
87
88=== added file 'requirements.txt'
89--- requirements.txt 1970-01-01 00:00:00 +0000
90+++ requirements.txt 2016-06-08 13:24:16 +0000
91@@ -0,0 +1,1 @@
92+-e .
93
94=== modified file 'src/txamqp/test/test_basic.py'
95--- src/txamqp/test/test_basic.py 2012-07-11 11:12:55 +0000
96+++ src/txamqp/test/test_basic.py 2016-06-08 13:24:16 +0000
97@@ -264,13 +264,14 @@
98 """
99 #setup: declare queue and subscribe
100 channel = self.channel
101+
102+ #set prefetch to 5:
103+ yield channel.basic_qos(prefetch_count=5)
104+
105 yield channel.queue_declare(queue="test-prefetch-count", exclusive=True)
106 subscription = yield channel.basic_consume(queue="test-prefetch-count", no_ack=False)
107 queue = yield self.client.queue(subscription.consumer_tag)
108
109- #set prefetch to 5:
110- yield channel.basic_qos(prefetch_count=5)
111-
112 #publish 10 messages:
113 for i in range(1, 11):
114 channel.basic_publish(routing_key="test-prefetch-count", content=Content("Message %d" % i))

Subscribers

People subscribed via source and target branches

to status/vote changes: