Skip to content

Commit

Permalink
Merge pull request #2332 from fetchai/develop
Browse files Browse the repository at this point in the history
Release v0.11.0
  • Loading branch information
DavidMinarsch authored Mar 4, 2021
2 parents 4fcf900 + 6cced80 commit 06bc58b
Show file tree
Hide file tree
Showing 730 changed files with 28,004 additions and 8,831 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:

# Maintain dependencies for Pip
- package-ecosystem: "pip"
directory: "."
schedule:
interval: "weekly"
target-branch: "develop"
labels:
- "dependencies"
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Describe in short the main changes with the new release.
_Put an `x` in the boxes that apply._

- [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) doc
- [ ] I am making a pull request against the `master` branch (left side), from `develop`
- [ ] I am making a pull request against the `main` branch (left side), from `develop`
- [ ] Lint and unit tests pass locally
- [ ] I have checked the fingerprint hashes are correct by running (`scripts/generate_ipfs_hashes.py`)
- [ ] I have regenerated the latest API docs
Expand Down
45 changes: 38 additions & 7 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- develop
- master
- main
pull_request:

jobs:
Expand All @@ -26,6 +26,20 @@ jobs:
pip install pipenv
- name: Pipenv lock
run: pipenv lock
- name: Check plugin consistency
run: |
# these two files should not be different;
# we vendorize main "cosmos.py" module in fetchai crypto plugin package
diff plugins/aea-ledger-cosmos/aea_ledger_cosmos/cosmos.py plugins/aea-ledger-fetchai/aea_ledger_fetchai/_cosmos.py
# check diff between plugins' LICENSE and main LICENSE
diff LICENSE plugins/aea-ledger-cosmos/LICENSE
diff LICENSE plugins/aea-ledger-ethereum/LICENSE
diff LICENSE plugins/aea-ledger-fetchai/LICENSE
- name: Check go code consistency
run: |
# check diff between go code in libs and packages
diff libs/go/libp2p_node packages/fetchai/connections/p2p_libp2p/libp2p_node -r
common_checks_2:
continue-on-error: False
Expand Down Expand Up @@ -58,13 +72,20 @@ jobs:
run: tox -e vulture
- name: Static type check
run: tox -e mypy
- name: Golang code style check
- name: Golang code style check (libp2p_node)
uses: golangci/golangci-lint-action@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
version: v1.28
working-directory: libs/go/libp2p_node
- name: Golang code style check (aealite)
uses: golangci/golangci-lint-action@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
version: v1.28
working-directory: packages/fetchai/connections/p2p_libp2p/
working-directory: libs/go/aealite

common_checks_3:
continue-on-error: False
Expand Down Expand Up @@ -100,6 +121,7 @@ jobs:
sudo apt-get autoremove
sudo apt-get autoclean
pip install tox
pip install --user --upgrade setuptools
# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
unzip protoc-3.11.4-linux-x86_64.zip -d protoc
Expand Down Expand Up @@ -130,7 +152,7 @@ jobs:
continue-on-error: False
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.base_ref == 'master'
if: github.base_ref == 'main'
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
Expand Down Expand Up @@ -350,6 +372,9 @@ jobs:
name: Unit tests
run: |
tox -e py${{ matrix.python_version }} -- -m 'not integration and not unstable'
- name: Plugin tests
run: |
tox -e plugins-py${{ matrix.python_version }} -- --cov-append -m 'not integration and not unstable'
platform_checks_sync_aea_loop:
continue-on-error: True
Expand Down Expand Up @@ -404,8 +429,12 @@ jobs:
with:
go-version: '^1.14.0'
- if: matrix.python-version == '3.6'
name: Golang unit tests
working-directory: ./packages/fetchai/connections/p2p_libp2p
name: Golang unit tests (libp2p_node)
working-directory: ./libs/go/libp2p_node
run: go test -p 1 -timeout 0 -count 1 -v ./...
- if: matrix.python-version == '3.6'
name: Golang unit tests (aealite)
working-directory: ./libs/go/aealite
run: go test -p 1 -timeout 0 -count 1 -v ./...

