Skip to content

Commit

Permalink
Merge pull request #1996 from fetchai/develop
Browse files Browse the repository at this point in the history
Release v0.7.5
  • Loading branch information
DavidMinarsch authored Nov 25, 2020
2 parents e888b4c + 45808f0 commit fb4b6db
Show file tree
Hide file tree
Showing 252 changed files with 27,753 additions and 812 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python_version: [3.6, 3.7, 3.8, 3.9]
timeout-minutes: 40
timeout-minutes: 50
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ output_file

!packages/fetchai/contracts/erc1155/build
!packages/fetchai/contracts/staking_erc20/build
!packages/fetchai/contracts/oracle/build
packages/fetchai/connections/p2p_libp2p/libp2p_node

!tests/data/dummy_contract/build
13 changes: 13 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release History

## 0.7.5 (2020-11-25)

- Adds AW3 AEAs
- Adds basic oracle skills and contracts
- Replaces usage of Ropsten testnet with Ganache in packages
- Fixes multiplexer setup when used outside AEA
- Improves help command output of CLI
- Adds integration tests for simple skills
- Adds version check on CLI push
- Adds integration tests for tac negotiation skills
- Multiple docs updates based on user feedback
- Multiple additional tests and test stability fixes

## 0.7.4 (2020-11-18)

- Replaces error skill handler usage with built in handler
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ common_checks: security misc_checks lint static docs

.PHONY: test
test:
pytest -rfE --doctest-modules aea packages/fetchai/protocols packages/fetchai/connections packages/fetchai/skills/generic_buyer packages/fetchai/skills/generic_seller packages/fetchai/skills/tac_control packages/fetchai/skills/tac_control_contract packages/fetchai/skills/tac_participation tests/ --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov=aea --cov=packages/fetchai/protocols --cov=packages/fetchai/connections --cov=packages/fetchai/skills/generic_buyer --cov=packages/fetchai/skills/generic_seller --cov=packages/fetchai/skills/tac_control --cov=packages/fetchai/skills/tac_control_contract --cov=packages/fetchai/skills/tac_participation --cov-config=.coveragerc
pytest -rfE --doctest-modules aea packages/fetchai/protocols packages/fetchai/connections packages/fetchai/skills/generic_buyer packages/fetchai/skills/generic_seller packages/fetchai/skills/tac_control packages/fetchai/skills/tac_control_contract packages/fetchai/skills/tac_participation packages/fetchai/skills/tac_negotiation packages/fetchai/skills/simple_buyer packages/fetchai/skills/simple_data_request packages/fetchai/skills/simple_seller packages/fetchai/skills/simple_service_registration packages/fetchai/skills/simple_service_search tests/ --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov=aea --cov=packages/fetchai/protocols --cov=packages/fetchai/connections --cov=packages/fetchai/skills/generic_buyer --cov=packages/fetchai/skills/generic_seller --cov=packages/fetchai/skills/tac_control --cov=packages/fetchai/skills/tac_control_contract --cov=packages/fetchai/skills/tac_participation --cov=packages/fetchai/skills/tac_negotiation --cov=packages/fetchai/skills/simple_buyer --cov=packages/fetchai/skills/simple_data_request --cov=packages/fetchai/skills/simple_seller --cov=packages/fetchai/skills/simple_service_registration --cov=packages/fetchai/skills/simple_service_search --cov-config=.coveragerc
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;

.PHONY: test-sub
test-sub:
pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills/generic_buyer packages/fetchai/skills/generic_seller packages/fetchai/skills/tac_control packages/fetchai/skills/tac_control_contract packages/fetchai/skills/tac_participation tests/test_$(tdir) --cov=aea.$(dir) --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov-config=.coveragerc
pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills/generic_buyer packages/fetchai/skills/generic_seller packages/fetchai/skills/tac_control packages/fetchai/skills/tac_control_contract packages/fetchai/skills/tac_participation packages/fetchai/skills/tac_negotiation tests/test_$(tdir) --cov=aea.$(dir) --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov-config=.coveragerc
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;

