Skip to content

Commit

Permalink
Merge pull request #2672 from fetchai/develop
Browse files Browse the repository at this point in the history
release 1.1.1
  • Loading branch information
solarw authored Dec 16, 2021
2 parents 0fe0060 + cd1b9fc commit d3f177a
Show file tree
Hide file tree
Showing 409 changed files with 5,858 additions and 4,413 deletions.
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ CosmPy
dockerised
Mermaid-JS
darglint
aea-cli-ipfs
- docs/language-agnostic-definition.md
fetchai
protocol_id
Expand Down
17 changes: 17 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Release History

## 1.1.1 (2021-12-15)

AEA:
- Updates the protocol generator to generate protocols that satisfy linter constraints

Plugins:
- aea-cli-ipfs plugin small update

Packages:
- Fixes fetchai/p2p_libp2p connection to address a slow DHT lookup problem
- Updates protocols with the latest protocol generator
- Updates random beacon agent so it produces block data instead of the (now deprecated feature of the test-net) random beacon data

Misc
- Bumps go library versions
- Various fixes and improvements

## 1.1.0 (2021-10-13)

AEA:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ lint:
isort aea benchmark examples packages plugins scripts tests
flake8 aea benchmark examples packages plugins scripts tests
vulture aea scripts/whitelist.py --exclude "*_pb2.py"
darglint aea benchmark examples libs packages/fetchai/connections packages/fetchai/contracts packages/fetchai/skills plugins scripts
darglint aea benchmark examples libs packages plugins scripts

.PHONY: pylint
pylint:
Expand Down
2 changes: 1 addition & 1 deletion aea/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
__title__ = "aea"
__description__ = "Autonomous Economic Agent framework"
__url__ = "https://github.com/fetchai/agents-aea.git"
__version__ = "1.1.0"
__version__ = "1.1.1"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
8 changes: 5 additions & 3 deletions aea/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ def stop_event_thread() -> None:
t.start()
loop = asyncio.get_event_loop()
aea.runtime.set_loop(loop)
aea.start()
aea.runtime.start()
loop.run_until_complete(aea.runtime.wait_completed())

except BaseException as e: # pylint: disable=broad-except
print(
f"Exception in agent subprocess task at {datetime.datetime.now()}:\n{format_exc()}"
Expand All @@ -291,8 +293,8 @@ def stop_event_thread() -> None:
run_stop_thread = False
if t:
t.join(10)

result_queue.put(r)
result_queue.put(r)
aea.logger.debug("process task stopped")

def stop(self) -> None:
"""Stop the task."""
Expand Down
21 changes: 14 additions & 7 deletions aea/protocols/generator/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@ def _message_class_str(self) -> str:
cls_str += self.indent + ":param dialogue_reference: the dialogue reference.\n"
cls_str += self.indent + ":param target: the message target.\n"
cls_str += self.indent + ":param performative: the message performative.\n"
cls_str += self.indent + ":param **kwargs: extra options.\n"
cls_str += self.indent + '"""\n'

cls_str += self.indent + "super().__init__(\n"
Expand Down Expand Up @@ -965,7 +966,10 @@ def _valid_replies_str(self) -> str:
:return: the `valid replies` dictionary string
"""
valid_replies_str = self.indent + "VALID_REPLIES = {\n"
valid_replies_str = (
self.indent
+ "VALID_REPLIES: Dict[Message.Performative, FrozenSet[Message.Performative]] = {\n"
)
self._change_indent(1)
for performative in sorted(self.spec.reply.keys()):
valid_replies_str += (
Expand Down Expand Up @@ -1067,7 +1071,7 @@ def _dialogue_class_str(self) -> str:
# Imports
cls_str += self.indent + "from abc import ABC\n"
cls_str += (
self.indent + "from typing import Callable, FrozenSet, Type, cast\n\n"
self.indent + "from typing import Callable, Dict, FrozenSet, Type, cast\n\n"
)
cls_str += self.indent + "from aea.common import Address\n"
cls_str += self.indent + "from aea.protocols.base import Message\n"
Expand Down Expand Up @@ -1111,11 +1115,11 @@ def _dialogue_class_str(self) -> str:
)
cls_str += (
self.indent
+ "INITIAL_PERFORMATIVES = frozenset({"
+ "INITIAL_PERFORMATIVES: FrozenSet[Message.Performative] = frozenset({"
+ initial_performatives_str
+ "})\n"
+ self.indent
+ "TERMINAL_PERFORMATIVES = frozenset({"
+ "TERMINAL_PERFORMATIVES: FrozenSet[Message.Performative] = frozenset({"
+ terminal_performatives_str
+ "})\n"
+ self._valid_replies_str()
Expand Down Expand Up @@ -1153,7 +1157,7 @@ def _dialogue_class_str(self) -> str:
self.indent
+ ":param role: the role of the agent this dialogue is maintained for\n"
)
cls_str += self.indent + ":return: None\n"
cls_str += self.indent + ":param message_class: the message class used\n"
cls_str += self.indent + '"""\n'
cls_str += self.indent + "Dialogue.__init__(\n"
cls_str += self.indent + "self,\n"
Expand Down Expand Up @@ -1216,7 +1220,11 @@ def _dialogue_class_str(self) -> str:
self.indent
+ ":param self_address: the address of the entity for whom dialogues are maintained\n"
)
cls_str += self.indent + ":return: None\n"
cls_str += self.indent + ":param dialogue_class: the dialogue class used\n"
cls_str += (
self.indent
+ ":param role_from_first_message: the callable determining role from first message\n"
)
cls_str += self.indent + '"""\n'
cls_str += self.indent + "Dialogues.__init__(\n"
self._change_indent(1)
Expand Down Expand Up @@ -1303,7 +1311,6 @@ def _custom_types_module_str(self) -> str:
_camel_case_to_snake_case(custom_type)
)
)
cls_str += self.indent + ":return: None\n"
cls_str += self.indent + '"""\n'
cls_str += self.indent + "raise NotImplementedError\n\n"
self._change_indent(-1)
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apk add --no-cache go

# aea installation
RUN pip install --upgrade pip
RUN pip install --upgrade --force-reinstall aea[all]==1.1.0
RUN pip install --upgrade --force-reinstall aea[all]==1.1.1

# directories and aea cli config
COPY /.aea /home/.aea
Expand Down
2 changes: 1 addition & 1 deletion develop-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Swap the following lines if you want to work with 'latest'
DOCKER_IMAGE_TAG=fetchai/aea-develop:1.1.0
DOCKER_IMAGE_TAG=fetchai/aea-develop:1.1.1
# DOCKER_IMAGE_TAG=aea-develop:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
24 changes: 12 additions & 12 deletions docs/aggregation-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Repeat the following process four times in four different terminals (for each {`
Fetch the aggregator AEA:
``` bash
agent_name="agg$i"
aea fetch fetchai/simple_aggregator:0.4.0 --alias $agent_name
aea fetch fetchai/simple_aggregator:0.5.0 --alias $agent_name
cd $agent_name
aea install
aea build
Expand All @@ -34,15 +34,15 @@ Create the AEA.
agent_name="agg$i"
aea create agent_name
cd agent_name
aea add connection fetchai/http_client:0.23.0
aea add connection fetchai/http_server:0.22.0
aea add connection fetchai/p2p_libp2p:0.25.0
aea add connection fetchai/soef:0.26.0
aea add connection fetchai/prometheus:0.8.0
aea add skill fetchai/advanced_data_request:0.6.0
aea add skill fetchai/simple_aggregation:0.2.0

aea config set agent.default_connection fetchai/p2p_libp2p:0.25.0
aea add connection fetchai/http_client:0.24.0
aea add connection fetchai/http_server:0.23.0
aea add connection fetchai/p2p_libp2p:0.26.0
aea add connection fetchai/soef:0.27.0
aea add connection fetchai/prometheus:0.9.0
aea add skill fetchai/advanced_data_request:0.7.0
aea add skill fetchai/simple_aggregation:0.3.0

aea config set agent.default_connection fetchai/p2p_libp2p:0.26.0
aea install
aea build
```
Expand Down Expand Up @@ -126,8 +126,8 @@ aea config set vendor.fetchai.connections.http_server.config.port $((8000+i))

To publish the aggregated value to an oracle smart contract, add the ledger connection and simple oracle skill to one of the aggregators:
``` bash
aea add connection fetchai/ledger:0.19.0
aea add skill fetchai/simple_oracle:0.14.0
aea add connection fetchai/ledger:0.20.0
aea add skill fetchai/simple_oracle:0.15.0
```

Configure the simple oracle skill for the `fetchai` ledger:
Expand Down
4 changes: 0 additions & 4 deletions docs/api/protocols/default/custom_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ The protocol buffer object in the error_code_protobuf_object argument is matched
- `error_code_protobuf_object`: the protocol buffer object whose type corresponds with this class.
- `error_code_object`: an instance of this class to be encoded in the protocol buffer object.

**Returns**:

None

<a name="packages.fetchai.protocols.default.custom_types.ErrorCode.decode"></a>
#### decode

Expand Down
11 changes: 3 additions & 8 deletions docs/api/protocols/default/dialogues.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ Initialize a dialogue.
- `dialogue_label`: the identifier of the dialogue
- `self_address`: the address of the entity for whom this dialogue is maintained
- `role`: the role of the agent this dialogue is maintained for

**Returns**:

None
- `message_class`: the message class used

<a name="packages.fetchai.protocols.default.dialogues.DefaultDialogues"></a>
## DefaultDialogues Objects
Expand All @@ -73,8 +70,6 @@ Initialize dialogues.
**Arguments**:

- `self_address`: the address of the entity for whom dialogues are maintained

**Returns**:

None
- `dialogue_class`: the dialogue class used
- `role_from_first_message`: the callable determining role from first message

1 change: 1 addition & 0 deletions docs/api/protocols/default/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Initialise an instance of DefaultMessage.
- `dialogue_reference`: the dialogue reference.
- `target`: the message target.
- `performative`: the message performative.
:param **kwargs: extra options.

<a name="packages.fetchai.protocols.default.message.DefaultMessage.valid_performatives"></a>
#### valid`_`performatives
Expand Down
4 changes: 0 additions & 4 deletions docs/api/protocols/signing/custom_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ The protocol buffer object in the error_code_protobuf_object argument is matched
- `error_code_protobuf_object`: the protocol buffer object whose type corresponds with this class.
- `error_code_object`: an instance of this class to be encoded in the protocol buffer object.

**Returns**:

None

<a name="packages.fetchai.protocols.signing.custom_types.ErrorCode.decode"></a>
#### decode

Expand Down
11 changes: 3 additions & 8 deletions docs/api/protocols/signing/dialogues.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ Initialize a dialogue.
- `dialogue_label`: the identifier of the dialogue
- `self_address`: the address of the entity for whom this dialogue is maintained
- `role`: the role of the agent this dialogue is maintained for

**Returns**:

None
- `message_class`: the message class used

<a name="packages.fetchai.protocols.signing.dialogues.SigningDialogues"></a>
## SigningDialogues Objects
Expand All @@ -73,8 +70,6 @@ Initialize dialogues.
**Arguments**:

- `self_address`: the address of the entity for whom dialogues are maintained

**Returns**:

None
- `dialogue_class`: the dialogue class used
- `role_from_first_message`: the callable determining role from first message

1 change: 1 addition & 0 deletions docs/api/protocols/signing/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Initialise an instance of SigningMessage.
- `dialogue_reference`: the dialogue reference.
- `target`: the message target.
- `performative`: the message performative.
:param **kwargs: extra options.

<a name="packages.fetchai.protocols.signing.message.SigningMessage.valid_performatives"></a>
#### valid`_`performatives
Expand Down
11 changes: 3 additions & 8 deletions docs/api/protocols/state_update/dialogues.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ Initialize a dialogue.
- `dialogue_label`: the identifier of the dialogue
- `self_address`: the address of the entity for whom this dialogue is maintained
- `role`: the role of the agent this dialogue is maintained for

**Returns**:

None
- `message_class`: the message class used

<a name="packages.fetchai.protocols.state_update.dialogues.StateUpdateDialogues"></a>
## StateUpdateDialogues Objects
Expand All @@ -73,8 +70,6 @@ Initialize dialogues.
**Arguments**:

- `self_address`: the address of the entity for whom dialogues are maintained

**Returns**:

None
- `dialogue_class`: the dialogue class used
- `role_from_first_message`: the callable determining role from first message

1 change: 1 addition & 0 deletions docs/api/protocols/state_update/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Initialise an instance of StateUpdateMessage.
- `dialogue_reference`: the dialogue reference.
- `target`: the message target.
- `performative`: the message performative.
:param **kwargs: extra options.

<a name="packages.fetchai.protocols.state_update.message.StateUpdateMessage.valid_performatives"></a>
#### valid`_`performatives
Expand Down
26 changes: 13 additions & 13 deletions docs/aries-cloud-agent-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Now you can create **Alice_AEA** and **Faber_AEA** in terminals 3 and 4 respecti
In the third terminal, fetch **Alice_AEA** and move into its project folder:

``` bash
aea fetch fetchai/aries_alice:0.31.0
aea fetch fetchai/aries_alice:0.32.0
cd aries_alice
```

Expand All @@ -191,11 +191,11 @@ The following steps create <b>Alice_AEA</b> from scratch:
``` bash
aea create aries_alice
cd aries_alice
aea add connection fetchai/p2p_libp2p:0.25.0
aea add connection fetchai/soef:0.26.0
aea add connection fetchai/http_client:0.23.0
aea add connection fetchai/webhook:0.19.0
aea add skill fetchai/aries_alice:0.24.0
aea add connection fetchai/p2p_libp2p:0.26.0
aea add connection fetchai/soef:0.27.0
aea add connection fetchai/http_client:0.24.0
aea add connection fetchai/webhook:0.20.0
aea add skill fetchai/aries_alice:0.25.0
```
</p>
</details>
Expand Down Expand Up @@ -257,14 +257,14 @@ Finally run **Alice_AEA**:
aea run
```

Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.25.0 -u public_uri` to retrieve the address.) We will refer to this as **Alice_AEA's P2P address**.
Once you see a message of the form `To join its network use multiaddr 'SOME_ADDRESS'` take note of the address. (Alternatively, use `aea get-multiaddress fetchai -c -i fetchai/p2p_libp2p:0.26.0 -u public_uri` to retrieve the address.) We will refer to this as **Alice_AEA's P2P address**.

### Faber_AEA

In the fourth terminal, fetch **Faber_AEA** and move into its project folder:

``` bash
aea fetch fetchai/aries_faber:0.31.0
aea fetch fetchai/aries_faber:0.32.0
cd aries_faber
```

Expand All @@ -275,11 +275,11 @@ The following steps create <b>Faber_AEA</b> from scratch:
``` bash
aea create aries_faber
cd aries_faber
aea add connection fetchai/p2p_libp2p:0.25.0
aea add connection fetchai/soef:0.26.0
aea add connection fetchai/http_client:0.23.0
aea add connection fetchai/webhook:0.19.0
aea add skill fetchai/aries_faber:0.22.0
aea add connection fetchai/p2p_libp2p:0.26.0
aea add connection fetchai/soef:0.27.0
aea add connection fetchai/http_client:0.24.0
aea add connection fetchai/webhook:0.20.0
aea add skill fetchai/aries_faber:0.23.0
```
</p>
</details>
Expand Down
2 changes: 1 addition & 1 deletion docs/build-aea-programmatically.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ We will use the stub connection to pass envelopes in and out of the AEA. Ensure
```

## Initialise the AEA
We use the <a href="../api/aea_builder#aeabuilder-objects">`AEABuilder`</a> to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:1.0.0`, `fetchai/state_update:1.0.0` and `fetchai/signing:1.0.0` protocols.
We use the <a href="../api/aea_builder#aeabuilder-objects">`AEABuilder`</a> to readily build an AEA. By default, the `AEABuilder` adds the `fetchai/default:1.1.0`, `fetchai/state_update:1.1.0` and `fetchai/signing:1.1.0` protocols.
``` python
# Instantiate the builder and build the AEA
# By default, the default protocol, error skill and stub connection are added
Expand Down
Loading

0 comments on commit d3f177a

Please sign in to comment.