Skip to content

Commit

Permalink
Merge pull request #1337 from fetchai/develop
Browse files Browse the repository at this point in the history
Release v0.4.0
  • Loading branch information
DavidMinarsch authored Jun 8, 2020
2 parents 6636dec + 93678ca commit 34d6a1c
Show file tree
Hide file tree
Showing 522 changed files with 13,907 additions and 9,691 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
run: |
tox -e black-check
tox -e flake8
tox -e pylint
- name: Static type check
run: tox -e mypy
- name: Check package versions in documentation
Expand Down Expand Up @@ -171,4 +172,4 @@ jobs:
flags: unittests
name: codecov-umbrella
yml: ./codecov.yml
fail_ci_if_error: true
fail_ci_if_error: false
26 changes: 26 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[MASTER]
ignore-patterns=serialization.py,message.py,__main__.py,.*_pb2.py,launch.py

[MESSAGES CONTROL]
disable=C0103,C0201,C0330,C0301,C0302,W1202,W1203,W0511,R,W
# Remove eventually
# general R, W
# In particular, resolve these and other important warnings:
# W0703: broad-except
# W0212: protected-access
# W0706: try-except-raise
# W0108: unnecessary-lambda

## keep the following:
# C0103: invalid-name
# C0201: consider-iterating-dictionary
# C0330: Wrong haning indentation
# http://pylint-messages.wikidot.com/messages:c0301 > Line too long (%s/%s)
# http://pylint-messages.wikidot.com/messages:c0302 > Too many lines in module (%s)
# W1202: logging-format-interpolation
# W1203: logging-fstring-interpolation
# W0511: fixme
# W0107: unnecessary-pass

[IMPORTS]
ignored-modules=aiohttp,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3
25 changes: 25 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Release History

## 0.4.0 (2020-06-08)

- Updates message handling in skills
- Replaces serializer implementation; all serialization is now performed framework side
- Updates all skills for compatibility with new message handling
- Updates all protocols and protocol generator
- Updates package loading mechnanism
- Adds p2p_libp2p_client connection
- Fixes CLI bugs and refactors CLI
- Adds eject command to CLI
- Exposes identity and connection cryptos to all connections
- Updates connection loading mechanism
- Updates all connections for compatibility with new loading mechanism
- Extracts multiplexer into its own module
- Implements list all CLI command
- Updates wallet to split into several crypto stores
- Refactors component registry and resources
- Extends soef connection functionality
- Implements AEABuilder reentrancy
- Updates p2p_libp2p connection
- Adds support for configurable runtime
- Refactors documentation
- Multiple docs updates
- Multiple test stability fixes

## 0.3.3 (2020-05-24)

- Adds option to pass ledger apis to aea builder
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ lint:
black aea benchmark examples packages scripts tests
flake8 aea benchmark examples packages scripts tests

.PHONY: pylint
pylint:
pylint aea benchmark examples packages scripts

.PHONY: security
security:
bandit -s B101 -r aea benchmark examples packages scripts tests
Expand Down Expand Up @@ -121,4 +125,5 @@ new_env: clean
.PHONY: install_env
install_env:
pipenv install --dev --skip-lock
pip uninstall typing -y
pip install -e .[all]
11 changes: 7 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ openapi-spec-validator = "==0.2.8"
pexpect = "==4.8.0"
psutil = "==5.7.0"
pydocstyle = "==3.0.0"
pydoc-markdown = "==3.1.0"
pygments = "==2.5.2"
pylint = "==2.5.2"
pymdown-extensions = "==6.3"
pynacl = "==1.3.0"
pytest = "==5.3.5"
pytest-asyncio = "==0.10.0"
pytest-cov = "==2.8.1"
pytest-randomly = "==3.2.1"
pytest = "==5.4.3"
pytest-asyncio = "==0.12.0"
pytest-cov = "==2.9.0"
pytest-randomly = "==3.4.0"
pytest-rerunfailures = "==9.0"
requests = ">=2.22.0"
safety = "==1.8.5"
tox = "==3.15.1"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The following steps are **only relevant if you intend to contribute** to the rep
- To run linters (code style checks):

tox -e flake8
tox -e pylint

- To run static type checks:

Expand Down
4 changes: 2 additions & 2 deletions aea/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#
# ------------------------------------------------------------------------------

"""Specifies the version of the TAC package."""
"""Specifies the version of the AEA package."""

__title__ = "aea"
__description__ = "Autonomous Economic Agent framework"
__url__ = "https://github.com/fetchai/agents-aea.git"
__version__ = "0.3.3"
__version__ = "0.4.0"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
10 changes: 9 additions & 1 deletion aea/aea.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def __init__(
] = DefaultDecisionMakerHandler,
skill_exception_policy: ExceptionPolicyEnum = ExceptionPolicyEnum.propagate,
loop_mode: Optional[str] = None,
runtime_mode: Optional[str] = None,
**kwargs,
) -> None:
"""
Expand All @@ -92,6 +93,7 @@ def __init__(
:param decision_maker_handler_class: the class implementing the decision maker handler to be used.
:param skill_exception_policy: the skill exception policy enum
:param loop_mode: loop_mode to choose agent run loop.
:param runtime_mode: runtime mode (async, threaded) to run AEA in.
:param kwargs: keyword arguments to be attached in the agent context namespace.
:return: None
Expand All @@ -103,6 +105,7 @@ def __init__(
timeout=timeout,
is_debug=is_debug,
loop_mode=loop_mode,
runtime_mode=runtime_mode,
)

self.max_reactions = max_reactions
Expand Down Expand Up @@ -239,7 +242,10 @@ def _handle(self, envelope: Envelope) -> None:
return

try:
msg = protocol.serializer.decode(envelope.message)
if isinstance(envelope.message, Message):
msg = envelope.message
else:
msg = protocol.serializer.decode(envelope.message)
msg.counterparty = envelope.sender
msg.is_incoming = True
except Exception as e:
Expand Down Expand Up @@ -349,6 +355,8 @@ def teardown(self) -> None:
:return: None
"""
logger.debug("[{}]: Calling teardown method...".format(self.name))
self.liveness.stop()
self.decision_maker.stop()
self.task_manager.stop()
self.resources.teardown()
Expand Down
Loading

0 comments on commit 34d6a1c

Please sign in to comment.