Skip to content

Commit

Permalink
setup poetry project, checkers and simple testing action
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielePalaia committed Dec 5, 2024
1 parent a2e18e2 commit 5c17743
Show file tree
Hide file tree
Showing 8 changed files with 583 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test against a RabbitMQ broker

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize

jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
services:
rabbitmq-streaming:
image: rabbitmq:4.0.3-management
env:
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_stream advertised_host localhost"
ports:
- 5552:5552
- 15672:15672
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.4.2
virtualenvs-create: true
virtualenvs-in-project: false
- name: Enable RabbitMQ Plugins
run: docker exec ${{ job.services.rabbitmq-streaming.id }} rabbitmq-plugins enable rabbitmq_stream rabbitmq_stream_management rabbitmq_amqp1_0
- name: poetry install
run: poetry install --no-root
- name: isort check-only
run: poetry run isort --check-only .
- name: black check
run: poetry run black --check .
- name: flake8
run: poetry run flake8 --exclude=venv,local_tests,docs/examples --max-line-length=120 --ignore=E203,W503
- name: mypy
run: |
poetry run mypy .
- name: poetry run pytest
run: poetry run pytest
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.idea/
.vscode/
.vim/

venv/
dist/
__pycache__/
.coverage
.mypy_cache/
.pytest_cache/
.pytype/
*.pyc
.env*

local*
.githooks/
.venv/
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# rabbitmq-amqp-python-client
Python RabbitMQ client for AMQP 1.0 protocol
# RabbitMQ AMQP 1.0 Python Client

This library is in early stages of development. It is meant to be used with RabbitMQ 4.0.

## How to Run

## Getting Started


462 changes: 462 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[tool.poetry]
name = "rabbitmq-amqp-python-client"
version = "0.1.0"
description = "Python RabbitMQ client for AMQP 1.0 protocol"
authors = ["RabbitMQ team"]
license = "Apache-2.0 license"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
python-qpid-proton = "^0.39.0"

[tool.poetry.dev-dependencies]
flake8 = "^7.1.1"
isort = "^5.9.3"
mypy = "^0.910"
pytest = "^7.4.0"
black = "^23.12.1"
python-qpid-proton = "^0.39.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[isort]
multi_line_output = 3
line_length = 60
include_trailing_comma = True
skip = venv


[flake8]
exclude = .git, venv
max-line-length = 120

[mypy]
python_version = 3.9
strict = True
ignore_missing_imports = True

[mypy-tests.*]
ignore_errors = True
ignore_missing_imports = True

0 comments on commit 5c17743

Please sign in to comment.