diff --git a/.travis.yml b/.travis.yml index 8c2806f..84f5c5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,8 @@ env: - TWISTED=Twisted==17.9.0 install: - - pip install pyflakes - pip install -q $TWISTED - - pip install . + - pip install .[dev,beanstalk,elasticsearch,redis] script: - pyflakes vor diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 83a4d84..0000000 --- a/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Ralph Meijer diff --git a/LICENSE b/LICENSE index abd7855..394ed0b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2014 +Copyright (c) 2012-2018 Mochi Media, Inc. Rackspace Hosting, Inc. Ralph Meijer diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..6cc7c1d --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include NEWS.rst +include LICENSE diff --git a/NEWS.rst b/NEWS.rst new file mode 100644 index 0000000..96b6157 --- /dev/null +++ b/NEWS.rst @@ -0,0 +1,44 @@ +News +==== + +This project uses `CalVer `_ with a strict backwards +compatibility policy. The third digit is only for regressions. + +Changes for the upcoming release can be found in the `vor/newsfragments` +directory. + +.. + Do *NOT* add changelog entries here! + + This changelog is managed by towncrier and is compiled at release time from + the news fragments directory. + +.. towncrier release notes start + +Vor 18.0.0rc1 (2018-03-07) +========================== + +Features +-------- + +- vor.elasticsearch now supports the Elasticsearch 1.0 API (#1) +- The new module vor.beanstalk adds support for Beanstalk stats. (#2) +- vor.elasticsearch.ElasticSearchNodeStatsGraphiteService now has a boolean + `hostname_only` parameter to strip the domain off the node's name. (#4, #6) +- The new vor.kafka module adds support for Kafka Consumer Offset polling. (#5) +- The new vor.elasticsearch.ElasticSearchIndicesStatsGraphiteService provides a + poller for the Indices Stats API. (#7, #9) +- vor.elasticsearch now supports basic authentication and (non-validated) https + for its pollers. (#10) + + +Fixes +----- + +- vor.elasticsearch pollers now remove spaces from metric names. (#8) + + +0.0.1 (2014-02-10) +================== + +First release diff --git a/README.md b/README.md deleted file mode 100644 index 6b6dacd..0000000 --- a/README.md +++ /dev/null @@ -1,36 +0,0 @@ -Vör ---- - -[![Build Status](https://travis-ci.org/mochi/vor.png?branch=master)](https://travis-ci.org/mochi/vor) - - -What is this? -============= - -Vör is a set of services for gathering metrics by polling systems and -delivering them to graphite. - -Currently there is support for polling metrics from Elasticsearch and Redis. - - -Requirements -============ - - - Twisted - - simplejson - - txredis - - -Copyright and Warranty -====================== - -The code in this distribution started as an internal tool at Mochi Media and -is made available under the MIT License. See the included LICENSE file for -details. - - -Name -==== - -In Norse mythology, Vör is a goddess associated with wisdom. She is described -as "wise and inquiring, so that nothing can be concealed from her". diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..9c790fe --- /dev/null +++ b/README.rst @@ -0,0 +1,63 @@ +Vör +=== + +|pypi| +|travis| + + +What is this? +------------- + +Vör is a set of services for gathering metrics by polling systems and +delivering them to graphite. + +Currently there is support for polling metrics from Elasticsearch and Redis. + + +Requirements +------------ + +- Python 2.7 or pypy equivalent +- Twisted 16.0.0 or later +- incremental 16.9.0 or later +- treq 16.20.0 or later for Elasticsearch support +- txredis for Redis support +- pybeanstalk for Beanstalk support + + +Copyright and Warranty +---------------------- + +The code in this distribution started as an internal tool at Mochi Media and +is made available under the MIT License. See the included `LICENSE `_ +file for details. + + +Contributors +------------ + +- Christopher Zorn +- Zack Dever +- Dana Powers + + +Author +------ + +Ralph Meijer + + + + +Name +---- + +In Norse mythology, Vör is a goddess associated with wisdom. She is described +as "wise and inquiring, so that nothing can be concealed from her". + + +.. |pypi| image:: http://img.shields.io/pypi/v/vor.svg +.. _pypi: https://pypi.python.org/pypi/vor + +.. |travis| image:: https://travis-ci.org/mochi/vor.svg?branch=master +.. _travis: https://travis-ci.org/mochi/vor diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5ad14c8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[tool.towncrier] + package = "vor" + package_dir = "." + filename = "NEWS.rst" + + [[tool.towncrier.type]] + directory = "feature" + name = "Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Improved Documentation" + showcontent = true + + [[tool.towncrier.type]] + directory = "removal" + name = "Deprecations and Removals" + showcontent = true + + [[tool.towncrier.type]] + directory = "misc" + name = "Misc" + showcontent = false diff --git a/setup.py b/setup.py index ca22d01..98c0fa5 100755 --- a/setup.py +++ b/setup.py @@ -2,25 +2,47 @@ from setuptools import setup +with open('README.rst', 'r') as f: + long_description = f.read() + setup(name='vor', - version='0.0.1', - description='Services for gatheric metrics to send to Graphite', + description='Services for gathering metrics to send to Graphite', + long_description=long_description, maintainer='Ralph Meijer', maintainer_email='ralphm@ik.nu', url='http://github.com/ralphm/vor', license='MIT', platforms='any', + classifiers=[ + 'Programming Language :: Python :: 2.7', + ], packages=[ 'vor', 'vor.test', ], zip_safe=False, + setup_requires=[ + 'incremental>=16.9.0', + ], + use_incremental=True, install_requires=[ + 'incremental>=16.9.0', 'Twisted[tls] >= 16.0.0', - 'simplejson', - 'txredis', - 'pyyaml', - 'pybeanstalk', - 'treq >= 16.12.0', ], + extras_require={ + 'elasticsearch': [ + 'treq >= 16.12.0', + ], + 'redis': [ + 'txredis', + ], + 'beanstalk': [ + 'pybeanstalk', + ], + 'dev': [ + 'pyflakes', + 'coverage', + 'towncrier', + ], + }, ) diff --git a/vor/__init__.py b/vor/__init__.py index e69de29..b405146 100644 --- a/vor/__init__.py +++ b/vor/__init__.py @@ -0,0 +1,11 @@ +""" +Wokkel. + +Support library for Twisted applications using XMPP protocols. +""" + +from vor._version import __version__ as _incremental_version + +__version__ = _incremental_version.public() + +__all__ = ["__version__"] diff --git a/vor/_version.py b/vor/_version.py new file mode 100644 index 0000000..cde8e9f --- /dev/null +++ b/vor/_version.py @@ -0,0 +1,4 @@ +from incremental import Version + +__version__ = Version("vor", 18, 0, 0, release_candidate=1) +__all__ = ["__version__"] diff --git a/vor/newsfragments/10.feature b/vor/newsfragments/10.feature deleted file mode 100644 index 14959e6..0000000 --- a/vor/newsfragments/10.feature +++ /dev/null @@ -1 +0,0 @@ -vor.elasticsearch now supports basic authentication and (non-validated) https for its pollers. diff --git a/vor/test/test_elasticsearch.py b/vor/test/test_elasticsearch.py index 8c353c9..aca4ef9 100644 --- a/vor/test/test_elasticsearch.py +++ b/vor/test/test_elasticsearch.py @@ -1,4 +1,4 @@ -import simplejson +import json import time from twisted.trial import unittest @@ -205,7 +205,7 @@ def setUp(self): }""" - data = simplejson.loads(stats) + data = json.loads(stats) self.collector.flatten(data) self.result = self.collector.protocol.output @@ -1493,8 +1493,8 @@ def setUp(self): }, "cluster_name" : "production" }""" - self.collector.flatten(simplejson.loads(stats)) - self.collector_hostname_only.flatten(simplejson.loads(stats)) + self.collector.flatten(json.loads(stats)) + self.collector_hostname_only.flatten(json.loads(stats)) self.result = self.collector.protocol.output self.result_hostname_only = self.collector_hostname_only.protocol.output @@ -1631,7 +1631,7 @@ def setUp(self): }""" - data = simplejson.loads(stats) + data = json.loads(stats) self.collector.flatten(data) self.result = self.collector.protocol.output @@ -1666,7 +1666,7 @@ def test_statusYellow(self): For status yellow to other metrics are 0. """ stats = """{"status": "yellow"}""" - data = simplejson.loads(stats) + data = json.loads(stats) self.collector.flatten(data) self.result = self.collector.protocol.output