Skip to content

Commit 5c17743

Browse files
author
DanielePalaia
committed
setup poetry project, checkers and simple testing action
1 parent a2e18e2 commit 5c17743

File tree

8 files changed

+583
-2
lines changed

8 files changed

+583
-2
lines changed

.github/workflows/build-test.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Test against a RabbitMQ broker
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
12+
jobs:
13+
ci:
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: [3.9]
18+
os: [ubuntu-22.04]
19+
runs-on: ${{ matrix.os }}
20+
services:
21+
rabbitmq-streaming:
22+
image: rabbitmq:4.0.3-management
23+
env:
24+
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_stream advertised_host localhost"
25+
ports:
26+
- 5552:5552
27+
- 15672:15672
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-python@v2
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
- name: Install and configure Poetry
34+
uses: snok/install-poetry@v1
35+
with:
36+
version: 1.4.2
37+
virtualenvs-create: true
38+
virtualenvs-in-project: false
39+
- name: Enable RabbitMQ Plugins
40+
run: docker exec ${{ job.services.rabbitmq-streaming.id }} rabbitmq-plugins enable rabbitmq_stream rabbitmq_stream_management rabbitmq_amqp1_0
41+
- name: poetry install
42+
run: poetry install --no-root
43+
- name: isort check-only
44+
run: poetry run isort --check-only .
45+
- name: black check
46+
run: poetry run black --check .
47+
- name: flake8
48+
run: poetry run flake8 --exclude=venv,local_tests,docs/examples --max-line-length=120 --ignore=E203,W503
49+
- name: mypy
50+
run: |
51+
poetry run mypy .
52+
- name: poetry run pytest
53+
run: poetry run pytest

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.idea/
2+
.vscode/
3+
.vim/
4+
5+
venv/
6+
dist/
7+
__pycache__/
8+
.coverage
9+
.mypy_cache/
10+
.pytest_cache/
11+
.pytype/
12+
*.pyc
13+
.env*
14+
15+
local*
16+
.githooks/
17+
.venv/

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
# rabbitmq-amqp-python-client
2-
Python RabbitMQ client for AMQP 1.0 protocol
1+
# RabbitMQ AMQP 1.0 Python Client
2+
3+
This library is in early stages of development. It is meant to be used with RabbitMQ 4.0.
4+
5+
## How to Run
6+
7+
## Getting Started
8+
9+

poetry.lock

Lines changed: 462 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[tool.poetry]
2+
name = "rabbitmq-amqp-python-client"
3+
version = "0.1.0"
4+
description = "Python RabbitMQ client for AMQP 1.0 protocol"
5+
authors = ["RabbitMQ team"]
6+
license = "Apache-2.0 license"
7+
readme = "README.md"
8+
9+
[tool.poetry.dependencies]
10+
python = "^3.9"
11+
python-qpid-proton = "^0.39.0"
12+
13+
[tool.poetry.dev-dependencies]
14+
flake8 = "^7.1.1"
15+
isort = "^5.9.3"
16+
mypy = "^0.910"
17+
pytest = "^7.4.0"
18+
black = "^23.12.1"
19+
python-qpid-proton = "^0.39.0"
20+
21+
[build-system]
22+
requires = ["poetry-core"]
23+
build-backend = "poetry.core.masonry.api"

rabbitmq_amqp_python_client/__init__.py

Whitespace-only changes.

rabbitmq_amqp_python_client/py.typed

Whitespace-only changes.

setup.cfg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[isort]
2+
multi_line_output = 3
3+
line_length = 60
4+
include_trailing_comma = True
5+
skip = venv
6+
7+
8+
[flake8]
9+
exclude = .git, venv
10+
max-line-length = 120
11+
12+
[mypy]
13+
python_version = 3.9
14+
strict = True
15+
ignore_missing_imports = True
16+
17+
[mypy-tests.*]
18+
ignore_errors = True
19+
ignore_missing_imports = True

0 commit comments

Comments
 (0)