Skip to content

Commit fcf7e7e

Browse files
committed
Update docs and tests
1 parent afe3e16 commit fcf7e7e

File tree

3 files changed

+9
-43
lines changed

3 files changed

+9
-43
lines changed

README.md

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ asyncapi_python_service(
7676
)
7777
```
7878

79-
This will be generating python module named `asyncapi_app` on `codegen-export` and `export` goals.
79+
This will be generating python module named `asyncapi_app` on `codegen-export`, and `export` goals.
8080
This target can later be used as a dependency of `python_sources`.
8181

8282
```python
@@ -100,51 +100,16 @@ Note that this plugin does not do dependency injection, so asyncapi-python must
100100
asyncapi-python[amqp]
101101
```
102102

103-
### Deploying this plugin into pants monorepo
104-
105-
In order to deploy this plugin into your pants monorepo, create the following structure inside your plugins folder:
106-
107-
```bash
108-
pants-plugins/
109-
└── asyncapi_python_plugin
110-
├── BUILD
111-
├── __init__.py
112-
├── register.py
113-
└── requirements.txt
114-
```
115-
116-
`requirements.txt` must contain:
117-
118-
```text
119-
asyncapi-python
120-
```
121-
122-
`register.py` should have:
123-
124-
```python
125-
from asyncapi_python_pants.register import *
126-
```
127-
128-
`BUILD` must include:
129-
130-
```python
131-
python_sources(
132-
dependencies=[":reqs"],
133-
)
134-
135-
python_requirements(
136-
name="reqs",
137-
)
138-
```
139-
140-
`__init__.py` can be empty, but it has to exist.
141-
142-
Finally, add `pants-plugins` to your `PYTHONPATH`, and add the created folder as a backend package:
103+
### Deploying this plugin into your pants monorepo
143104

144105
```toml
145106
# pants.toml
107+
plugins = [
108+
"asyncapi_python[codegen]==0.2.5", # Plugin version MUST match the version of your python clients
109+
...
110+
]
146111
backend_packages = [
147-
"asyncapi_python_plugin",
112+
"asyncapi_python_pants",
148113
...
149114
]
150115
pythonpath = ["%(buildroot)s/pants-plugins"]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "asyncapi-python"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
license = "Apache-2.0"
55
description = "Easily generate type-safe and async Python applications from AsyncAPI 3 specifications."
66
authors = ["Yaroslav Petrov <yaroslav.v.petrov@gmail.com>"]

tests/core/amqp/test_endpoint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def params(
117117
decode=decode_message,
118118
app_id=app_id,
119119
stop_application=lambda: exit(-1),
120+
amqp_params={},
120121
)
121122

122123

0 commit comments

Comments
 (0)