moat-kv 0.70.24__py3-none-any.whl → 0.71.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. build/lib/moat/kv/_cfg.yaml +2 -6
  2. build/lib/moat/kv/backend/mqtt.py +0 -3
  3. ci/rtd-requirements.txt +4 -0
  4. ci/test-requirements.txt +7 -0
  5. ci/travis.sh +96 -0
  6. debian/.gitignore +7 -0
  7. debian/changelog +1435 -0
  8. debian/control +43 -0
  9. debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/_cfg.yaml +2 -6
  10. debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/mqtt.py +0 -3
  11. debian/moat-kv.postinst +3 -0
  12. debian/rules +20 -0
  13. debian/source/format +1 -0
  14. debian/watch +4 -0
  15. docs/Makefile +20 -0
  16. docs/make.bat +36 -0
  17. docs/source/TODO.rst +61 -0
  18. docs/source/_static/.gitkeep +0 -0
  19. docs/source/acls.rst +80 -0
  20. docs/source/auth.rst +84 -0
  21. docs/source/client_protocol.rst +456 -0
  22. docs/source/code.rst +341 -0
  23. docs/source/command_line.rst +1187 -0
  24. docs/source/common_protocol.rst +47 -0
  25. docs/source/debugging.rst +70 -0
  26. docs/source/extend.rst +37 -0
  27. docs/source/history.rst +36 -0
  28. docs/source/index.rst +75 -0
  29. docs/source/model.rst +54 -0
  30. docs/source/overview.rst +83 -0
  31. docs/source/related.rst +89 -0
  32. docs/source/server_protocol.rst +450 -0
  33. docs/source/startup.rst +31 -0
  34. docs/source/translator.rst +244 -0
  35. docs/source/tutorial.rst +711 -0
  36. docs/source/v3.rst +168 -0
  37. examples/code/transform.scale.yml +21 -0
  38. examples/code/transform.switch.yml +82 -0
  39. examples/code/transform.timeslot.yml +63 -0
  40. moat/kv/_cfg.yaml +2 -6
  41. moat/kv/backend/mqtt.py +0 -3
  42. {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/METADATA +2 -5
  43. {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/RECORD +68 -17
  44. scripts/current +15 -0
  45. scripts/env +8 -0
  46. scripts/init +39 -0
  47. scripts/recover +17 -0
  48. scripts/rotate +33 -0
  49. scripts/run +29 -0
  50. scripts/run-all +10 -0
  51. scripts/run-any +10 -0
  52. scripts/run-single +15 -0
  53. scripts/success +4 -0
  54. systemd/moat-kv-recover.service +21 -0
  55. systemd/moat-kv-rotate.service +20 -0
  56. systemd/moat-kv-rotate.timer +10 -0
  57. systemd/moat-kv-run-all.service +26 -0
  58. systemd/moat-kv-run-all@.service +25 -0
  59. systemd/moat-kv-run-any.service +26 -0
  60. systemd/moat-kv-run-any@.service +25 -0
  61. systemd/moat-kv-run-single.service +26 -0
  62. systemd/moat-kv-run-single@.service +25 -0
  63. systemd/moat-kv.service +27 -0
  64. systemd/postinst +7 -0
  65. systemd/sysusers +3 -0
  66. build/lib/moat/kv/backend/serf.py +0 -45
  67. build/lib/moat/kv/mock/serf.py +0 -250
  68. debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/backend/serf.py +0 -45
  69. debian/moat-kv/usr/lib/python3/dist-packages/moat/kv/mock/serf.py +0 -250
  70. moat/kv/backend/serf.py +0 -45
  71. moat/kv/mock/serf.py +0 -250
  72. {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/WHEEL +0 -0
  73. {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/licenses/LICENSE.txt +0 -0
  74. {moat_kv-0.70.24.dist-info → moat_kv-0.71.0.dist-info}/top_level.txt +0 -0
@@ -26,7 +26,6 @@ runner: # for moat.kv.runner.RunnerRoot
26
26
  state: !P :.moat.kv.state"
27
27
 
28
28
  name: "run"
29
- # Serf event name, suffixed by subpath
30
29
 
31
30
  start_delay: 1
32
31
  # time to wait between job starts. Not optional.
@@ -56,9 +55,6 @@ server:
56
55
  # default
57
56
  mqtt:
58
57
  uri: "mqtt://localhost:1883"
59
- serf:
60
- host: "localhost"
61
- port: 7373
62
58
 
63
59
  # event message path/topic prefix
64
60
  root: !P moat.kv
@@ -79,10 +75,10 @@ server:
79
75
  ping:
80
76
  cycle: 10
81
77
  gap: 2
82
- # asyncserf.Actor config timing for server sync
78
+ # asyncactor config timing for server sync
83
79
  # ping also controls minimum server startup time
84
80
  delete:
85
- # asyncserf.Actor config timing for deletion
81
+ # asyncactor config timing for deletion
86
82
  cycle: 100
87
83
  gap: 10
88
84
  version: 1
@@ -11,9 +11,6 @@ from . import Backend
11
11
 
12
12
  logger = logging.getLogger(__name__)
13
13
 
14
- # Simply setting connect=asyncserf.serf_client interferes with mocking
15
- # when testing.
16
-
17
14
 
18
15
  class MqttMessage:
19
16
  def __init__(self, topic, payload):
@@ -0,0 +1,4 @@
1
+ # RTD is currently installing 1.5.3, which has a bug in :lineno-match:
2
+ sphinx >= 1.7.0
3
+ sphinx_rtd_theme
4
+ sphinxcontrib-trio
@@ -0,0 +1,7 @@
1
+ pytest
2
+ pytest-cov
3
+ pytest-trio
4
+ trustme
5
+ flake8 >= 3.7
6
+ mock
7
+ distmqtt >= 0.30
ci/travis.sh ADDED
@@ -0,0 +1,96 @@
1
+ #!/bin/bash
2
+
3
+ set -ex
4
+
5
+ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
6
+ curl -Lo macpython.pkg https://www.python.org/ftp/python/${MACPYTHON}/python-${MACPYTHON}-macosx10.6.pkg
7
+ sudo installer -pkg macpython.pkg -target /
8
+ ls /Library/Frameworks/Python.framework/Versions/*/bin/
9
+ PYTHON_EXE=/Library/Frameworks/Python.framework/Versions/*/bin/python3
10
+ # The pip in older MacPython releases doesn't support a new enough TLS
11
+ curl https://bootstrap.pypa.io/get-pip.py | sudo $PYTHON_EXE
12
+ sudo $PYTHON_EXE -m pip install virtualenv
13
+ $PYTHON_EXE -m virtualenv testenv
14
+ source testenv/bin/activate
15
+ fi
16
+
17
+ if [ "$USE_PYPY_NIGHTLY" = "1" ]; then
18
+ curl -fLo pypy.tar.bz2 http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-latest-linux64.tar.bz2
19
+ if [ ! -s pypy.tar.bz2 ]; then
20
+ # We know:
21
+ # - curl succeeded (200 response code; -f means "exit with error if
22
+ # server returns 4xx or 5xx")
23
+ # - nonetheless, pypy.tar.bz2 does not exist, or contains no data
24
+ # This isn't going to work, and the failure is not informative of
25
+ # anything involving this package.
26
+ ls -l
27
+ echo "PyPy3 nightly build failed to download – something is wrong on their end."
28
+ echo "Skipping testing against the nightly build for right now."
29
+ exit 0
30
+ fi
31
+ tar xaf pypy.tar.bz2
32
+ # something like "pypy-c-jit-89963-748aa3022295-linux64"
33
+ PYPY_DIR=$(echo pypy-c-jit-*)
34
+ PYTHON_EXE=$PYPY_DIR/bin/pypy3
35
+ ($PYTHON_EXE -m ensurepip \
36
+ && $PYTHON_EXE -m pip install virtualenv \
37
+ && $PYTHON_EXE -m virtualenv testenv) \
38
+ || (echo "pypy nightly is broken; skipping tests"; exit 0)
39
+ source testenv/bin/activate
40
+ fi
41
+
42
+ if [ "$USE_PYPY_RELEASE_VERSION" != "" ]; then
43
+ curl -fLo pypy.tar.bz2 https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-${USE_PYPY_RELEASE_VERSION}-linux_x86_64-portable.tar.bz2
44
+ tar xaf pypy.tar.bz2
45
+ # something like "pypy3.5-5.7.1-beta-linux_x86_64-portable"
46
+ PYPY_DIR=$(echo pypy3.5-*)
47
+ PYTHON_EXE=$PYPY_DIR/bin/pypy3
48
+ $PYTHON_EXE -m ensurepip
49
+ $PYTHON_EXE -m pip install virtualenv
50
+ $PYTHON_EXE -m virtualenv testenv
51
+ source testenv/bin/activate
52
+ fi
53
+
54
+ pip install -U pip setuptools wheel
55
+
56
+ if [ "$CHECK_FORMATTING" = "1" ]; then
57
+ pip install black
58
+ if ! black setup.py moat.kv tests ; then
59
+ git diff
60
+ cat <<EOF
61
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
62
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
63
+
64
+ Formatting problems were found (listed above). To fix them, run
65
+
66
+ pip install black
67
+ black setup.py moat.kv
68
+
69
+ in your local checkout.
70
+
71
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
72
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
73
+ EOF
74
+ exit 1
75
+ fi
76
+ exit 0
77
+ fi
78
+
79
+ python setup.py sdist --formats=zip
80
+ pip install dist/*.zip
81
+
82
+ if [ "$CHECK_DOCS" = "1" ]; then
83
+ pip install -Ur ci/rtd-requirements.txt
84
+ cd docs
85
+ # -n (nit-picky): warn on missing references
86
+ # -W: turn warnings into errors
87
+ #sphinx-build -nW -b html source build
88
+ sphinx-build -n -b html source build
89
+ else
90
+ # Actual tests
91
+ pip install -Ur ci/test-requirements.txt
92
+
93
+ pytest -W error -ra -v --pyargs tests --cov=moat.kv --cov-config=.coveragerc --verbose
94
+
95
+ bash <(curl -s https://codecov.io/bash)
96
+ fi
debian/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ /files
2
+ /*.log
3
+ /*.debhelper
4
+ /*.debhelper-build-stamp
5
+ /*.substvars
6
+ /debhelper-build-stamp
7
+ /moat-kv