contributing.rst 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. .. _contributing:
  2. ==============
  3. Contributing
  4. ==============
  5. .. contents::
  6. :local:
  7. .. _community-code-of-conduct:
  8. Community Code of Conduct
  9. =========================
  10. The goal is to maintain a diverse community that is pleasant for everyone.
  11. That is why we would greatly appreciate it if everyone contributing to and
  12. interacting with the community also followed this Code of Conduct.
  13. The Code of Conduct covers our behavior as members of the community,
  14. in any forum, mailing list, wiki, website, Internet relay chat (IRC), public
  15. meeting or private correspondence.
  16. The Code of Conduct is heavily based on the `Ubuntu Code of Conduct`_, and
  17. the `Pylons Code of Conduct`_.
  18. .. _`Ubuntu Code of Conduct`: http://www.ubuntu.com/community/conduct
  19. .. _`Pylons Code of Conduct`: http://docs.pylonshq.com/community/conduct.html
  20. Be considerate.
  21. ---------------
  22. Your work will be used by other people, and you in turn will depend on the
  23. work of others. Any decision you take will affect users and colleagues, and
  24. we expect you to take those consequences into account when making decisions.
  25. Even if it's not obvious at the time, our contributions to Ubuntu will impact
  26. the work of others. For example, changes to code, infrastructure, policy,
  27. documentation and translations during a release may negatively impact
  28. others work.
  29. Be respectful.
  30. --------------
  31. The Celery community and its members treat one another with respect. Everyone
  32. can make a valuable contribution to Celery. We may not always agree, but
  33. disagreement is no excuse for poor behavior and poor manners. We might all
  34. experience some frustration now and then, but we cannot allow that frustration
  35. to turn into a personal attack. It's important to remember that a community
  36. where people feel uncomfortable or threatened is not a productive one. We
  37. expect members of the Celery community to be respectful when dealing with
  38. other contributors as well as with people outside the Celery project and with
  39. users of Celery.
  40. Be collaborative.
  41. -----------------
  42. Collaboration is central to Celery and to the larger free software community.
  43. We should always be open to collaboration. Your work should be done
  44. transparently and patches from Celery should be given back to the community
  45. when they are made, not just when the distribution releases. If you wish
  46. to work on new code for existing upstream projects, at least keep those
  47. projects informed of your ideas and progress. It many not be possible to
  48. get consensus from upstream, or even from your colleagues about the correct
  49. implementation for an idea, so don't feel obliged to have that agreement
  50. before you begin, but at least keep the outside world informed of your work,
  51. and publish your work in a way that allows outsiders to test, discuss and
  52. contribute to your efforts.
  53. When you disagree, consult others.
  54. ----------------------------------
  55. Disagreements, both political and technical, happen all the time and
  56. the Celery community is no exception. It is important that we resolve
  57. disagreements and differing views constructively and with the help of the
  58. community and community process. If you really want to go a different
  59. way, then we encourage you to make a derivative distribution or alternate
  60. set of packages that still build on the work we've done to utilize as common
  61. of a core as possible.
  62. When you are unsure, ask for help.
  63. ----------------------------------
  64. Nobody knows everything, and nobody is expected to be perfect. Asking
  65. questions avoids many problems down the road, and so questions are
  66. encouraged. Those who are asked questions should be responsive and helpful.
  67. However, when asking a question, care must be taken to do so in an appropriate
  68. forum.
  69. Step down considerately.
  70. ------------------------
  71. Developers on every project come and go and Celery is no different. When you
  72. leave or disengage from the project, in whole or in part, we ask that you do
  73. so in a way that minimizes disruption to the project. This means you should
  74. tell people you are leaving and take the proper steps to ensure that others
  75. can pick up where you leave off.
  76. .. _reporting-bugs:
  77. Reporting a Bug
  78. ===============
  79. Bugs can always be described to the :ref:`mailing-list`, but the best
  80. way to report an issue and to ensure a timely response is to use the
  81. issue tracker.
  82. 1) Create a GitHub account.
  83. You need to `create a GitHub account`_ to be able to create new issues
  84. and participate in the discussion.
  85. .. _`create a GitHub account`: https://github.com/signup/free
  86. 2) Determine if your bug is really a bug.
  87. You should not file a bug if you are requesting support. For that you can use
  88. the :ref:`mailing-list`, or :ref:`irc-channel`.
  89. 3) Make sure your bug hasn't already been reported.
  90. Search through the appropriate Issue tracker. If a bug like yours was found,
  91. check if you have new information that could be reported to help
  92. the developers fix the bug.
  93. 4) Collect information about the bug.
  94. To have the best chance of having a bug fixed, we need to be able to easily
  95. reproduce the conditions that caused it. Most of the time this information
  96. will be from a Python traceback message, though some bugs might be in design,
  97. spelling or other errors on the website/docs/code.
  98. If the error is from a Python traceback, include it in the bug report.
  99. We also need to know what platform you're running (Windows, OSX, Linux, etc),
  100. the version of your Python interpreter, and the version of Celery, and related
  101. packages that you were running when the bug occurred.
  102. 5) Submit the bug.
  103. By default `GitHub`_ will email you to let you know when new comments have
  104. been made on your bug. In the event you've turned this feature off, you
  105. should check back on occasion to ensure you don't miss any questions a
  106. developer trying to fix the bug might ask.
  107. .. _`GitHub`: http://github.com
  108. .. _issue-trackers:
  109. Issue Trackers
  110. --------------
  111. Bugs for a package in the Celery ecosystem should be reported to the relevant
  112. issue tracker.
  113. * Celery: http://github.com/celery/celery/issues/
  114. * Django-Celery: http://github.com/celery/django-celery/issues
  115. * Celery-Pylons: http://bitbucket.org/ianschenck/celery-pylons/issues
  116. * Kombu: http://github.com/celery/kombu/issues
  117. If you are unsure of the origin of the bug you can ask the
  118. :ref:`mailing-list`, or just use the Celery issue tracker.
  119. .. _versions:
  120. Versions
  121. ========
  122. Version numbers consists of a major version, minor version and a release number.
  123. Since version 2.1.0 we use the versioning semantics described by
  124. semver: http://semver.org.
  125. Stable releases are published at PyPI
  126. while development releases are only available in the GitHub git repository as tags.
  127. All version tags starts with “v”, so version 0.8.0 is the tag v0.8.0.
  128. .. _git-branches:
  129. Branches
  130. ========
  131. Current active version branches:
  132. * master (http://github.com/celery/celery/tree/master)
  133. * 3.0-devel (http://github.com/celery/celery/tree/3.0-devel)
  134. You can see the state of any branch by looking at the Changelog:
  135. https://github.com/celery/celery/blob/master/Changelog
  136. If the branch is in active development the topmost version info should
  137. contain metadata like::
  138. 2.4.0
  139. ======
  140. :release-date: TBA
  141. :status: DEVELOPMENT
  142. :branch: master
  143. The ``status`` field can be one of:
  144. * ``PLANNING``
  145. The branch is currently experimental and in the planning stage.
  146. * ``DEVELOPMENT``
  147. The branch is in active development, but the test suite should
  148. be passing and the product should be working and possible for users to test.
  149. * ``FROZEN``
  150. The branch is frozen, and no more features will be accepted.
  151. When a branch is frozen the focus is on testing the version as much
  152. as possible before it is released.
  153. ``master`` branch
  154. -----------------
  155. The master branch is where development of the next version happens.
  156. Maintenance branches
  157. --------------------
  158. Maintenance branches are named after the version, e.g. the maintenance branch
  159. for the 2.2.x series is named ``2.2``. Previously these were named
  160. ``releaseXX-maint``.
  161. The versions we currently maintain is:
  162. * 2.3
  163. This is the current series.
  164. * 2.2
  165. This is the previous series, and the last version to support Python 2.4.
  166. * 2.1
  167. This is the last version to use the ``carrot`` AMQP framework.
  168. Recent versions use ``kombu``.
  169. Archived branches
  170. -----------------
  171. Archived branches are kept for preserving history only,
  172. and theoretically someone could provide patches for these if they depend
  173. on a series that is no longer officially supported.
  174. An archived version is named ``X.Y-archived``.
  175. Our currently archived branches are:
  176. * 2.1-archived
  177. * 2.0-archived
  178. * 1.0-archived
  179. Feature branches
  180. ----------------
  181. Major new features are worked on in dedicated branches.
  182. There is no strict naming requirement for these branches.
  183. Feature branches are removed once they have been merged into a release branch.
  184. Tags
  185. ====
  186. Tags are used exclusively for tagging releases. A release tag is
  187. named with the format ``vX.Y.Z``, e.g. ``v2.3.1``.
  188. Experimental releases contain an additional identifier ``vX.Y.Z-id``, e.g.
  189. ``v3.0.0-rc1``. Experimental tags may be removed after the official release.
  190. .. _contributing-changes:
  191. Working on Features & Patches
  192. =============================
  193. .. note::
  194. Contributing to Celery should be as simple as possible,
  195. so none of these steps should be considered mandatory.
  196. You can even send in patches by email if that is your preferred
  197. work method. We won't like you any less, any contribution you make
  198. is always appreciated!
  199. However following these steps may make maintainers life easier,
  200. and may mean that your changes will be accepted sooner.
  201. Forking and setting up the repository
  202. -------------------------------------
  203. First you need to fork the Celery repository, a good introduction to this
  204. is in the Github Guide: `Fork a Repo`_.
  205. After you have cloned the repository you should checkout your copy
  206. to a directory on your machine::
  207. $ git clone git@github.com:username/celery.git
  208. When the repository is cloned enter the directory to set up easy access
  209. to upstream changes::
  210. $ cd celery
  211. $ git remote add upstream git://github.com/celery/celery.git
  212. $ git fetch upstream
  213. If you need to pull in new changes from upstream you should
  214. always use the :option:`--rebase` option to ``git pull``::
  215. git pull --rebase upstream master
  216. With this option you don't clutter the history with merging
  217. commit notes. See `Rebasing merge commits in git`_.
  218. If you want to learn more about rebasing see the `Rebase`_
  219. section in the Github guides.
  220. If you need to work on a different branch than ``master`` you can
  221. fetch and checkout a remote branch like this::
  222. git checkout --track -b 3.0-devel origin/3.0-devel
  223. For a list of branches see :ref:`git-branches`.
  224. .. _`Fork a Repo`: http://help.github.com/fork-a-repo/
  225. .. _`Rebasing merge commits in git`:
  226. http://notes.envato.com/developers/rebasing-merge-commits-in-git/
  227. .. _`Rebase`: http://help.github.com/rebase/
  228. .. _contributing-testing:
  229. Running the unit test suite
  230. ---------------------------
  231. To run the Celery test suite you need to install a few dependencies.
  232. A complete list of the dependencies needed are located in
  233. :file:`requirements/test.txt`.
  234. Installing the test requirements::
  235. $ pip -E $VIRTUAL_ENV install -U -r requirements/test.txt
  236. When installation of dependencies is complete you can execute
  237. the test suite by calling ``nosetests``::
  238. $ nosetests
  239. Some useful options to :program:`nosetests` are:
  240. * :option:`-x`
  241. Stop running the tests at the first test that fails.
  242. * :option:`-s`
  243. Don't capture output
  244. * :option:`--nologcapture`
  245. Don't capture log output.
  246. * :option:`-v`
  247. Run with verbose output.
  248. If you want to run the tests for a single test file only
  249. you can do so like this::
  250. $ nosetests celery.tests.test_worker.test_worker_job
  251. .. _contributing-pull-requests:
  252. Creating pull requests
  253. ----------------------
  254. When your feature/bugfix is complete you may want to submit
  255. a pull requests so that it can be reviewed by the maintainers.
  256. Creating pull requests is easy, and also let you track the progress
  257. of your contribution. Read the `Pull Requests`_ section in the Github
  258. Guide to learn how this is done.
  259. You can also attach pull requests to existing issues by following
  260. the steps outlined here: http://bit.ly/koJoso
  261. .. _`Pull Requests`: http://help.github.com/send-pull-requests/
  262. .. _contributing-coverage:
  263. Calculating test coverage
  264. ~~~~~~~~~~~~~~~~~~~~~~~~~
  265. Code coverage in HTML::
  266. $ nosetests --with-coverage3 --cover3-html
  267. The coverage output will then be located at
  268. :file:`celery/tests/cover/index.html`.
  269. Code coverage in XML (Cobertura-style)::
  270. $ nosetests --with-coverage3 --cover3-xml --cover3-xml-file=coverage.xml
  271. The coverage XML output will then be located at :file:`coverage.xml`
  272. .. _contributing-tox:
  273. Running the tests on all supported Python versions
  274. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  275. There is a ``tox`` configuration file in the top directory of the
  276. distribution.
  277. To run the tests for all supported Python versions simply execute::
  278. $ tox
  279. If you only want to test specific Python versions use the :option:`-e`
  280. option::
  281. $ tox -e py25,py26
  282. Building the documentation
  283. --------------------------
  284. To build the documentation you need to install the dependencies
  285. listed in :file:`requirements/docs.txt`::
  286. $ pip -E $VIRTUAL_ENV install -U -r requirements/docs.txt
  287. After these dependencies are installed you should be able to
  288. build the docs by running::
  289. $ cd docs
  290. $ rm -rf .build
  291. $ make html
  292. Make sure there are no errors or warnings in the build output.
  293. After building succeeds the documentation is available at :file:`.build/html`.
  294. .. _contributing-verify:
  295. Verifying your contribution
  296. ---------------------------
  297. To use these tools you need to install a few dependencies. These dependencies
  298. can be found in :file:`requirements/pkgutils.txt`.
  299. Installing the dependencies::
  300. $ pip -E $VIRTUAL_ENV install -U -r requirements/pkgutils.txt
  301. pyflakes & PEP8
  302. ~~~~~~~~~~~~~~~
  303. To ensure that your changes conform to PEP8 and to run pyflakes
  304. execute::
  305. $ paver flake8
  306. To not return a negative exit code when this command fails use the
  307. :option:`-E` option, this can be convenient while developing::
  308. $ paver flake8 -E
  309. API reference
  310. ~~~~~~~~~~~~~
  311. To make sure that all modules have a corresponding section in the API
  312. reference please execute::
  313. $ paver autodoc
  314. $ paver verifyindex
  315. If files are missing you can add them by copying an existing reference file.
  316. If the module is internal it should be part of the internal reference
  317. located in :file:`docs/internals/reference/`. If the module is public
  318. it should be located in :file:`docs/reference/`.
  319. For example if reference is missing for the module ``celery.worker.awesome``
  320. and this module is considered part of the public API, use the following steps::
  321. $ cd docs/reference/
  322. $ cp celery.schedules.rst celery.worker.awesome.rst
  323. $ vim celery.worker.awesome.rst
  324. # change every occurance of ``celery.schedules`` to
  325. # ``celery.worker.awesome``
  326. $ vim index.rst
  327. # Add ``celery.worker.awesome`` to the index.
  328. # Add the file to git
  329. $ git add celery.worker.awesome.rst
  330. $ git add index.rst
  331. $ git commit celery.worker.awesome.rst index.rst \
  332. -m "Adds reference for celery.worker.awesome"
  333. .. _coding-style:
  334. Coding Style
  335. ============
  336. You should probably be able to pick up the coding style
  337. from surrounding code, but it is a good idea to be aware of the
  338. following conventions.
  339. * All Python code must follow the `PEP-8`_ guidelines.
  340. `pep8.py`_ is an utility you can use to verify that your code
  341. is following the conventions.
  342. .. _`PEP-8`: http://www.python.org/dev/peps/pep-0008/
  343. .. _`pep8.py`: http://pypi.python.org/pypi/pep8
  344. * Docstrings must follow the `PEP-257`_ conventions, and use the following
  345. style.
  346. Do this:
  347. .. code-block:: python
  348. def method(self, arg):
  349. """Short description.
  350. More details.
  351. """
  352. or:
  353. .. code-block:: python
  354. def method(self, arg):
  355. """Short description."""
  356. but not this:
  357. .. code-block:: python
  358. def method(self, arg):
  359. """
  360. Short description.
  361. """
  362. .. _`PEP-257`: http://www.python.org/dev/peps/pep-0257/
  363. * Lines should not exceed 78 columns.
  364. You can enforce this in :program:`vim` by setting the ``textwidth`` option:
  365. .. code-block:: vim
  366. set textwidth=78
  367. If adhering to this limit makes the code less readable, you have one more
  368. character to go on, which means 78 is a soft limit, and 79 is the hard
  369. limit :)
  370. * Import order
  371. * Python standard library (`import xxx`)
  372. * Python standard library ('from xxx import`)
  373. * Third party packages.
  374. * Other modules from the current package.
  375. or in case of code using Django:
  376. * Python standard library (`import xxx`)
  377. * Python standard library ('from xxx import`)
  378. * Third party packages.
  379. * Django packages.
  380. * Other modules from the current package.
  381. Within these sections the imports should be sorted by module name.
  382. Example:
  383. .. code-block:: python
  384. import threading
  385. import time
  386. from collections import deque
  387. from Queue import Queue, Empty
  388. from .datastructures import TokenBucket
  389. from .utils import timeutils
  390. from .utils.compat import all, izip_longest, chain_from_iterable
  391. * Wildcard imports must not be used (`from xxx import *`).
  392. * For distributions where Python 2.5 is the oldest support version
  393. additional rules apply:
  394. * Absolute imports must be enabled at the top of every module::
  395. from __future__ import absolute_import
  396. * If the module uses the with statement it must also enable that::
  397. from __future__ import with_statement
  398. * Every future import must be on its own line, as older Python 2.5
  399. releases did not support importing multiple features on the
  400. same future import line::
  401. # Good
  402. from __future__ import absolute_import
  403. from __future__ import with_statement
  404. # Bad
  405. from __future__ import absolute_import, with_statement
  406. (Note that this rule does not apply if the package does not include
  407. support for Python 2.5)
  408. * Note that we use "new-style` relative imports when the distribution
  409. does not support Python versions below 2.5
  410. .. code-block:: python
  411. from . import submodule
  412. .. _contact_information:
  413. Contacts
  414. ========
  415. This is a list of people that can be contacted for questions
  416. regarding the official git repositories, PyPI packages
  417. Read the Docs pages.
  418. If the issue is not an emergency then it is better
  419. to :ref:`report an issue <reporting-bugs>`.
  420. Committers
  421. ----------
  422. Ask Solem
  423. ~~~~~~~~~
  424. :github: https://github.com/ask
  425. :twitter: http://twitter.com/#!/asksol
  426. Mher Movsisyan
  427. ~~~~~~~~~~~~~~
  428. :github: https://github.com/mher
  429. Steeve Morin
  430. ~~~~~~~~~~~~
  431. :github: https://github.com/steeve
  432. :twitter: http://twitter.com/#!/steeve
  433. Website
  434. -------
  435. The Celery Project website is run and maintained by
  436. Mauro Rocco
  437. ~~~~~~~~~~~
  438. :github: https://github.com/fireantology
  439. :twitter: https://twitter.com/#!/fireantology
  440. with design by:
  441. Jan Henrik Helmers
  442. ~~~~~~~~~~~~~~~~~~
  443. :web: http://www.helmersworks.com
  444. :twitter: http://twitter.com/#!/helmers
  445. .. _packages:
  446. Packages
  447. ========
  448. celery
  449. ------
  450. :git: https://github.com/celery/celery
  451. :CI: http://travis-ci.org/#!/ask/celery
  452. :PyPI: http://pypi.python.org/pypi/celery
  453. :docs: http://docs.celeryproject.org
  454. kombu
  455. -----
  456. Messaging framework.
  457. :git: https://github.com/celery/kombu
  458. :CI: http://travis-ci.org/#!/ask/kombu
  459. :PyPI: http://pypi.python.org/pypi/kombu
  460. :docs: http://kombu.readthedocs.org
  461. billiard
  462. --------
  463. Fork of multiprocessing containing improvements
  464. that will eventually be merged into the Python stdlib.
  465. :git: https://github.com/celery/billiard
  466. :PyPI: http://pypi.python.org/pypi/billiard
  467. librabbitmq
  468. -----------
  469. Very fast Python AMQP client written in C.
  470. :git: https://github.com/celery/librabbitmq
  471. :PyPI: http://pypi.python.org/pypi/librabbitmq
  472. celerymon
  473. ---------
  474. Celery monitor web-service.
  475. :git: https://github.com/celery/celerymon
  476. :PyPI: http://pypi.python.org/pypi/celerymon
  477. django-celery
  478. -------------
  479. Django <-> Celery Integration.
  480. :git: https://github.com/celery/django-celery
  481. :PyPI: http://pypi.python.org/pypi/django-celery
  482. :docs: http://docs.celeryproject.org/en/latest/django
  483. cl
  484. --
  485. Actor framework.
  486. :git: https://github.com/celery/cl
  487. :PyPI: http://pypi.python.org/pypi/cl
  488. cyme
  489. ----
  490. Distributed Celery Instance manager.
  491. :git: https://github.com/celery/cyme
  492. :PyPI: http://pypi.python.org/pypi/cyme
  493. :docs: http://cyme.readthedocs.org/
  494. Deprecated
  495. ----------
  496. - Flask-Celery
  497. :git: https://github.com/ask/Flask-Celery
  498. :PyPI: http://pypi.python.org/pypi/Flask-Celery
  499. - carrot
  500. :git: https://github.com/ask/carrot
  501. :PyPI: http://pypi.python.org/pypi/carrot
  502. - ghettoq
  503. :git: https://github.com/ask/ghettoq
  504. :PyPI: http://pypi.python.org/pypi/ghettoq
  505. - kombu-sqlalchemy
  506. :git: https://github.com/ask/kombu-sqlalchemy
  507. :PyPI: http://pypi.python.org/pypi/kombu-sqlalchemy
  508. - django-kombu
  509. :git: https://github.com/ask/django-kombu
  510. :PyPI: http://pypi.python.org/pypi/django-kombu
  511. - pylibrabbitmq
  512. Old name for :mod:`librabbitmq`.
  513. :git: :const:`None`
  514. :PyPI: http://pypi.python.org/pypi/pylibrabbitmq
  515. .. _release-procedure:
  516. Release Procedure
  517. =================
  518. Updating the version number
  519. ---------------------------
  520. The version number must be updated two places:
  521. * :file:`celery/__init__.py`
  522. * :file:`docs/include/introduction.txt`
  523. After you have changed these files you must render
  524. the :file:`README` files. There is a script to convert sphinx syntax
  525. to generic reStructured Text syntax, and the paver task `readme`
  526. does this for you::
  527. $ paver readme
  528. Now commit the changes::
  529. $ git commit -a -m "Bumps version to X.Y.Z"
  530. and make a new version tag::
  531. $ git tag vX.Y.Z
  532. $ git push --tags
  533. Releasing
  534. ---------
  535. Commands to make a new public stable release::
  536. $ paver releaseok # checks pep8, autodoc index and runs tests
  537. $ paver removepyc # Remove .pyc files.
  538. $ git clean -xdn # Check that there's no left-over files in the repository.
  539. $ python2.5 setup.py sdist upload # Upload package to PyPI
  540. $ paver upload_pypi_docs
  541. $ paver ghdocs # Build and upload documentation to Github.
  542. If this is a new release series then you also need to do the
  543. following:
  544. * Go to the Read The Docs management interface at:
  545. http://readthedocs.org/projects/celery/?fromdocs=celery
  546. * Enter "Edit project"
  547. Change default branch to the branch of this series, e.g. ``2.4``
  548. for series 2.4.
  549. * Also add the previous version under the "versions" tab.
  550. Updating bundles
  551. ----------------
  552. First you need to make sure the bundle entrypoints have been installed,
  553. but either running `develop`, or `install`::
  554. $ python setup.py develop
  555. Then make sure that you have your PyPI credentials stored in
  556. :file:`~/.pypirc`, and execute the command::
  557. $ python setup.py upload_bundles
  558. If you broke something and need to update new versions of the bundles,
  559. then you can use ``upload_bundles_fix``.