Skip to content

Commit 20f9868

Browse files
Ormodsaaros
authored andcommitted
Karapace: Initial commit to get things started
Karapace is an aiohttp based daemon written in Python 3.6 that allows you initially to store and retrieve schemas. Also schema compatibility testing support for the modes BACKWARD, FULL and FORWARD compatibility exist, though could surely be more comprehensive. There's a fairly extensive set of unittests for the project but there are sure to be issues that remain so we'll need even more of them in the future. The initial release is roughly ~2.5k LOC in all.
0 parents  commit 20f9868

31 files changed

+3748
-0
lines changed

.flake8

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[flake8]
2+
max-line-length = 125
3+
4+
# Style issues are handled by yapf formatting
5+
ignore =
6+
E126, # continuation line over-indented for hanging indent
7+
W503, # line break before binary operator
8+
E251, # unexpected spaces around keyword / parameter equals

.gitignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.pyc
2+
*.pyo
3+
*~
4+
/.cache
5+
/.coverage
6+
/.project
7+
/.pydevproject
8+
/.pytest_cache/
9+
__pycache__/
10+
/build/
11+
/dist/
12+
/karapace.egg-info/
13+
/karapace-rpm-src.tar
14+
/rpm/
15+
/kafka_*.tgz
16+
/kafka_*/

.pylintrc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[MASTER]
2+
jobs=4
3+
4+
[MESSAGES CONTROL]
5+
disable=
6+
bad-continuation,
7+
fixme,
8+
invalid-name,
9+
missing-docstring,
10+
too-few-public-methods,
11+
too-many-arguments,
12+
too-many-branches,
13+
too-many-instance-attributes,
14+
too-many-locals,
15+
too-many-nested-blocks,
16+
too-many-public-methods,
17+
too-many-statements,
18+
too-public-methods,
19+
wrong-import-order,
20+
21+
[FORMAT]
22+
max-line-length=125
23+
24+
[REPORTS]
25+
output-format=text
26+
reports=no
27+
score=no

.style.yapf

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[style]
2+
# For docs, see https://github.com/google/yapf/blob/master/README.rst
3+
4+
based_on_style = pep8
5+
# Disallow splitting between dict key and dict value in multiline {"key": "value"} lines
6+
ALLOW_SPLIT_BEFORE_DICT_VALUE = false
7+
8+
# Avoid adding unnecessary blank lines when nesting
9+
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = false
10+
11+
# Always add two blank lines for top-level classes and methods
12+
BLANK_LINES_AROUND_TOP_LEVEL_DEFINITION = 2
13+
14+
# These two combine consecutive ({ and }) to same line to reduce clutter
15+
COALESCE_BRACKETS = true
16+
DEDENT_CLOSING_BRACKETS = true
17+
18+
# Line length
19+
COLUMN_LIMIT = 125
20+
21+
# Try to avoid having overly long lines by having excessively large penalty for that.
22+
SPLIT_PENALTY_EXCESS_CHARACTER = 1000000000
23+
24+
# Always split dict entries to one entry per line
25+
# EACH_DICT_ENTRY_ON_SEPARATE_LINE = true
26+
27+
# Never split this comment to a separate line. Workaround for certain flake8 & email template lines
28+
I18N_COMMENT = # noqa
29+
30+
# Allow automatically joining lines, for example, multiline if that would fit to a single line
31+
JOIN_MULTIPLE_LINES = true
32+
33+
# "3 * 5", instead of "3*5"
34+
SPACES_AROUND_POWER_OPERATOR = true
35+
36+
# Follow normal comment style by adding two spaces between code and comment
37+
SPACES_BEFORE_COMMENT = 2
38+
39+
# If list of items is comma terminated, always split to one per line.
40+
SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED = true
41+
42+
# Related to previous one, if list of items (args or dict/list/...) needs to be split, split to one per line.
43+
# SPLIT_ALL_COMMA_SEPARATED_VALUES = true
44+
45+
# Split dict generators for clarity (add line breaks between { and key: val etc.
46+
SPLIT_BEFORE_DICT_SET_GENERATOR = true
47+
48+
# Split method(k1=v1, k2=v2...) to separate lines
49+
SPLIT_BEFORE_NAMED_ASSIGNS = true
50+
51+
# For complex (for some definition of complex) comprehensions, put output, for and if to separate lines
52+
SPLIT_COMPLEX_COMPREHENSION = true
53+
54+
# When splitting something to multiple lines ('method(\n val...'), intend by 4
55+
CONTINUATION_INDENT_WIDTH = 4

.travis.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: python
2+
3+
python:
4+
- "3.5"
5+
- "3.6"
6+
7+
# TODO: remove these overrides once default dist supports python 3.7
8+
matrix:
9+
include:
10+
- python: 3.7
11+
dist: xenial
12+
sudo: true
13+
14+
install:
15+
- "pip install astroid==2.0.0 flake8 pylint pytest isort yapf requests kafka-python aiohttp avro-python3 aiosocksy"
16+
17+
script:
18+
- "make pylint"
19+
- "make flake8"
20+
- "make unittest"

0 commit comments

Comments
 (0)