Skip to content

Commit fb077f9

Browse files
authored
Merge pull request #2808 from fetchai/develop
release 1.2.3
2 parents 813bd60 + 65c9509 commit fb077f9

File tree

592 files changed

+11083
-12994
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

592 files changed

+11083
-12994
lines changed

.github/workflows/workflow.yml

Lines changed: 287 additions & 300 deletions
Large diffs are not rendered by default.

.pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ignore-patterns=__main__.py,.*_pb2.py,tac.sh,tac_local.sh
33

44
[MESSAGES CONTROL]
5-
disable=C0103,C0201,C0301,C0302,W0105,W0707,W1202,W1203,R0801
5+
disable=C0103,C0201,C0301,C0302,W0105,W0707,W1202,W1203,R0801,C0209,R1735
66

77
# See here for more options: https://www.codeac.io/documentation/pylint-configuration.html
88
## Eventually resolve these:
@@ -19,6 +19,8 @@ disable=C0103,C0201,C0301,C0302,W0105,W0707,W1202,W1203,R0801
1919
# C0302: http://pylint-messages.wikidot.com/messages:c0302 > Too many lines in module (%s) , # kept as no harm
2020
# W0105: pointless-string-statement, # kept as no harm
2121
# R0801: similar lines, # too granular
22+
# C0209: Formatting a regular string which could be a f-string (consider-using-f-string) # to many usage atm
23+
# R1735: Consider using {} instead of dict() (use-dict-literal)
2224

2325
[IMPORTS]
2426
ignored-modules=bech32,ecdsa,lru,eth_typing,eth_keys,eth_account,ipfshttpclient,werkzeug,openapi_spec_validator,aiohttp,multidict,yoti_python_sdk,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,web3,aioprometheus,pyaes,Crypto,asn1crypto,cosmpy,google

HISTORY.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
# Release History
22

33

4-
## 1.2.1 (2022-10-17)
4+
## 1.2.3(2022-11-03)
5+
6+
AEA:
7+
- core and development are dependencies updated.
8+
- ci improvements
9+
- cosmpy updated to 0.6.0
10+
- Small code format improvements and better linting
11+
12+
Plugins:
13+
- Small code format improvements
14+
- cosmpy updated to 0.6.0
15+
16+
Packages:
17+
- Small code format improvements
18+
19+
## 1.2.2 (2022-10-17)
520

621
AEA:
722
- Dependency management switched from pipenv to poetry.

aea/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
__title__ = "aea"
2323
__description__ = "Autonomous Economic Agent framework"
2424
__url__ = "https://github.com/fetchai/agents-aea.git"
25-
__version__ = "1.2.2"
25+
__version__ = "1.2.3"
2626
__author__ = "Fetch.AI Limited"
2727
__license__ = "Apache-2.0"
2828
__copyright__ = "2022 Fetch.AI Limited"

aea/abstract_agent.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# ------------------------------------------------------------------------------
1919
"""This module contains the interface definition of the abstract agent."""
2020
import datetime
21-
from abc import ABC, abstractmethod, abstractproperty
21+
from abc import ABC, abstractmethod
2222
from typing import Any, Callable, Dict, List, Optional, Tuple
2323

2424
from aea.mail.base import Envelope
@@ -27,11 +27,13 @@
2727
class AbstractAgent(ABC):
2828
"""This class provides an abstract base interface for an agent."""
2929

30-
@abstractproperty
30+
@property
31+
@abstractmethod
3132
def name(self) -> str:
3233
"""Get agent's name."""
3334

34-
@abstractproperty
35+
@property
36+
@abstractmethod
3537
def storage_uri(self) -> Optional[str]:
3638
"""Return storage uri."""
3739

aea/aea_builder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,11 @@ def _reset(self, is_full_reset: bool = False) -> None:
415415

416416
def _remove_components_from_dependency_manager(self) -> None:
417417
"""Remove components added via 'add_component' from the dependency manager."""
418-
for component_type in self._component_instances.keys():
418+
for (
419+
component_type
420+
) in (
421+
self._component_instances.keys()
422+
): # pylint: disable=consider-using-dict-items
419423
for component_config in self._component_instances[component_type].keys():
420424
self._package_dependency_manager.remove_component(
421425
component_config.component_id

aea/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def start(self) -> None:
215215

216216
if was_started:
217217
self.runtime.wait_completed(sync=True)
218-
else: #  pragma: nocover
218+
else: # pragma: nocover
219219
raise AEAException("Failed to start runtime! Was it already started?")
220220

221221
def handle_envelope(self, envelope: Envelope) -> None:

aea/agent_loop.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ def set_loop(self, loop: AbstractEventLoop) -> None:
110110
"""Set event loop and all event loop related objects."""
111111
self._loop: AbstractEventLoop = loop
112112

113-
def _setup(self) -> None: # pylint: disable=no-self-use
113+
def _setup(self) -> None:
114114
"""Set up agent loop before started."""
115115
# start and stop methods are classmethods cause one instance shared across multiple threads
116116
ExecTimeoutThreadGuard.start()
117117

118-
def _teardown(self) -> None: # pylint: disable=no-self-use
118+
def _teardown(self) -> None:
119119
"""Tear down loop on stop."""
120120
# start and stop methods are classmethods cause one instance shared across multiple threads
121121
ExecTimeoutThreadGuard.stop()
@@ -295,10 +295,11 @@ def _execution_control(
295295
if self.agent.exception_handler(e, fn) is True:
296296
self._state.set(AgentLoopStates.error)
297297
raise
298-
except Exception as e:
298+
except Exception as e2:
299299
self._state.set(AgentLoopStates.error)
300-
self._exceptions.append(e)
300+
self._exceptions.append(e2)
301301
raise
302+
return None
302303

303304
def _register_periodic_task(
304305
self,

aea/cli/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get(ctx: Context, json_path: str) -> None:
4949
agent_config_manager = AgentConfigManager.load(ctx.cwd)
5050
value = agent_config_manager.get_variable(json_path)
5151
except (ValueError, AEAException) as e:
52-
raise ClickException(*e.args)
52+
raise ClickException(str(e.args[0]))
5353

5454
if isinstance(value, dict):
5555
# turn it to json compatible string, not dict str representation
@@ -101,4 +101,4 @@ def set_command(
101101
except ExtraPropertiesError as e: # pragma: nocover
102102
raise ClickException(f"Attribute `{e.args[0][0]}` is not allowed to change!")
103103
except (ValueError, AEAException) as e:
104-
raise ClickException(*e.args)
104+
raise ClickException(str(e.args[0]))

aea/cli/fetch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# ------------------------------------------------------------------------------
1919
"""Implementation of the 'aea fetch' subcommand."""
2020
import os
21-
from distutils.dir_util import copy_tree
2221
from pathlib import Path
22+
from shutil import copytree as copy_tree
2323
from typing import Optional, cast
2424

2525
import click
@@ -169,7 +169,7 @@ def fetch_agent_locally(
169169
os.makedirs(target_path) # pragma: nocover
170170

171171
ctx.clean_paths.append(target_path)
172-
copy_tree(source_path, target_path)
172+
copy_tree(source_path, target_path, dirs_exist_ok=True) # type: ignore
173173

174174
ctx.cwd = target_path
175175
try_to_load_agent_config(ctx)

0 commit comments

Comments
 (0)