.PHONY: test-sub-p
test-sub-p:
pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills/generic_buyer packages/fetchai/skills/generic_seller packages/fetchai/skills/tac_control packages/fetchai/skills/tac_control_contract packages/fetchai/skills/tac_participation tests/test_packages/test_$(tdir) --cov=packages.fetchai.$(dir) --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov-config=.coveragerc
pytest -rfE --doctest-modules aea packages/fetchai/connections packages/fetchai/protocols packages/fetchai/skills/generic_buyer packages/fetchai/skills/generic_seller packages/fetchai/skills/tac_control packages/fetchai/skills/tac_control_contract packages/fetchai/skills/tac_participation packages/fetchai/skills/tac_negotiation packages/fetchai/skills/simple_buyer packages/fetchai/skills/simple_data_request packages/fetchai/skills/simple_seller packages/fetchai/skills/simple_service_registration packages/fetchai/skills/simple_service_search tests/test_packages/test_$(tdir) --cov=packages.fetchai.$(dir) --cov-report=html --cov-report=xml --cov-report=term-missing --cov-report=term --cov-config=.coveragerc
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;


Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ A framework for autonomous economic agent (AEA) development
</a>
</p>

## Alternatively: Use Pipx (CLI usage only)

1. Install [PipX](https://github.com/pipxproject/pipx)

2. Install the package from [PyPI](https://pypi.org/project/aea/):

pipx install aea[all]

3. Run aea cli e.g.:

aea --help

## Alternatively: Install from Source

This approach is not recommended!
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.7.4"
__version__ = "0.7.5"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
6 changes: 3 additions & 3 deletions aea/cli/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
@click.pass_context
@check_aea_project
def add(click_context, local, remote):
"""Add a resource to the agent."""
"""Add a package to the agent."""
ctx = cast(Context, click_context.obj)
ctx.set_config("is_local", local and not remote)
ctx.set_config("is_mixed", not local and not remote)
Expand All @@ -59,15 +59,15 @@ def add(click_context, local, remote):
@click.argument("connection_public_id", type=PublicIdParameter(), required=True)
@pass_ctx
def connection(ctx: Context, connection_public_id: PublicId):
"""Add a connection to the configuration file."""
"""Add a connection to the agent."""
add_item(ctx, CONNECTION, connection_public_id)


@add.command()
@click.argument("contract_public_id", type=PublicIdParameter(), required=True)
@pass_ctx
def contract(ctx: Context, contract_public_id: PublicId):
"""Add a contract to the configuration file."""
"""Add a contract to the agent."""
add_item(ctx, CONTRACT, contract_public_id)


Expand Down
2 changes: 1 addition & 1 deletion aea/cli/add_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
@click.pass_context
@check_aea_project
def add_key(click_context, type_, file, connection):
"""Add a private key to the wallet."""
"""Add a private key to the wallet of the agent."""
_add_private_key(click_context, type_, file, connection)


Expand Down
2 changes: 1 addition & 1 deletion aea/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
@click.pass_context
@check_aea_project
def config(click_context): # pylint: disable=unused-argument
"""Read or modify a configuration."""
"""Read or modify a configuration of the agent."""


@config.command()
Expand Down
4 changes: 2 additions & 2 deletions aea/cli/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@
is_flag=True,
required=False,
default=False,
help="Skip consistency check.",
help="Skip consistency checks.",
)
@click.pass_context
def cli(click_context, skip_consistency_check: bool) -> None:
"""Command-line tool for setting up an Autonomous Economic Agent."""
"""Command-line tool for setting up an Autonomous Economic Agent (AEA)."""
verbosity_option = click_context.meta.pop("verbosity")
click_context.obj = Context(cwd=".", verbosity=verbosity_option)
click_context.obj.set_config("skip_consistency_check", skip_consistency_check)
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def create(
local: bool,
empty: bool,
):
"""Create an agent."""
"""Create a new agent."""
ctx = cast(Context, click_context.obj)
create_aea(ctx, agent_name, local, author=author, empty=empty)

Expand Down
10 changes: 5 additions & 5 deletions aea/cli/eject.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
@click.pass_context
@check_aea_project
def eject(click_context: click.core.Context, quiet: bool, with_symlinks: bool):
"""Eject an installed item."""
"""Eject a vendor package of the agent."""
click_context.obj.set_config("quiet", quiet)
click_context.obj.set_config("with_symlinks", with_symlinks)
set_cli_author(click_context)
Expand All @@ -90,7 +90,7 @@ def eject(click_context: click.core.Context, quiet: bool, with_symlinks: bool):
@click.argument("public_id", type=PublicIdParameter(), required=True)
@pass_ctx
def connection(ctx: Context, public_id: PublicId):
"""Eject an installed connection."""
"""Eject a vendor connection."""
quiet = ctx.config.get("quiet")
with_symlinks = ctx.config.get("with_symlinks")
_eject_item(ctx, CONNECTION, public_id, quiet=quiet, with_symlinks=with_symlinks)
Expand All @@ -100,7 +100,7 @@ def connection(ctx: Context, public_id: PublicId):
@click.argument("public_id", type=PublicIdParameter(), required=True)
@pass_ctx
def contract(ctx: Context, public_id: PublicId):
"""Eject an installed contract."""
"""Eject a vendor contract."""
quiet = ctx.config.get("quiet")
with_symlinks = ctx.config.get("with_symlinks")
_eject_item(ctx, CONTRACT, public_id, quiet=quiet, with_symlinks=with_symlinks)
Expand All @@ -110,7 +110,7 @@ def contract(ctx: Context, public_id: PublicId):
@click.argument("public_id", type=PublicIdParameter(), required=True)
@pass_ctx
def protocol(ctx: Context, public_id: PublicId):
"""Eject an installed protocol."""
"""Eject a vendor protocol."""
quiet = ctx.config.get("quiet")
with_symlinks = ctx.config.get("with_symlinks")
_eject_item(ctx, PROTOCOL, public_id, quiet=quiet, with_symlinks=with_symlinks)
Expand All @@ -120,7 +120,7 @@ def protocol(ctx: Context, public_id: PublicId):
@click.argument("public_id", type=PublicIdParameter(), required=True)
@pass_ctx
def skill(ctx: Context, public_id: PublicId):
"""Eject an installed skill."""
"""Eject a vendor skill."""
quiet = ctx.config.get("quiet")
with_symlinks = ctx.config.get("with_symlinks")
_eject_item(ctx, SKILL, public_id, quiet=quiet, with_symlinks=with_symlinks)
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
@click.argument("public-id", type=PublicIdParameter(), required=True)
@click.pass_context
def fetch(click_context, public_id, alias, local, remote):
"""Fetch Agent from Registry."""
"""Fetch an agent from the registry."""
ctx = cast(Context, click_context.obj)
is_mixed = not local and not remote
ctx.set_config("is_local", local and not remote)
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
@click.group()
@click.pass_context
def fingerprint(click_context: click.core.Context): # pylint: disable=unused-argument
"""Fingerprint a resource."""
"""Fingerprint a non-vendor package of the agent."""


@fingerprint.command()
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@click.pass_context
@check_aea_project
def freeze(click_context):
"""Get the dependencies."""
"""Get the dependencies of the agent."""
deps = _get_deps(click_context)
for dependency in deps:
click.echo(dependency)
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@click.pass_context
@check_aea_project
def generate(click_context: click.core.Context): # pylint: disable=unused-argument
"""Generate a resource for the agent."""
"""Generate a package for the agent."""


@generate.command()
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/generate_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
required=False,
)
def generate_key(type_, file):
"""Generate private keys."""
"""Generate a private key and place it in a file."""
_generate_private_key(type_, file)


