Skip to content

Commit

Permalink
Merge pull request #47 from Alignak-monitoring-contrib/develop
Browse files Browse the repository at this point in the history
Version 1.0.0
  • Loading branch information
ddurieux authored Sep 12, 2017
2 parents dfbab60 + e99ca86 commit 99e5809
Show file tree
Hide file tree
Showing 75 changed files with 19,171 additions and 244 deletions.
8 changes: 1 addition & 7 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,8 @@ confidence=
# [R0912(too-many-branches), FrontEnd.search_hosts_and_services] Too many branches (50/12)
# [R0915(too-many-statements), FrontEnd.search_hosts_and_services] Too many statements (105/50)
# [R0902(too-many-instance-attributes), FrontEnd] Too many instance attributes (9/7)
# [R0801(duplicate-code), ] Similar lines in 2 files
# [R0401(cyclic-import), ] Cyclic import (alignak_webui -> alignak_webui.views)
# [R0201(no-self-use), Helper.get_url] Method could be a function
# [C0302(too-many-lines), ] Too many lines in module (1005/1000)
# [W0406(import-self), ] Module import itself
# [E1101(no-member), show_event_post] Method 'query' has no 'get' member
# [E1101(no-member), post_event] Method 'forms' has no 'get' member
disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,C0103,W0703,R0912,R0915,R0902,R0801,R0201,C0302,W0406,E1101,W0611
disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,C0103,W0703,R0912,R0915,R0902,C0302, duplicate-code


[REPORTS]
Expand Down
27 changes: 16 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,31 @@ services:
# some are only used for travis/coveralls so we are installing them here only
install:
- ./test/setup_test.sh
# command to run tests
# 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