coverage_checks:
Expand Down Expand Up @@ -438,7 +467,9 @@ jobs:
make protolint_install
# sudo apt-get install -y protobuf-compiler
- name: Run all tests
run: tox -e py3.7-cov -- --ignore=tests/test_docs --ignore=tests/test_examples --ignore=tests/test_packages/test_contracts --ignore=tests/test_packages/test_skills_integration -m 'not unstable'
run: |
tox -e py3.7-cov -- --ignore=tests/test_docs --ignore=tests/test_examples --ignore=tests/test_packages/test_contracts --ignore=tests/test_packages/test_skills_integration -m 'not unstable'
tox -e plugins-py3.7-cov -- --cov-append -m 'not unstable'
continue-on-error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ output_file
!packages/fetchai/contracts/oracle/build
!packages/fetchai/contracts/oracle_client/build
!packages/fetchai/contracts/fet_erc20/build
packages/fetchai/connections/p2p_libp2p/libp2p_node
packages/fetchai/connections/p2p_libp2p/libp2p_node/libp2p_node

!tests/data/dummy_contract/build
!plugins/aea-ledger-ethereum/tests/data/dummy_contract/build
!plugins/aea-ledger-cosmos/tests/data/dummy_contract/build
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ disable=C0103,C0201,C0301,C0302,C0330,W0105,W0107,W0707,W1202,W1203,R0801
# R0801: similar lines, # too granular

[IMPORTS]
ignored-modules=aiohttp,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3,aioprometheus
ignored-modules=bech32,ecdsa,lru,eth_typing,eth_keys,eth_account,ipfshttpclient,werkzeug,openapi_spec_validator,aiohttp,yoti_python_sdk,defusedxml,gym,fetch,matplotlib,memory_profiler,numpy,oef,openapi_core,psutil,tensorflow,temper,skimage,vyper,web3,aioprometheus

