Skip to content

Commit

Permalink
Remove IDE files
Browse files Browse the repository at this point in the history
Update gitignore
Update module documentation and setup, set version to 0.2.0
Update module and add a unit test example
Update readme for travis badge
Update travis.yml for code coverage
  • Loading branch information
mohierf committed Nov 5, 2016
1 parent 75865c2 commit 81b4484
Show file tree
Hide file tree
Showing 31 changed files with 2,030 additions and 120 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ Thumbs.db
test/tmp/*dat
env/

.idea

# Documentation #
#################
docs/build
docs/tools/media/
docs/tools/pages/


# test and coverage
test/tmp/.cov*
# pycharm
.idea/*

# test and coverage
test/.coverage

# Pbr
pbr-*.egg/
Expand Down
14 changes: 0 additions & 14 deletions .idea/misc.xml

This file was deleted.

35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: python
sudo: true
python:
- "2.7"
# - "3.4"

# command to install dependencies
# some are only used for travis/coveralls so we are installing them here only
install:
- ./test/setup_test.sh

# command to run tests
script:
# so to help eventual debug: knowing what exact versions are in use can be rather useful.
- pip freeze
# Code static analysis
# Not for the example module !
# - pep8 --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' alignak_module_ws/*
# - pylint --rcfile=.pylintrc alignak_module_ws/
# Code dynamic analysisk
- cd test
# notice: the nose-cov is used because it is compatible with --processes, but produce a .coverage by process
# so we must combine them in the end
- coverage erase
- nosetests -xv --process-restartworker --processes=1 --process-timeout=300 --with-cover --cover-package=alignak_module_example test_module.py
- coverage combine
- cd ..
# specific call to launch coverage data into coveralls.io
after_success:
# to get coverage data with relative paths and not absolute we have to
# execute coveralls from the base directory of the project,
# so we need to move the .coverage file here :
# mv test/.coverage . && coveralls --rcfile=test/.coveragerc -v
mv test/.coverage . && coveralls -v

3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include version.py
include README.rst
include LICENSE
include AUTHORS
include requirements.txt
recursive-include alignak_module_log *
recursive-include alignak_module_example *
16 changes: 7 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Build status (stable release)
Build status (development release)
----------------------------------

.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-module-example.svg?branch=develop
:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-module-example
.. image:: https://travis-ci.org/Alignak-monitoring/alignak-module-example.svg?branch=develop
:target: https://travis-ci.org/Alignak-monitoring/alignak-module-example


Short description
Expand Down Expand Up @@ -48,6 +48,7 @@ that it is possible to have several existing modules for the same feature. The c
* passive, for a module that will collect passive checks results (NSCA, ...)
* logs, for a module that will collect monitoring logs
* action, for a module that will execute some actions (acknownledge, downtime, ...)
* poller, for a module that will execute checks in a poller

Old Nagios parameters require that some external modules are installed for the corresponding
features to be available. The Arbiter will alert if some features are activated and the
Expand All @@ -61,8 +62,7 @@ All Alignak modules are stored in their own repository in the `Alignak monitorin

Repository example
~~~~~~~~~~~~~~~~~~
Repository directories and files example:
::
Repository directories and files example::

README.rst
LICENCE
Expand Down Expand Up @@ -137,16 +137,14 @@ Installation

From PyPI
~~~~~~~~~
To install the module from PyPI:
::
To install the module from PyPI::

pip install alignak-module-EXAMPLE


From source files
~~~~~~~~~~~~~~~~~
To install the module from the source files:
::
To install the module from the source files::

git clone https://github.com/Alignak-monitoring-contrib/alignak-module-EXAMPLE
cd alignak-module-EXAMPLE
Expand Down Expand Up @@ -176,7 +174,7 @@ To set up several instances of the same module:
Bugs, issues and contributing
-----------------------------

Please report any issue using the project `GitHub repository: <https://github.com/Alignak-monitoring-contrib/alignak-module-example/issues>`_.
Please report any issue using the project `GitHub repository: <https://github.com/Alignak-monitoring/alignak-module-example/issues>`_.

License
-------
Expand Down
14 changes: 0 additions & 14 deletions alignak_module_example/ALIGNAKETC/arbiter/modules/mod-EXAMPLE.cfg

This file was deleted.

17 changes: 17 additions & 0 deletions alignak_module_example/ALIGNAKETC/arbiter/modules/mod-example.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Module: EXAMPLE
## Loaded by: Broker
# .....
define module {
# Module alias to use as a module identifier
module_alias example
# List of module types (see readme.rst)
module_types example
# Python module name
python_name alignak_module_example

# Module configuration parameters
# ---
option_1 foo
option_2 bar
option_3 foobar
}
Loading

0 comments on commit 81b4484

Please sign in to comment.