-
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.
setup poetry project, checkers and simple testing action
- Loading branch information
DanielePalaia
committed
Dec 5, 2024
1 parent
a2e18e2
commit 5c17743
Showing
8 changed files
with
583 additions
and
2 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,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 |
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,17 @@ | ||
.idea/ | ||
.vscode/ | ||
.vim/ | ||
|
||
venv/ | ||
dist/ | ||
__pycache__/ | ||
.coverage | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
.pytype/ | ||
*.pyc | ||
.env* | ||
|
||
local* | ||
.githooks/ | ||
.venv/ |
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,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 | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
[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.
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,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 |