-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,197 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,49 @@ | ||
trigger: | ||
- master | ||
- dev | ||
- master | ||
- dev | ||
|
||
schedules: | ||
- cron: "0 8 * * 1,3,5" | ||
displayName: Monday, Wednesday and Friday - 1 AM (PDT) build | ||
branches: | ||
include: | ||
- dev | ||
- master | ||
exclude: | ||
- release/* | ||
- releases/ancient/* | ||
|
||
jobs: | ||
- job: Tests | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
strategy: | ||
matrix: | ||
Python36: | ||
pythonVersion: '3.6' | ||
Python37: | ||
pythonVersion: '3.7' | ||
Python38: | ||
pythonVersion: '3.8' | ||
maxParallel: 3 | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(pythonVersion)' | ||
addToPath: true | ||
- task: ShellScript@2 | ||
inputs: | ||
disableAutoCwd: true | ||
scriptPath: .ci/build.sh | ||
displayName: 'Build' | ||
- bash: | | ||
chmod +x .ci/run_tests.sh | ||
.ci/run_tests.sh | ||
displayName: 'Run Tests' | ||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
codeCoverageTool: cobertura | ||
summaryFileLocation: coverage.xml | ||
- bash: | | ||
rm coverage.xml | ||
displayName: 'Clearing coverage.xml file' | ||
- job: Tests | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
strategy: | ||
matrix: | ||
Python36: | ||
pythonVersion: '3.6' | ||
Python37: | ||
pythonVersion: '3.7' | ||
Python38: | ||
pythonVersion: '3.8' | ||
maxParallel: 3 | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(pythonVersion)' | ||
addToPath: true | ||
- task: ShellScript@2 | ||
inputs: | ||
disableAutoCwd: true | ||
scriptPath: .ci/build.sh | ||
displayName: 'Build' | ||
- bash: | | ||
chmod +x .ci/run_tests.sh | ||
.ci/run_tests.sh | ||
displayName: 'Run Tests' | ||
- task: PublishCodeCoverageResults@1 | ||
inputs: | ||
codeCoverageTool: cobertura | ||
summaryFileLocation: coverage.xml | ||
- bash: | | ||
rm coverage.xml | ||
displayName: 'Clearing coverage.xml file' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
from pkgutil import extend_path | ||
import typing | ||
|
||
__path__: typing.Iterable[str] = extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
import abc | ||
import typing | ||
|
||
|
||
class AbstractKafkaEvent(abc.ABC): | ||
|
||
@abc.abstractmethod | ||
def get_body(self) -> bytes: | ||
pass | ||
|
||
@property | ||
@abc.abstractmethod | ||
def key(self) -> typing.Optional[str]: | ||
pass | ||
|
||
@property | ||
@abc.abstractmethod | ||
def offset(self) -> typing.Optional[int]: | ||
pass | ||
|
||
@property | ||
@abc.abstractmethod | ||
def partition(self) -> typing.Optional[int]: | ||
pass | ||
|
||
@property | ||
@abc.abstractmethod | ||
def topic(self) -> typing.Optional[str]: | ||
pass | ||
|
||
@property | ||
@abc.abstractmethod | ||
def timestamp(self) -> typing.Optional[str]: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.