-
Notifications
You must be signed in to change notification settings - Fork 0
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
9 changed files
with
415 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
||
[*.py] | ||
max_line_length = 120 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
|
||
[*.rst] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
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,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "github-actions" | ||
# Workflow files stored in the | ||
# default location of `.github/workflows` | ||
directory: ".github/workflows" | ||
schedule: | ||
interval: "daily" |
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,69 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: [ '*' ] | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
max-parallel: 7 | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
python-version: | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
- '3.13' | ||
- pypy-3.9 | ||
include: | ||
- os: ubuntu-22.04 | ||
python-version: '3.9' | ||
coverage: true | ||
lint: true | ||
- os: macOS-latest | ||
python-version: '3.9' | ||
- os: windows-latest | ||
python-version: '3.9' | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -U hatch | ||
- name: ruff | ||
if: ${{ matrix.lint }} | ||
run: | | ||
hatch run lint:style aioworkers_kafka tests | ||
- name: mypy | ||
if: ${{ matrix.lint }} | ||
run: | | ||
hatch run lint:mypy aioworkers_kafka tests | ||
- name: Tests with coverage | ||
run: | | ||
hatch run cov | ||
- name: coverage.xml | ||
if: ${{ matrix.coverage }} | ||
run: | | ||
hatch run coverage xml | ||
- name: Upload coverage to Codecov | ||
if: ${{ matrix.coverage }} | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
fail_ci_if_error: true |
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 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-22.04 | ||
environment: | ||
name: PyPI | ||
url: https://pypi.org/project/aioworkers-kafka/${{ github.ref_name }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade hatch | ||
- name: Build | ||
run: | | ||
hatch version $GITHUB_REF_NAME | ||
hatch build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish | ||
env: | ||
HATCH_INDEX_USER: __token__ | ||
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
hatch publish |
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,15 @@ | ||
[cookiecutter_context] | ||
_checkout = None | ||
_repo_dir = cookiecutter-aioworkers-plugin | ||
_template = cookiecutter-aioworkers-plugin | ||
author_email = [email protected] | ||
author_name = Alexander Malev | ||
description = aioworkers plugin for kafka | ||
development_status = Development Status :: 4 - Beta | ||
docs = https://github.com/aioworkers/aioworkers-kafka#readme | ||
git_branch = main | ||
project_name = kafka | ||
project_package = aioworkers_kafka | ||
project_slug = aioworkers-kafka | ||
python_ci = 3.9 | ||
python_versions = 3.9,3.10,3.11,3.12,3.13 |
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,66 @@ | ||
aioworkers-kafka | ||
================ | ||
|
||
.. image:: https://img.shields.io/pypi/v/aioworkers-kafka.svg | ||
:target: https://pypi.org/project/aioworkers-kafka | ||
|
||
.. image:: https://github.com/aioworkers/aioworkers-kafka/workflows/Tests/badge.svg | ||
:target: https://github.com/aioworkers/aioworkers-kafka/actions?query=workflow%3ATests | ||
|
||
.. image:: https://codecov.io/gh/aioworkers/aioworkers-kafka/branch/master/graph/badge.svg | ||
:target: https://codecov.io/gh/aioworkers/aioworkers-kafka | ||
:alt: Coverage | ||
|
||
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json | ||
:target: https://github.com/charliermarsh/ruff | ||
:alt: Code style: ruff | ||
|
||
.. image:: https://img.shields.io/badge/types-Mypy-blue.svg | ||
:target: https://github.com/python/mypy | ||
:alt: Code style: Mypy | ||
|
||
.. image:: https://readthedocs.org/projects/aioworkers-kafka/badge/?version=latest | ||
:target: https://github.com/aioworkers/aioworkers-kafka#readme | ||
:alt: Documentation Status | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/aioworkers-kafka.svg | ||
:target: https://pypi.org/project/aioworkers-kafka | ||
:alt: Python versions | ||
|
||
.. image:: https://img.shields.io/pypi/dm/aioworkers-kafka.svg | ||
:target: https://pypistats.org/packages/aioworkers-kafka | ||
|
||
.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg | ||
:alt: Hatch project | ||
:target: https://github.com/pypa/hatch | ||
|
||
|
||
Development | ||
----------- | ||
|
||
Check code: | ||
|
||
.. code-block:: shell | ||
hatch run lint:all | ||
Format code: | ||
|
||
.. code-block:: shell | ||
hatch run lint:fmt | ||
Run tests: | ||
|
||
.. code-block:: shell | ||
hatch run pytest | ||
Run tests with coverage: | ||
|
||
.. code-block:: shell | ||
hatch run cov |
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 @@ | ||
__version__ = "0.0.0" |
Empty file.
Oops, something went wrong.