development.rst 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .. include:: global.rst.inc
  2. .. _development:
  3. Development
  4. ===========
  5. This chapter will get you started with |project_name|' development.
  6. |project_name| is written in Python (with a little bit of Cython and C for
  7. the performance critical parts).
  8. Building a development environment
  9. ----------------------------------
  10. First, just install borg into a virtual env as described before.
  11. To install some additional packages needed for running the tests, activate your
  12. virtual env and run::
  13. pip install -r requirements.d/development.txt
  14. Running the tests
  15. -----------------
  16. The tests are in the borg/testsuite package.
  17. To run all the tests, you need to have fakeroot installed. If you do not have
  18. fakeroot, you still will be able to run most tests, just leave away the
  19. `fakeroot -u` from the given command lines.
  20. To run the test suite use the following command::
  21. fakeroot -u tox # run all tests
  22. Some more advanced examples::
  23. # verify a changed tox.ini (run this after any change to tox.ini):
  24. fakeroot -u tox --recreate
  25. fakeroot -u tox -e py32 # run all tests, but only on python 3.2
  26. fakeroot -u tox borg.testsuite.locking # only run 1 test module
  27. fakeroot -u tox borg.testsuite.locking -- -k '"not Timer"' # exclude some tests
  28. fakeroot -u tox borg.testsuite -- -v # verbose py.test
  29. Important notes:
  30. - When using -- to give options to py.test, you MUST also give borg.testsuite[.module].
  31. Building the docs with Sphinx
  32. -----------------------------
  33. The documentation (in reStructuredText format, .rst) is in docs/.
  34. To build the html version of it, you need to have sphinx installed::
  35. pip3 install sphinx
  36. Now run::
  37. cd docs/
  38. make html
  39. Then point a web browser at docs/_build/html/index.html.
  40. Creating a new release
  41. ----------------------
  42. Checklist::
  43. - all issues for this milestone closed?
  44. - any low hanging fruit left on the issue tracker?
  45. - run tox on all supported platforms via vagrant, check for test fails.
  46. - is Travis CI happy also?
  47. - update CHANGES.rst (compare to git log). check version number of upcoming release.
  48. - check MANIFEST.in and setup.py - are they complete?
  49. - tag the release::
  50. git tag -s -m "tagged release" 0.26.0
  51. - create a release on PyPi::
  52. python setup.py register sdist upload --identity="Thomas Waldmann" --sign
  53. - close release milestone.
  54. - announce on::
  55. - mailing list
  56. - Twitter
  57. - IRC channel (topic)
  58. - create binary wheels and link them from issue tracker: https://github.com/borgbackup/borg/issues/147