Merge lp://staging/~lucio.torre/txstatsd/add-config-file into lp://staging/txstatsd

Proposed by Lucio Torre
Status: Merged
Approved by: Sidnei da Silva
Approved revision: 13
Merge reported by: Lucio Torre
Merged at revision: not available
Proposed branch: lp://staging/~lucio.torre/txstatsd/add-config-file
Merge into: lp://staging/txstatsd
Diff against target: 374 lines (+261/-15)
9 files modified
MANIFEST.in (+2/-2)
setup.py (+16/-1)
statsd.tac (+5/-9)
twisted/plugins/txstatsd_plugin.py (+22/-0)
txstatsd.conf-example (+6/-0)
txstatsd/metrics.py (+1/-1)
txstatsd/processor.py (+3/-2)
txstatsd/service.py (+103/-0)
txstatsd/tests/test_service.py (+103/-0)
To merge this branch: bzr merge lp://staging/~lucio.torre/txstatsd/add-config-file
Reviewer Review Type Date Requested Status
Sidnei da Silva Approve
Review via email: mp+66840@code.staging.launchpad.net

Commit message

add config file support

Description of the change

Adds config file support to txstatsd.

Now you can configure txstatsd using command line arguments and/or a config file when running as a twistd plugin.

After installing, you can now do:
$ twistd txstatsd

And it will start txstatsd with the default parameters.

If --config/-c FILE is specified, it will read the config from that file. All the arguments can also be specified from the command line and will take precedence over the ones in the config file.

To post a comment you must log in.
Revision history for this message
Sidnei da Silva (sidnei) wrote :
Download full text (4.7 KiB)

Looks great, with some whitespace cleanup and naming consistency
issues fixed. +1.

[1] pep8 isn't supper happy. :)

=== pep8 ===

txstatsd/tests/test_service.py:15:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:19:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:26:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:30:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:37:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:38:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:39:9: E303 too many blank lines (2)
txstatsd/tests/test_service.py:40:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:41:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:42:5: E303 too many blank lines (2)
txstatsd/tests/test_service.py:47:55: E202 whitespace before ']'
txstatsd/tests/test_service.py:49:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:59:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:63:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:71:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:79:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:85:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:90:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:91:1: W293 blank line contains whitespace
txstatsd/tests/test_service.py:96:61: W292 no newline at end of file
twisted/plugins/txstatsd_plugin.py:22:38: W292 no newline at end of file
txstatsd/service.py:12:1: E302 expected 2 blank lines, found 1
txstatsd/service.py:16:1: W293 blank line contains whitespace
txstatsd/service.py:18:1: W293 blank line contains whitespace
txstatsd/service.py:24:1: W293 blank line contains whitespace
txstatsd/service.py:30:1: W293 blank line contains whitespace
txstatsd/service.py:36:1: W293 blank line contains whitespace
txstatsd/service.py:38:1: W293 blank line contains whitespace
txstatsd/service.py:43:1: W293 blank line contains whitespace
txstatsd/service.py:48:1: W293 blank line contains whitespace
txstatsd/service.py:58:1: W293 blank line contains whitespace
txstatsd/service.py:60:1: W293 blank line contains whitespace
txstatsd/service.py:61:1: W293 blank line contains whitespace
txstatsd/service.py:76:1: W293 blank line contains whitespace
txstatsd/service.py:77:1: W293 blank line contains whitespace
txstatsd/service.py:80:1: W293 blank line contains whitespace
txstatsd/service.py:94:1: W293 blank line contains whitespace
txstatsd/service.py:95:19: W292 no newline at end of file
setup.py:30:1: E302 expected 2 blank lines, found 1

[2] some warnings from pyflakes but you can ignore those.

=== pyflakes ===

setup.py:11: 'setuptools' imported but unused
setup.py:14: redefinition of unused 'find_packages' from line 12

[3] is 'refresh_plugin_cache' needed in setup.py? A docstring
explaining why would be nice.

[4] Please use assertEqual(expected, got) instead of assertEquals(got, expected)

[5] The docstring for test_no_config_option is the same as
test_set_parameter, please update...

Read more...

Revision history for this message
Sidnei da Silva (sidnei) :
review: Approve
14. By Lucio Torre

fixes and cleanup

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches