Skip to content

Commit

Permalink
Merge pull request #946 from fetchai/feature/release_v0.2.3
Browse files Browse the repository at this point in the history
prepare develop for v0.2.3
  • Loading branch information
DavidMinarsch authored Mar 19, 2020
2 parents d57b7cf + ad95f2a commit 0404c8d
Show file tree
Hide file tree
Showing 45 changed files with 823 additions and 811 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ This is the official list of Fetch.AI authors for copyright purposes.
* Aristotelis Triantafyllidis <aristotelis.triantafyllidis@fetch.ai> [Totoual](https://github.com/Totoual)
* Diarmid Campbell <diarmid.campbell@fetch.ai> [dishmop](https://github.com/dishmop)
* Oleg Panasevych <oleg.panasevych@n-cube.co.uk> [Panasevychol](https://github.com/panasevychol)
* Kevin Chen <kevin.chen@fetch.ai> [Kevin-Chen0](https://github.com/Kevin-Chen0)
11 changes: 11 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Release History

## 0.2.3 (2020-03-19)

- Fixes stub connection file I/O
- Fixes OEF connection teardown
- Fixes CLI GUI subprocesses issues
- Improves skill guide by adding a service provider agent
- Protocol generator bug fixes
- Add aea_version field to package yaml files for version management
- Multiple docs updates and restructuring
- Multiple additional minor fixes and changes

## 0.2.2 (2020-03-09)

- Fixes registry to only load registered packages
Expand Down
12 changes: 6 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ bandit = "==1.6.2"
black = "==19.10b0"
bs4 = "==0.0.1"
colorlog = "==4.1.0"
docker = "==4.2.0"
fetch-p2p-api = {index = "https://test.pypi.org/simple/",version = "==0.0.2"}
flake8 = "==3.7.9"
flake8-bugbear = "==20.1.4"
flake8-docstrings = "==1.5.0"
flake8-import-order = "==0.18.1"
gym = "==0.15.6"
liccheck = "==0.4.0"
markdown = ">=3.2.1"
mkdocs = "==1.1"
mkdocs-material = "==4.6.3"
mkdocs-mermaid-plugin = {git = "https://github.com/pugong/mkdocs-mermaid-plugin.git"}
mypy = "==0.761"
numpy = "==1.18.1"
oef = "==0.8.1"
Expand All @@ -32,13 +36,9 @@ pymdown-extensions = "==6.3"
pytest = "==5.3.5"
pytest-asyncio = "==0.10.0"
pytest-cov = "==2.8.1"
tox = "==3.14.5"
safety = "==1.8.5"
liccheck = "==0.4.0"
docker = "*"
mkdocs-mermaid-plugin = {git = "https://github.com/pugong/mkdocs-mermaid-plugin.git"}
markdown = ">=3.2.1"
pytest-randomly = "==3.2.1"
safety = "==1.8.5"
tox = "==3.14.5"

[packages]
# we don't specify dependencies for the library here for intallation as per: https://pipenv-fork.readthedocs.io/en/latest/advanced.html#pipfile-vs-setuppy
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__ = "0.2.2"
__version__ = "0.2.3"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
69 changes: 37 additions & 32 deletions aea/protocols/default/default_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 46 additions & 20 deletions aea/protocols/default/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,36 @@ def _is_consistent(self) -> bool:
try:
assert (
type(self.dialogue_reference) == tuple
), "dialogue_reference must be 'tuple' but it is not."
), "Invalid type for 'dialogue_reference'. Expected 'tuple'. Found '{}'.".format(
type(self.dialogue_reference)
)
assert (
type(self.dialogue_reference[0]) == str
), "The first element of dialogue_reference must be 'str' but it is not."
), "Invalid type for 'dialogue_reference[0]'. Expected 'str'. Found '{}'.".format(
type(self.dialogue_reference[0])
)
assert (
type(self.dialogue_reference[1]) == str
), "The second element of dialogue_reference must be 'str' but it is not."
assert type(self.message_id) == int, "message_id is not int"
assert type(self.target) == int, "target is not int"
), "Invalid type for 'dialogue_reference[1]'. Expected 'str'. Found '{}'.".format(
type(self.dialogue_reference[1])
)
assert (
type(self.message_id) == int
), "Invalid type for 'message_id'. Expected 'int'. Found '{}'.".format(
type(self.message_id)
)
assert (
type(self.target) == int
), "Invalid type for 'target'. Expected 'int'. Found '{}'.".format(
type(self.target)
)

# Light Protocol Rule 2
# Check correct performative
assert (
type(self.performative) == DefaultMessage.Performative
), "'{}' is not in the list of valid performatives: {}".format(
self.performative, self.valid_performatives
), "Invalid 'performative'. Expected either of '{}'. Found '{}'.".format(
self.valid_performatives, self.performative
)

# Check correct contents
Expand All @@ -157,45 +171,57 @@ def _is_consistent(self) -> bool:
expected_nb_of_contents = 1
assert (
type(self.content) == bytes
), "Content 'content' is not of type 'bytes'."
), "Invalid type for content 'content'. Expected 'bytes'. Found '{}'.".format(
type(self.content)
)
elif self.performative == DefaultMessage.Performative.ERROR:
expected_nb_of_contents = 3
assert (
type(self.error_code) == CustomErrorCode
), "Content 'error_code' is not of type 'ErrorCode'."
), "Invalid type for content 'error_code'. Expected 'ErrorCode'. Found '{}'.".format(
type(self.error_code)
)
assert (
type(self.error_msg) == str
), "Content 'error_msg' is not of type 'str'."
), "Invalid type for content 'error_msg'. Expected 'str'. Found '{}'.".format(
type(self.error_msg)
)
assert (
type(self.error_data) == dict
), "Content 'error_data' is not of type 'dict'."
for key, value in self.error_data.items():
), "Invalid type for content 'error_data'. Expected 'dict'. Found '{}'.".format(
type(self.error_data)
)
for key_of_error_data, value_of_error_data in self.error_data.items():
assert (
type(key) == str
), "Keys of 'error_data' dictionary are not of type 'str'."
type(key_of_error_data) == str
), "Invalid type for dictionary keys in content 'error_data'. Expected 'str'. Found '{}'.".format(
type(key_of_error_data)
)
assert (
type(value) == bytes
), "Values of 'error_data' dictionary are not of type 'bytes'."
type(value_of_error_data) == bytes
), "Invalid type for dictionary values in content 'error_data'. Expected 'bytes'. Found '{}'.".format(
type(value_of_error_data)
)