script:
- pip freeze # so to help eventual debug: know what exact versions are in use can be rather useful.
# so to help eventual debug: knowing what exact versions are in use can be rather useful.
- pip freeze
# Code static analysis
- pep8 --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' alignak_backend_client/*
- rm -fr alignak_backend_client/__pycache__
- pylint --rcfile=.pylintrc alignak_backend_client/*
- pylint --rcfile=.pylintrc alignak_backend_client/
- pep257 --select=D300 alignak_backend_client
# Code dynamic analysis
- cd test
# Delete previously existing coverage results
- coverage erase
# - nosetests -xv --nologcapture --process-restartworker --processes=1 --process-timeout=300
- nosetests -xv --nologcapture --process-restartworker --processes=1 --process-timeout=300 --with-coverage --cover-package=alignak_backend_client test*.py
- coverage combine
# Run test suite with py.test running its coverage plugin - for backend client library
- pytest -v --cov=alignak_backend_client test_*.py
# Run test suite with py.test running its coverage plugin - for alignak-backend-cli utility
- pytest -v --cov=backend_client --cov-config .coveragerc --cov-append alignak-backend-cli-tests.py
# Report about coverage
- coverage report -m
# Test code static analysis
- pep8 --max-line-length=100 --ignore='E402' test_*.py
- pylint --rcfile=../.pylintrc test_*.py
- 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 --rcfile=test/.coveragerc
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include version.py
include README.rst
include AUTHORS
include LICENSE
include requirements.txt
recursive-include alignak_backend_client *
89 changes: 52 additions & 37 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,65 +1,80 @@
Alignak Backend client
======================

*Python client for Alignak Backend*
*Python client library and CLI for Alignak Backend*

Build status (stable release)
----------------------------------------

.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client.svg?branch=master
.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client.svg?branch=develop
:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client
:alt: Develop branch build status

.. image:: https://coveralls.io/repos/Alignak-monitoring-contrib/alignak-backend-client/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/Alignak-monitoring-contrib/alignak-backend-client?branch=master
.. image:: https://landscape.io/github/Alignak-monitoring-contrib/alignak-backend-client/develop/landscape.svg?style=flat
:target: https://landscape.io/github/Alignak-monitoring-contrib/alignak-backend-client/develop
:alt: Development code static analysis

.. image:: https://readthedocs.org/projects/alignak-backend-client/badge/?version=latest
:target: http://alignak-backend-client.readthedocs.org/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://coveralls.io/repos/Alignak-monitoring-contrib/alignak-backend-client/badge.svg?branch=develop&service=github
:target: https://coveralls.io/github/Alignak-monitoring-contrib/alignak-backend-client?branch=develop
:alt: Development code coverage

.. image:: https://readthedocs.org/projects/alignak-backend-client/badge/?version=latest
:target: http://alignak-backend-client.readthedocs.org/en/latest/?badge=latest
:alt: Lastest documentation Status

Build status (development release)
----------------------------------------
.. image:: https://readthedocs.org/projects/alignak-backend-client/badge/?version=develop
:target: http://alignak-backend-client.readthedocs.org/en/develop/?badge=develop
:alt: Development documentation Status

.. image:: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client.svg?branch=develop
:target: https://travis-ci.org/Alignak-monitoring-contrib/alignak-backend-client
.. image:: https://badge.fury.io/py/alignak_backend.svg
:target: https://badge.fury.io/py/alignak_backend_client
:alt: Most recent PyPi version

.. image:: https://coveralls.io/repos/Alignak-monitoring-contrib/alignak-backend-client/badge.svg?branch=develop&service=github
:target: https://coveralls.io/github/Alignak-monitoring-contrib/alignak-backend-client?branch=develop
.. image:: https://img.shields.io/badge/IRC-%23alignak-1e72ff.svg?style=flat
:target: http://webchat.freenode.net/?channels=%23alignak
:alt: Join the chat #alignak on freenode.net

.. image:: https://readthedocs.org/projects/alignak-backend-client/badge/?version=develop
:target: http://alignak-backend-client.readthedocs.org/en/develop/?badge=develop
:alt: Documentation Status
.. image:: https://img.shields.io/badge/License-AGPL%20v3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0
:alt: License AGPL v3


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

The Backend class is commented and a doc is automatically built from the source code. Click on the
docs badge on this page to browse the documentation.
The Backend client class is commented and `an online documentation <http://alignak-backend-client.readthedocs.io/>`_ is automatically built from the source code. Click on this link or on one of the docs badges on this page to browse the documentation.

The `Alignak backend documentation <http://alignak-backend.readthedocs.io/>`_ will also be really helpful to you ;)

Release strategy
----------------------------------------

Alignak backend and its *satellites* (backend client, and backend import tools) must all have the
same features level. As of it, take care to install the same minor version on your system to
ensure compatibility between all the packages. Use 0.4.x version of Backend import and Backend
client with a 0.4.x version of the Backend.
Installation
------------

The current version of Alignak backend client is 0.5.0.
From PyPI
~~~~~~~~~
To install the package from PyPI:
::

**Note:** the current version is the same as the previous version 0.4.2. The version number has
simply been updated to match the Alignak backend release strategy.
sudo pip install alignak-backend-client


Bugs, issues and contributing
----------------------------------------
From source files
~~~~~~~~~~~~~~~~~
To install the package from the source files:
::

git clone https://github.com/Alignak-monitoring-contrib/alignak-backend-client
cd alignak-backend-client
sudo pip install .


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

Alignak backend and its *satellites* (backend client, and backend import tools) must all have the
same features level. As of it, take care to install the same minor version on your system to
ensure compatibility between all the packages. Use 0.4.x version of Backend import and Backend
client with a 0.4.x version of the Backend.

License
----------------------------------------

Alignak Backend client is available under the `GPL version 3 <http://opensource.org/licenses/GPL-3.0>`_.
Bugs, issues and contributing
-----------------------------

Contributions to this project are welcome and encouraged ... `issues in the project repository <https://github.com/alignak-monitoring-contrib/alignak-backend-client/issues>`_ are the common way to raise an information.
24 changes: 20 additions & 4 deletions alignak_backend_client/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,36 @@
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
This module is a Python library used for the REST API of the Alignak backend
"""

# Application version and manifest
VERSION = (0, 5, 0)
VERSION = (1, 0, 0)

__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for each in VERSION[:2]))
__version__ = '.'.join((str(each) for each in VERSION[:4]))
__author__ = u"Alignak team"
__copyright__ = u"(c) 2015-2016 - %s" % __author__
__author_email__ = u"[email protected]"
__copyright__ = u"(c) 2015-2017 - %s" % __author__
__license__ = u"GNU Affero General Public License, version 3"
__description__ = u"Alignak backend client library"
__releasenotes__ = u"""Alignak backend client library"""
__doc_url__ = "https://github.com/Alignak-monitoring-contrib/alignak-backend-client"
__git_url__ = "https://github.com/Alignak-monitoring-contrib/alignak-backend-client"
__doc_url__ = "http://alignak-backend-client.readthedocs.org"

__classifiers__ = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
'Programming Language :: Python',
'Topic :: System :: Monitoring',
'Topic :: System :: Systems Administration'
]

# Application manifest
manifest = {
'name': __application__,
Expand Down
Loading

0 comments on commit 99e5809

Please sign in to comment.