[DESIGN]
min-public-methods=1
Expand Down
2 changes: 2 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ Yoti
PowerShell
deregisters
plugin
Fetch.AI
AEALite
- docs/language-agnostic-definition.md
fetchai
protocol_id
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ If you need support, want to report/fix a bug, ask for/implement features, you c
or [submit a Pull request](https://github.com/fetchai/agents-aea/pulls)

For other kinds of feedback, you can contact one of the
[authors](https://github.com/fetchai/agents-aea/blob/master/AUTHORS.md) by email.
[authors](https://github.com/fetchai/agents-aea/blob/main/AUTHORS.md) by email.
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.11.0 (2020-03-04)

- Adds slots usage in frequently used framework objects, including `Dialogue`
- Fixes a bug in `aea upgrade` command where eject prompt was not offered
- Refactors skill component configurations to allow for skill components (`Handler`, `Behaviour`, `Model`) to be placed anywhere in a skill
- Extends skill component configuration to specify optional `file_path` field
- Extracts all ledger specific functionality in plugins
- Improves error logging in http server connection
- Updates `Development - Use case` documentation
- Adds restart support to `p2p_libp2p` connection on read/write failure
- Adds validation of default routing and default connection configuration
- Refactors and significantly simplifies routing between components
- Limits usage of `EnvelopeContext`
- Adds support for new CosmWasm message format in ledger plugins
- Adds project loading checks and optional auto removal in `MultiAgentManager`
- Adds support for reuse of threaded `Multiplexer`
- Fixes bug in TAC which caused agents to make suboptimal trades
- Adds support to specify dependencies on `aea-config.yaml` level
- Improves release scripts
- Adds lightweight Golang AEALite library
- Adds support for skill-to-skill messages
- Removes CLI GUI
- Multiple docs updates based on user feedback
- Multiple additional tests and test stability fixes

## 0.10.1 (2020-02-21)

- Changes default URL of `soef` connection to https
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ recursive-include aea *.json *.yaml *.proto *.ico *png *.html *.js *.css *.md *.
recursive-include docs *
recursive-include examples *
recursive-include packages *
recursive-include plugins *
recursive-include scripts *
recursive-include tests *
40 changes: 26 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,30 @@ clean-test:

.PHONY: lint
lint:
black aea benchmark examples packages scripts tests
isort aea benchmark examples packages scripts tests
flake8 aea benchmark examples packages scripts tests
black aea benchmark examples packages plugins scripts tests
isort aea benchmark examples packages plugins scripts tests
flake8 aea benchmark examples packages plugins scripts tests
vulture aea scripts/whitelist.py --exclude "*_pb2.py"

.PHONY: pylint
pylint:
pylint -j4 aea benchmark packages scripts examples/*
pylint -j4 aea benchmark packages scripts plugins/aea-ledger-fetchai/aea_ledger_fetchai plugins/aea-ledger-ethereum/aea_ledger_ethereum plugins/aea-ledger-cosmos/aea_ledger_cosmos examples/*

.PHONY: security
security:
bandit -r aea benchmark examples packages
bandit -s B101 -r tests scripts
bandit -r aea benchmark examples packages \
plugins/aea-ledger-fetchai/aea_ledger_fetchai \
plugins/aea-ledger-ethereum/aea_ledger_ethereum \
plugins/aea-ledger-cosmos/aea_ledger_cosmos
bandit -s B101 -r tests scripts \
plugins/aea-ledger-fetchai/tests \
plugins/aea-ledger-ethereum/tests \
plugins/aea-ledger-cosmos/tests
safety check -i 37524 -i 38038 -i 37776 -i 38039

.PHONY: static
static:
mypy aea benchmark examples packages scripts --disallow-untyped-defs
mypy aea benchmark examples packages plugins/aea-ledger-fetchai/aea_ledger_fetchai plugins/aea-ledger-ethereum/aea_ledger_ethereum plugins/aea-ledger-cosmos/aea_ledger_cosmos scripts --disallow-untyped-defs
mypy tests

.PHONY: package_checks
Expand All @@ -75,6 +81,9 @@ common_checks: security misc_checks lint static docs

.PHONY: test
test:
pytest -rfE plugins/aea-ledger-fetchai/tests --cov=aea_ledger_fetchai --cov-report=term --cov-report=term-missing --cov-config=.coveragerc
pytest -rfE plugins/aea-ledger-ethereum/tests --cov=aea_ledger_ethereum --cov-report=term --cov-report=term-missing --cov-config=.coveragerc
pytest -rfE plugins/aea-ledger-cosmos/tests --cov=aea_ledger_cosmos --cov-report=term --cov-report=term-missing --cov-config=.coveragerc
pytest -rfE --doctest-modules aea packages/fetchai/protocols packages/fetchai/connections packages/fetchai/skills/confirmation_aw1 packages/fetchai/skills/confirmation_aw2 packages/fetchai/skills/confirmation_aw3 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 packages/fetchai/skills/coin_price packages/fetchai/skills/fetch_beacon packages/fetchai/skills/simple_oracle packages/fetchai/skills/simple_oracle_client 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/confirmation_aw1 --cov=packages/fetchai/skills/confirmation_aw2 --cov=packages/fetchai/skills/confirmation_aw3 --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=packages/fetchai/skills/coin_price --cov=packages/fetchai/skills/fetch_beacon --cov=packages/fetchai/skills/simple_oracle --cov=packages/fetchai/skills/simple_oracle_client --cov-config=.coveragerc
find . -name ".coverage*" -not -name ".coveragerc" -exec rm -fr "{}" \;

Expand Down Expand Up @@ -106,13 +115,13 @@ h := $(shell git rev-parse --abbrev-ref HEAD)

.PHONY: release_check
release:
if [ "$h" = "master" ];\
if [ "$h" = "main" ];\
then\
echo "Please ensure everything is merged into master & tagged there";\
echo "Please ensure everything is merged into main & tagged there";\
pip install twine;\
twine upload dist/*;\
else\
echo "Please change to master branch for release.";\
echo "Please change to main branch for release.";\
fi

v := $(shell pip -V | grep virtualenvs)
Expand All @@ -123,9 +132,12 @@ new_env: clean
then\
pipenv --rm;\
pipenv --python 3.7;\
pipenv install --dev --skip-lock;\
pipenv run pip uninstall typing -y;\
pipenv run pip install -e .[all];\
pipenv install --dev --skip-lock;\
pipenv run pip uninstall typing -y;\
pipenv run pip install -e .[all];\
pipenv run pip install --no-deps file:plugins/aea-ledger-ethereum;\
pipenv run pip install --no-deps file:plugins/aea-ledger-cosmos;\
pipenv run pip install --no-deps file:plugins/aea-ledger-fetchai;\
echo "Enter virtual environment with all development dependencies now: 'pipenv shell'.";\
else\
echo "In a virtual environment! Exit first: 'exit'.";\
Expand All @@ -137,4 +149,4 @@ protolint:
protolint_install_win:
powershell -command '$$env:GO111MODULE="on"; go get -u -v github.com/yoheimuta/protolint/cmd/[email protected]'
protolint_win:
protolint lint -config_path=./protolint.yaml -fix ./aea/mail ./packages/fetchai/protocols
protolint lint -config_path=./protolint.yaml -fix ./aea/mail ./packages/fetchai/protocols
5 changes: 5 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ name = "test-pypi"
aiohttp = "==3.6.2"
aioprometheus = "==20.0.1"
bandit = "==1.6.2"
bech32 = "==1.2.0"
black = "==19.10b0"
bs4 = "==0.0.1"
colorlog = "==4.1.0"
defusedxml = "==0.6.0"
docker = "==4.2.0"
ecdsa = ">=0.15"
eth-account = "==0.5.2"
flake8 = "==3.7.9"
flake8-bugbear = "==20.1.4"
flake8-docstrings = "==1.5.0"
Expand Down Expand Up @@ -55,7 +58,9 @@ tox = "==3.15.1"
vulture = "==2.1"
vyper = "==0.1.0b12"
isort = "==5.5.2"
web3 = "==5.12.0"
yoti = "==2.14.0"
pytest-custom-exit-code = "==0.3.0"

[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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a>
<img alt="PyPI - Wheel" src="https://img.shields.io/pypi/wheel/aea">
</a>
<a href="https://github.com/fetchai/agents-aea/blob/master/LICENSE">
<a href="https://github.com/fetchai/agents-aea/blob/main/LICENSE">
<img alt="License" src="https://img.shields.io/pypi/l/aea">
</a>
<a href="https://pypi.org/project/aea/">
Expand All @@ -24,7 +24,7 @@
</p>
<p align="center">
<a href="https://github.com/fetchai/agents-aea/workflows/AEA%20framework%20sanity%20checks%20and%20tests">
<img alt="AEA framework sanity checks and tests" src="https://github.com/fetchai/agents-aea/workflows/AEA%20framework%20sanity%20checks%20and%20tests/badge.svg?branch=master">
<img alt="AEA framework sanity checks and tests" src="https://github.com/fetchai/agents-aea/workflows/AEA%20framework%20sanity%20checks%20and%20tests/badge.svg?branch=main">
</a>
<a href="">
<img alt="Codecov" src="https://img.shields.io/codecov/c/github/fetchai/agents-aea">
Expand Down Expand Up @@ -125,7 +125,7 @@ You can have more control on the installed dependencies by leveraging the setupt

The following dependency is **only relevant if you intend to contribute** to the repository:

- All Pull Requests should be opened against the `develop` branch. Do **not** open a Pull Request against `master`!
- All Pull Requests should be opened against the `develop` branch. Do **not** open a Pull Request against `main`!

- The project uses [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) compiler for message serialization. A guide on how to install it is found [here](https://fetchai.github.io/oef-sdk-python/user/install.html#protobuf-compiler).

Expand Down Expand Up @@ -183,15 +183,15 @@ The following steps are **only relevant if you intend to contribute** to the rep

### Go Development

The `fetchai/p2p_libp2p` package is partially developed in Go.
- The `fetchai/p2p_libp2p` package is partially developed in Go.

- To install Go visit the [Golang site](https://golang.org/doc/install).

- We use [`golines`](https://github.com/segmentio/golines) and [`golangci-lint`](https://golangci-lint.run) for linting.

- To run tests, use `go test -p 1 -timeout 0 -count 1 -v ./...` from the root directory of the package.
- To run tests, use `go test -p 1 -timeout 0 -count 1 -v ./...` from the root directory of the package. If you experience installation or build issues run `go clean -modcache`.

### Documentation
### Documentation

- To start a live-reloading docs server on localhost: `mkdocs serve`. To amend the docs, create a new documentation file in `docs/` and add a reference to it in `mkdocs.yml`.

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.10.x` | :white_check_mark: |
| `< 0.10.0` | :x: |
| `0.11.x` | :white_check_mark: |
| `< 0.11.0` | :x: |

## Reporting a Vulnerability

Expand Down
3 changes: 3 additions & 0 deletions aea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
__url__,
__version__,
)
from aea.crypto.plugin import load_all_plugins


AEA_DIR = os.path.dirname(inspect.getfile(inspect.currentframe())) # type: ignore

load_all_plugins()


def get_current_aea_version() -> Version:
"""Get current version."""
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.10.1"
__version__ = "0.11.0"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
Loading

0 comments on commit 06bc58b

Please sign in to comment.