File: HACKING.txt

package info (click to toggle)
nagiosplugin 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 372 kB
  • sloc: python: 1,806; makefile: 9
file content (91 lines) | stat: -rw-r--r-- 2,364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
Development
===========

Getting the source
------------------

The source can be obtained via mercurial from
https://bitbucket.org/gocept/nagiosplugin::

   hg clone https://bitbucket.org/gocept/nagiosplugin

This package supports installation in a virtualenv using `zc.buildout`_.

.. _zc.buildout: https://pypi.python.org/pypi/zc.buildout


Creating a build with zc.buildout
---------------------------------

First, create a virtualenv if not already present::

   virtualenv -p python3.4 --no-setuptools .

zc.buildout will take care of all required dependencies::

   bin/pip3.2 install -U zc.buildout
   bin/buildout

If you want to use another Python version like 2.7, just the same steps with the
Python version substituted::

   virtualenv -p python2.7 --no-setuptools .
   bin/pip2.7 install -U zc.buildout
   bin/buildout


Tests
-----

When the buildout succeeds, run the unit test by invoking::

   bin/test

Our `build server`_ runs test against the trunk on a regular basis.

.. image:: https://builds.flyingcircus.io/job/nagiosplugin/PYTHON=System-CPython-2.7/badge/icon
   :target: https://builds.flyingcircus.io/job/nagiosplugin/
.. _build server: https://builds.flyingcircus.io/job/nagiosplugin/

nagiosplugin also includes support for coverage reports. It aims at 100% test
coverage where possible. The preferred way to get a coverate report is to use ::

   bin/createcoverage

to determine test coverage and open the report in a web browser. Alternatively,
run ::

   bin/coverage run bin/test

to get a purely text-based coverage report.

You may run the supplied examples with the local interpreter::

   bin/py src/nagiosplugin/examples/check_load.py


Documentation
-------------

The documentation uses Sphinx. Build the documentation (buildout should have
been running before to install Sphinx etc.)::

   make -C doc html


How to release
--------------

To make a release, we prefer `zest.releaser`_. To make a release, follow
the standard procedure, which usually boils down to::

   fullrelease

`nagiosplugin` tried to obey the semantic version numbering specification
published on SemVer_ but adapts it a little bit to be `PEP 386`_ compliant.

.. _zest.releaser: https://pypi.python.org/pypi/zest.releaser/
.. _SemVer: http://semver.org/
.. _PEP 386: https://www.python.org/dev/peps/pep-0386/

.. vim: set ft=rst sw=3 sts=3 et: