Skip to content

Commit

Permalink
Merge pull request #2406 from fetchai/develop
Browse files Browse the repository at this point in the history
Release v1.0.0rc1
  • Loading branch information
DavidMinarsch authored Mar 25, 2021
2 parents b717a4a + 8abb117 commit 872f7b7
Show file tree
Hide file tree
Showing 697 changed files with 10,089 additions and 5,113 deletions.
2 changes: 0 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ omit =
packages/fetchai/contracts/*
packages/fetchai/skills/aries_alice/*
packages/fetchai/skills/aries_faber/*
packages/fetchai/skills/echo/*
packages/fetchai/skills/erc1155_client/*
packages/fetchai/skills/erc1155_deploy/*
packages/fetchai/skills/gym/*
packages/fetchai/skills/http_echo/*
packages/fetchai/skills/registration_aw1/*
plugins/aea-ledger-cosmos/aea_ledger_cosmos/cosmos.py
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6]
timeout-minutes: 30
timeout-minutes: 45
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
Expand Down
15 changes: 10 additions & 5 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ignore-patterns=serialization.py,message.py,__main__.py,.*_pb2.py,tac.sh,tac_local.sh

[MESSAGES CONTROL]
disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0801
disable=C0103,C0201,C0301,C0302,W0105,W0707,W1202,W1203,R0801

# See here for more options: https://www.codeac.io/documentation/pylint-configuration.html
## Eventually resolve these:
Expand All @@ -16,13 +16,11 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0801
# C0201: consider-iterating-dictionary
# C0301: http://pylint-messages.wikidot.com/messages:c0301 > Line too long (%s/%s)
# C0302: http://pylint-messages.wikidot.com/messages:c0302 > Too many lines in module (%s)
# C0330: Wrong hanging indentation
# W0105: pointless-string-statement, # kept as no harm
# W0107: unnecessary-pass, # kept as no harm
# R0801: similar lines, # too granular

[IMPORTS]
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
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

[DESIGN]
min-public-methods=1
Expand All @@ -34,7 +32,14 @@ max-locals=31
max-statements=80
max-parents=11
max-branches=24
max-attributes=32
max-attributes=38

[REFACTORING]
max-nested-blocks=6

[SPELLING]
# uncomment to enable
# spelling-dict=en_US

# List of comma separated words that should not be checked.
spelling-ignore-words=nocover,pragma,params,multiaddress,multihash,OEF,wrt,Protobuf,protobuf,backend,coroutine,noqa,ascii,asyncio,awaitable,kwargs,multihashing,interoperable,inlining,datamodel,str,sqlite,sql,async,json,boolean,config,pytest,counterparty,Unregister,unregister,behaviours,crypto,cryptos,args,url,tx,testnet,decrypt,validator,env,jsonschema,URI,uri,entrypoint,initialise,ethereum,traceback,fetchai,apis,api,TCPSocketProtocol,instantiation,ip,Haversine,instantiation,enum,nosec,Init,init,Behaviour,className,AEA,aea,schemas,vendorized,subcommand,filesystem,workdir,ctx,yaml,representer,multiprocess,Struct,struct,Serializers,ValueType,serializer,filepath,subprocesses,Teardown,namespace,LF,maddr,profiler,cpu,myfunction,prepend,mydecorator,CLI,subprocess,ComponentId,bool,satisfiable,unsatisfiable,dicts,utils,entrypoints,prepended,coroutines,functools,ctrl,posix,stdin,Posix,tcp,AbstractServer,StreamReaderProtocol,StreamReader,cli,reraise,SafeLoader,SafeDumper,pathlib,coro,runnable,Runnable,PublicId,stdout,netloc,dest,subgraph,subdict,behaviour,Popen,Interprocess,datetime,isort,runtime,toplevel,callables,Enqueue,Kahn's,myagent,fn,cwd,disjunction,cancelled,Pythonic,pythonic,prepends,subclasses,protolint,Protolint,performatives,programmatically,behaviour's,AsyncResult,sys,enqueued,multithread,teardown,satisfiability,dep,overridables,arg,stderr,multithreading,configs,getters,getter,classmethods,enqueue,interprocess,exc,pydocstyle,linter,programme,compositional,formatter,counterparty's,endstates,EndState,AgentContext,disambiguated,prepending,dir,tarfiles,docstyle,msg,func,ComponentType,PosixNamedPipeProtocol,ungrouped,reformats,protoc,DialogueLabel,Metaclass,responder,UtilityParams,ExchangeParams,GoodHoldings,CurrencyHoldings,rb,auth,dirs,symlink,BadParameter,metavar,readme,multithreads,upgrader,src,pid,mypy,outstream,CliRunner,semver,VersionInfo,reinstantiate,pre,ItemId,serializable,repo,upgraders,addr,endstate,performative's,proto,uncomment,Deserialize,fnctl,Sym,cd,ACN,os,ok,SDK,subtypes,JS,fifos,preprocess,dst,overridable,Mixin,unregistration,multithreaded,iterable,txt,ln,py,Util,ClickException,ai,ABI,approver,deployer,trustless,wei,AppRunner,TCPSite,webhook,Webhook,Webhooks,hostname,http,ClientResponse,TLS,soef,xml,unregisters,FET,eth,nft,AbstractEventLoop,aiohttp,uris,StreamWriter,msgs,oef,watchdogging,webhooks,RequestValidator,ACA,alice,faber,RegisterDialogue,fipa,prometheus,TAC,fet,tac,CFP,GymDialogue,RL,LedgerApiDialogue,faber's,AWx,parametrized,FipaDialogue,MlTradeDialogue,carpark,blockchain,counterparties,dec,mins,Calc,vyper,SigningDialogue,modelling,ContractApiDialogue,alice's,quickfix,StateUpdateDialogue,hacky,aea's,dataset,MessageId,cfp,rl,TacDialogue,BaseFipaDialogue,von,maths,Deque,unregistering,yoti,copyable,deepcopy,multiaddresses,logfile,Vous,ipaddress,clargs,IPCChannel,MultiAddr,Rendez,gcc,aioprometheus,getattr,noop,Noop,multiagent,ttfb,rtt,mem,xaxis,superclass,docstring,execreport,benchmarked,ReportPrinter,plt,kb,num,initialised,bytecode,wasm,denom,mainnet,fp,uid,cosmwasm,Conftest,decrypted,initialisation,hmac,plaintext,aes,ipfs,unlinked,ipfshttpclient,gasstation,Ganache,hexbytes,txs,LRU
44 changes: 44 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ plugin
Fetch.AI
AEALite
Pipfile
12-factor
Disposability
disposability
ad-hoc
Nuitka
Perun
1.0.0rc1
docstrings
- docs/language-agnostic-definition.md
fetchai
protocol_id
Expand All @@ -189,3 +197,39 @@ txt
java
javascript
protoc
- docs/acn.md
p2p_libp2p_mailbox
- docs/cli-commands.md
aea
- docs/contract.md
init
code_id
init_msg
fetchai
erc1155
ContractApiMessage.Performative.GET_DEPLOY_TRANSACTION
- docs/decision-maker.md
tac_
- docs/limits.md
spec
micropython
Subprotocols
mempool
- docs/p2p-connection.md
p2p_libp2p
- docs/quickstart.md
my_first_aea
output_file
AEATestCase
test.py
aea-config
yaml
- docs/skill-guide.md
TickerBehaviour
behaviours.py
strategy.py
dialogues.py
oef_search
handlers.py
skill.yaml
packages.fetchai.skills.my_search.dialogues
25 changes: 25 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Release History

## 1.0.0rc1 (2020-03-24)

- Adds CLI command `aea get-public-key`
- Adds support for encrypting private keys at rest
- Adds support for configuration of decision maker and error handler instances from `aea-config.yaml`
- Adds support for explicitly marking behaviours and handlers as dynamic
- Adds support for fetchai ledger to oracle skills and contract
- Adds timeout support on multiplexer calls to connections
- Fixes bug in regex constrained string for id validation
- Adds docs section on how AEAs satisfy 12-factor methodology
- Adds docs section on tradeoffs made in `v1`
- Adds example for logs streaming to browser
- Removes multiple temporary hacks for backwards compatibility
- Adds skills tests coverage for `echo` and `http_echo` skills
- Adds `required_ledgers` field in `aea-config.yaml`
- Removes `registry_path` field in `aea-config.yaml`
- Adds `message_format` field to cert requests
- Removes requirement for exact protocol buffers compiler, prints version used in protocols
- Adds support to configure task manager mode via `aea-config.yaml`
- Fixed spelling across docstrings in code base
- Multiple minor fixes
- Multiple docs updates to fix order of CLI commands with respect to installing dependencies
- Multiple additional tests and test stability fixes


## 0.11.2 (2020-03-17)

- Fixes a package import issue
Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ openapi-spec-validator = "==0.2.8"
packaging = "==20.4"
pexpect = "==4.8.0"
psutil = "==5.7.0"
pyaes = ">=1.6.1"
pydoc-markdown = "==3.3.0"
pydocstyle = "==3.0.0"
pygments = "==2.5.2"
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ The following table shows which versions of `aea` are currently being supported

| Version | Supported |
| --------- | ------------------ |
| `0.11.x` | :white_check_mark: |
| `< 0.11.0` | :x: |
| `1.0.x` | :white_check_mark: |
| `< 1.0.0rc1` | :x: |

## Reporting a Vulnerability

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__ = "0.11.2"
__version__ = "1.0.0rc1"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
29 changes: 21 additions & 8 deletions aea/aea.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def __init__(
execution_timeout: float = 0,
max_reactions: int = 20,
error_handler_class: Optional[Type[AbstractErrorHandler]] = None,
error_handler_config: Optional[Dict[str, Any]] = None,
decision_maker_handler_class: Optional[Type[DecisionMakerHandler]] = None,
decision_maker_handler_config: Optional[Dict[str, Any]] = None,
skill_exception_policy: ExceptionPolicyEnum = ExceptionPolicyEnum.propagate,
connection_exception_policy: ExceptionPolicyEnum = ExceptionPolicyEnum.propagate,
loop_mode: Optional[str] = None,
Expand All @@ -92,6 +94,7 @@ def __init__(
connection_ids: Optional[Collection[PublicId]] = None,
search_service_address: str = DEFAULT_SEARCH_SERVICE_ADDRESS,
storage_uri: Optional[str] = None,
task_manager_mode: Optional[str] = None,
**kwargs: Any,
) -> None:
"""
Expand All @@ -116,7 +119,9 @@ def __init__(
:param connection_ids: active connection ids. Default: consider all the ones in the resources.
:param search_service_address: the address of the search service used.
:param storage_uri: optional uri to set generic storage
:param task_manager_mode: task manager mode (threaded) to run tasks with.
:param kwargs: keyword arguments to be attached in the agent context namespace.
:return: None
"""

Expand All @@ -138,6 +143,7 @@ def __init__(
runtime_mode=runtime_mode,
storage_uri=storage_uri,
logger=cast(Logger, aea_logger),
task_manager_mode=task_manager_mode,
)

default_routing = default_routing if default_routing is not None else {}
Expand Down Expand Up @@ -177,14 +183,18 @@ def __init__(
)

decision_maker_handler_class = DefaultDecisionMakerHandler
if decision_maker_handler_config is None:
decision_maker_handler_config = {}
decision_maker_handler = decision_maker_handler_class(
identity=identity, wallet=wallet
identity=identity, wallet=wallet, config=decision_maker_handler_config
)
self.runtime.set_decision_maker(decision_maker_handler)

if error_handler_class is None:
error_handler_class = DefaultErrorHandler
self._error_handler_class = error_handler_class
if error_handler_config is None:
error_handler_config = {}
self._error_handler = error_handler_class(**error_handler_config)
default_ledger_id = (
default_ledger
if default_ledger is not None
Expand Down Expand Up @@ -271,9 +281,9 @@ def act(self) -> None:
"""
self.filter.handle_new_handlers_and_behaviours()

def _get_error_handler(self) -> Type[AbstractErrorHandler]:
def _get_error_handler(self) -> AbstractErrorHandler:
"""Get error handler."""
return self._error_handler_class
return self._error_handler

def _get_msg_and_handlers_for_envelope(
self, envelope: Envelope
Expand All @@ -297,7 +307,7 @@ def _handle_decoding(
self,
envelope: Envelope,
protocol: Protocol,
error_handler: Type[AbstractErrorHandler],
error_handler: AbstractErrorHandler,
) -> Tuple[Optional[Message], List[Handler]]:

handlers = self.filter.get_active_handlers(
Expand Down Expand Up @@ -461,15 +471,18 @@ def get_task_result(self, task_id: int) -> AsyncResult:
return self.runtime.task_manager.get_task_result(task_id)

def enqueue_task(
self, func: Callable, args: Sequence = (), kwds: Optional[Dict[str, Any]] = None
self,
func: Callable,
args: Sequence = (),
kwargs: Optional[Dict[str, Any]] = None,
) -> int:
"""
Enqueue a task with the task manager.
:param func: the callable instance to be enqueued
:param args: the positional arguments to be passed to the function.
:param kwds: the keyword arguments to be passed to the function.
:param kwargs: the keyword arguments to be passed to the function.
:return the task id to get the the result.
:raises ValueError: if the task manager is not running.
"""
return self.runtime.task_manager.enqueue_task(func, args, kwds)
return self.runtime.task_manager.enqueue_task(func, args, kwargs)
Loading

0 comments on commit 872f7b7

Please sign in to comment.