Expand Down
2 changes: 1 addition & 1 deletion aea/cli/generate_wealth.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@click.pass_context
@check_aea_project
def generate_wealth(click_context, sync, type_):
"""Generate wealth for address on test network."""
"""Generate wealth for the agent on a test network."""
ctx = cast(Context, click_context.obj)
_try_generate_wealth(ctx, type_, sync)

Expand Down
2 changes: 1 addition & 1 deletion aea/cli/get_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@click.pass_context
@check_aea_project
def get_address(click_context, type_):
"""Get the address associated with the private key."""
"""Get the address associated with a private key of the agent."""
ctx = cast(Context, click_context.obj)
address = _try_get_address(ctx, type_)
click.echo(address)
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/get_multiaddress.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_multiaddress(
port_field: str,
uri_field: str,
):
"""Get the multiaddress associated with a private key or connection."""
"""Get the multiaddress associated with a private key or connection of the agent."""
address = _try_get_multiaddress(
click_context,
ledger_id,
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/get_wealth.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@click.pass_context
@check_aea_project
def get_wealth(click_context, type_):
"""Get the wealth associated with the private key."""
"""Get the wealth associated with the private key of the agent."""
ctx = cast(Context, click_context.obj)
wealth = _try_get_wealth(ctx, type_)
click.echo(wealth)
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
@click.pass_context
@check_aea_project
def install(click_context, requirement: Optional[str]):
"""Install the dependencies."""
"""Install the dependencies of the agent."""
ctx = cast(Context, click_context.obj)
do_install(ctx, requirement)

Expand Down
2 changes: 1 addition & 1 deletion aea/cli/interact.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
@click.pass_context
@check_aea_project
def interact(click_context: click.core.Context): # pylint: disable=unused-argument
"""Interact with a running AEA via the stub connection."""
"""Interact with the running agent via the stub connection."""
click.echo("Starting AEA interaction channel...")
_run_interaction_channel()

Expand Down
4 changes: 2 additions & 2 deletions aea/cli/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
@click.pass_context
@check_aea_project
def list_command(click_context): # pylint: disable=unused-argument
"""List the installed resources."""
"""List the installed packages of the agent."""


@list_command.command(name="all")
@pass_ctx
def all_command(ctx: Context):
"""List all the installed items."""
"""List all the installed packages."""
for item_type in ITEM_TYPES:
details = list_agent_items(ctx, item_type)
if not details:
Expand Down
6 changes: 3 additions & 3 deletions aea/cli/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
from aea.cli.utils.config import update_cli_config


@click.command(name="login", help="Login to Registry account.")
@click.command(name="login", help="Login to the registry account.")
@click.argument("username", type=str, required=True)
@click.option("--password", type=str, required=True, prompt=True, hide_input=True)
def login(username, password):
"""Login to Registry account."""
"""Login to the registry account."""
do_login(username, password)


def do_login(username: str, password: str):
"""
Login to Registry account and save auth token in config.
Login to the registry account and save auth token in config.
:param username: str username.
:param password: str password.
Expand Down
4 changes: 2 additions & 2 deletions aea/cli/logout.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
from aea.cli.utils.config import update_cli_config


@click.command(name="logout", help="Logout from Registry account.")
@click.command(name="logout", help="Logout from the registry account.")
def logout():
"""Logout from Registry account command."""
"""Logout from the registry account."""
click.echo("Logging out...")
do_logout()
click.echo("Successfully logged out.")
Expand Down
2 changes: 1 addition & 1 deletion aea/cli/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
@click.pass_context
@check_aea_project
def publish(click_context, local, remote): # pylint: disable=unused-argument
"""Publish Agent to Registry."""
"""Publish the agent to the registry."""
ctx = cast(Context, click_context.obj)
_validate_pkp(ctx.agent_config.private_key_paths)
_validate_config(ctx)
Expand Down
Loading

0 comments on commit fb4b6db

Please sign in to comment.