# Check correct content count
assert (
expected_nb_of_contents == actual_nb_of_contents
), "Incorrect number of contents. Expected {} contents. Found {}".format(
), "Incorrect number of contents. Expected {}. Found {}".format(
expected_nb_of_contents, actual_nb_of_contents
)

# Light Protocol Rule 3
if self.message_id == 1:
assert (
self.target == 0
), "Expected target to be 0 when message_id is 1. Found {}.".format(
), "Invalid 'target'. Expected 0 (because 'message_id' is 1). Found {}.".format(
self.target
)
else:
assert (
0 < self.target < self.message_id
), "Expected target to be between 1 to (message_id -1) inclusive. Found {}".format(
self.target
), "Invalid 'target'. Expected an integer between 1 and {} inclusive. Found {}.".format(
self.message_id - 1, self.target,
)
except (AssertionError, ValueError, KeyError) as e:
print(str(e))
Expand Down
2 changes: 1 addition & 1 deletion deploy-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=aea-deploy:0.2.2
DOCKER_IMAGE_TAG=aea-deploy:0.2.3
# DOCKER_IMAGE_TAG=aea-deploy:latest

DOCKER_BUILD_CONTEXT_DIR=..
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=aea-develop:0.2.2
DOCKER_IMAGE_TAG=aea-develop:0.2.3
# DOCKER_IMAGE_TAG=aea-develop:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
17 changes: 8 additions & 9 deletions docs/car-park-skills.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
The AEA car-park skills demonstrate an interaction between two AEAs.

* The carpark_detection AEA provides information on the number of car parking spaces available in a given vicinity.
* The carpark_client AEA is interested in purchasing information on available car parking spaces in the same vicinity.
* The `carpark_detection` AEA provides information on the number of car parking spaces available in a given vicinity.
* The `carpark_client` AEA is interested in purchasing information on available car parking spaces in the same vicinity.

## Preparation instructions

### Dependencies

Follow the <a href="../quickstart/#preliminaries">Preliminaries</a> and <a href="../quickstart/#installation">Installation</a> sections from the AEA quick start.

##Discussion
### Discussion
The full Fetch.ai car park AEA demo is documented in its own repo [here](https://github.com/fetchai/carpark_agent).
This demo allows you to test the AEA functionality of the car park AEA demo without the detection logic.

It demonstrates how the AEAs trade car park information.

## Preparation instructions

### Dependencies

Follow the <a href="../quickstart/#preliminaries">Preliminaries</a> and <a href="../quickstart/#installation">Installation</a> sections from the AEA quick start.

### Launch the OEF

Expand Down
2 changes: 1 addition & 1 deletion docs/connect-a-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ the two options we are going to discuss.
## Case 1
The first option we have is to create a `Connection` that will handle the incoming requests from the rest API. In this scenario,
the rest API communicates with the AEA and requests are handled by the HTTP Connection package.
The rest API should send CRUD requests to the HTTP Connection which translates these into Envelopes to be consumed by the correct skill.
The rest API should send CRUD requests to the `HTTP` Connection which translates these into Envelopes to be consumed by the correct skill.

## Case 2
The other option would be to create a stand-alone `Multiplexer` with an `OEF` connection.In this scenario, the frontend needs to incorporate a Multiplexer with an OEF connection.
Expand Down
Loading

0 comments on commit 0404c8d

Please sign in to comment.