Commit Graph

10 Commits

Author SHA1 Message Date
Hervé Beraud c3d8c2ed96 Adding pre-commit
Introduced changes:
- pre-commit config and rules.
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker
  (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings
  (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I7a2386a823fdd43b138956894bd915c0e11289a9
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-10-09 15:35:34 +00:00
Riccardo Pittau 5ac72fcb3d Remove six library
The tooz project doesn't support Python 2 anymore, using the
six library should not be necessary.

Change-Id: I9886cabcd13cbc615065ceb372efbf037dff1aeb
2020-07-01 15:56:53 +02:00
Julien Danjou ba62597183 doc: update heartbeat doc to use start_heart=True
Change-Id: I5560b1ec1da7922586e5544d55b5e508c70a33fc
2017-04-27 16:40:57 +02:00
Julien Danjou 9ad740fa1e Add partitioner implementation
Add a new object called `Partitioner' which is based on the consistent
hashring implementation of tooz.hashring. The coordinator API allows to
create such an object and to use it to dispatch objects ownership across
several workers.

Change-Id: Iae8c861d5b6c15b714f1ec3bd7090d15dd468421
2017-01-01 19:03:40 +01:00
Julien Danjou e29ca79ed9 Add a hashring implementation
This is a consistent hash ring implementation based on the one that can
be found in Nova, Ironic, Ceilometer and Aodh.

Change-Id: I5d2f4efcd354a187747fa645482db2029a1a14b7
2016-12-07 23:40:35 +01:00
Julien Danjou fd368a706b doc: switch examples to Zake
This avoids having Zookeeper or memcached running, which might not be
the case.

Change-Id: Ib66eb8348aece447ee2c8de084c4ac807b552907
2014-11-18 15:39:05 +01:00
Julien Danjou 2d008d05a6 doc: add locking
Change-Id: I1de6356700a8fb2903b7627fd890a6a5532c256d
2014-11-18 15:35:32 +01:00
Joshua Harlow fd730c42a3 Have examples run in the py27 environment and make them work
It is great to ensure that the examples that tooz has actually run
during testing time, so enable this as well as adjust the examples
to create unique group ids and run for a limited amount of time instead
of running forever (and fix a few other brokeness)...

Change-Id: I573cf5946a1d3f13862c0c28cf3a5d7fc6178873
2014-09-19 11:57:56 -07:00
Julien Danjou d38fe0301d Switch to URL for loading backends
This allow to pass options in a single string, which is going to be
easier for managing options.

Change-Id: I32409c09153b8abaf2b36c31f0bbf658a9d653bc
2014-08-07 18:12:51 +02:00
Julien Danjou fc85db067a Add documentation
Change-Id: Ib236d2061f5f375f7314993db7e6fc38d0f8750b
2014-07-18 15:08:14 +02:00