Skip to content

Commit

Permalink
Merge pull request #1152 from fetchai/develop
Browse files Browse the repository at this point in the history
Release v0.3.1
  • Loading branch information
DavidMinarsch authored Apr 27, 2020
2 parents 9bd1d51 + f787a0b commit d2675d4
Show file tree
Hide file tree
Showing 355 changed files with 15,611 additions and 6,218 deletions.
81 changes: 59 additions & 22 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,56 @@ on:
pull_request:

jobs:
run:
common_checks:
runs-on: ubuntu-latest

timeout-minutes: 30

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
with:
python-version: 3.6
- name: Install dependencies (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install pipenv
pip install tox
# install IPFS
sudo apt-get install -y wget
wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.4.23/go-ipfs_v0.4.23_linux-amd64.tar.gz
tar xvfz go-ipfs.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
ipfs init
- name: Security Check - Main
run: tox -e bandit-main
- name: Security Check - Tests
run: tox -e bandit-tests
- name: Safety Check
run: tox -e safety
- name: License Check
run: tox -e liccheck
- name: Copyright Check
run: tox -e copyright_check
- name: AEA Package Hashes Check
run: tox -e hash_check -- --timeout 20.0
- name: Code style check
run: |
tox -e black-check
tox -e flake8
- name: Static type check
run: tox -e mypy
- name: Generate Documentation
run: tox -e docs

platform_checks:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]

timeout-minutes: 30
Expand All @@ -23,31 +67,27 @@ jobs:
- uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- if: matrix.os == 'ubuntu-latest'
name: Install dependencies (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install pipenv
pip install tox
sudo apt-get clean
sudo apt-get install -y protobuf-compiler
- name: Security Check - Main
run: tox -e bandit-main
- name: Security Check - Tests
run: tox -e bandit-tests
- name: Safety Check
run: tox -e safety
- name: License Check
run: tox -e liccheck
- name: Copyright Check
run: tox -e copyright_check
- name: Code style check
# use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist
# use sudo apt-get dist-upgrade above in line below update if dependency install failures persist
- if: matrix.os == 'macos-latest'
name: Install dependencies (macos-latest)
run: |
tox -e black-check
tox -e flake8
- name: Static type check
run: tox -e mypy
pip install pipenv
pip install tox
brew install protobuf
- name: Unit tests and coverage
run: |
tox -e py${{ matrix.python-version }} -- --no-integration-tests --ci
# optionally, use flags beyond above command: -- --no-integration-tests --ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand All @@ -57,6 +97,3 @@ jobs:
name: codecov-umbrella
yml: ./codecov.yml
fail_ci_if_error: true
- name: Generate Documentation
run: tox -e docs

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pip-wheel-metadata/

data/*
!data/aea.png
!data/video-aea.png
temp_private_key.pem
.idea/

Expand Down
2 changes: 2 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ This is the official list of Fetch.AI authors for copyright purposes.
* Diarmid Campbell <diarmid.campbell@fetch.ai> [dishmop](https://github.com/dishmop)
* Oleg Panasevych <oleg.panasevych@n-cube.co.uk> [Panasevychol](https://github.com/panasevychol)
* Kevin Chen <kevin.chen@fetch.ai> [Kevin-Chen0](https://github.com/Kevin-Chen0)
* Yuri Turchenkov <yuri.turchenkov@fetch.ai> [solarw](https://github.com/solarw)
* Lokman Rahmani <lokman.rahmani@fetch.ai> [lrahmani](https://github.com/lrahmani)
27 changes: 27 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Release History

## 0.3.1 (2020-04-27)

- Adds p2p_stub connection
- Adds p2p_noise connection
- Adds webhook connection
- Upgrades error handling for error skill
- Fixes default timeout on main agent loop and provides setter in AEABuilder
- Adds multithreading support for launch command
- Provides support for kwargs to AEA constructor to be set on skill context
- Renames ConfigurationType with PackageType for consistency
- Provides a new AEATestCase class for improved testing
- Adds execution time limits for act/react calls
- TAC skills refactoring and contract integration
- Supports contract dependencies being added automatically
- Adds HTTP example skill
- Allows for skill inactivation during initialisation
- Improves error messages on skill loading errors
- Improves Readme, particularly for PyPI
- Adds support for Location based queries and descriptions
- Refactors skills tests to use AEATestCase
- Adds fingerprint and scaffold cli command for contract
- Adds multiple additional docs tests
- Makes task manager initialize pool lazily
- Multiple docs updates
- Multiple additional unit tests
- Multiple additional minor fixes and changes

## 0.3.0 (2020-04-02)

- Introduces IPFS based hashing of files to detect changes, ensure consistency and allow for content addressing
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ clean-pyc:
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '.DS_Store' -exec rm -fr {} +

.PHONY: clean-test
clean-test:
Expand All @@ -39,18 +40,19 @@ clean-test:

.PHONY: lint
lint:
black aea examples packages scripts tests
flake8 aea examples packages scripts tests
black aea benchmark examples packages scripts tests
flake8 aea benchmark examples packages scripts tests

.PHONY: security
security:
bandit -s B101 -r aea packages scripts
bandit -s B101 -r tests
bandit -s B101 -r benchmark
safety check

.PHONY: static
static:
mypy aea packages tests scripts
mypy aea benchmark packages tests scripts

.PHONY: test
test:
Expand Down Expand Up @@ -99,4 +101,4 @@ new_env: clean
.PHONY: install_env
install_env:
pipenv install --dev --skip-lock
pip install -e .[all]
pip install -e .[all]
9 changes: 7 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ verify_ssl = true
name = "test-pypi"

[dev-packages]
aries-cloudagent = "==0.4.5"
aiohttp = "==3.6.2"
bandit = "==1.6.2"
black = "==19.10b0"
bs4 = "==0.0.1"
Expand All @@ -24,6 +24,8 @@ gym = "==0.15.6"
ipfshttpclient = "==0.4.12"
liccheck = "==0.4.0"
markdown = ">=3.2.1"
matplotlib = "==3.2.1"
memory-profiler = "==0.57.0"
mkdocs = "==1.1"
mkdocs-material = "==4.6.3"
mkdocs-mermaid-plugin = {git = "https://github.com/pugong/mkdocs-mermaid-plugin.git"}
Expand All @@ -32,17 +34,20 @@ numpy = "==1.18.1"
oef = "==0.8.1"
openapi-core = "==0.13.2"
openapi-spec-validator = "==0.2.8"
psutil = "==5.7.0"
pydocstyle = "==3.0.0"
pygments = "==2.5.2"
pymdown-extensions = "==6.3"
pytest = "==5.3.5"
pytest-asyncio = "==0.10.0"
pytest-cov = "==2.8.1"
pytest-randomly = "==3.2.1"
requests = "==2.23.0"
requests = ">=2.22.0"
safety = "==1.8.5"
tox = "==3.14.5"
vyper = "==0.1.0b12"
mistune = "==2.0.0a4"
pynacl = "==1.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
76 changes: 45 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AEA Framework
# AEA Framework

[![PyPI](https://img.shields.io/pypi/v/aea)](https://pypi.org/project/aea/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aea)
Expand All @@ -12,37 +12,47 @@

A framework for autonomous economic agent (AEA) development

<p align="center">
<img src="/data/aea.png?raw=true" alt="AEA Description" width="70%"/>
</p>

## Get started

1. Create and launch a clean virtual environment with Python 3.7 (any Python `>=` 3.6 works):

pipenv --python 3.7 && pipenv shell
pipenv --python 3.7 && pipenv shell

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

pip install aea[all]
pip install aea[all]

Or, if you use `zsh` rather than `bash`:

(`pip install "aea[all]"` if you use `zsh` rather than `bash`.)
pip install "aea[all]"

3. Then, build your agent as described in the [docs](https://fetchai.github.io/agents-aea/).

<p align="center">
<img src="https://github.com/fetchai/agents-aea/blob/develop/data/aea.png?raw=true" alt="AEA" width="70%"/>
<a href="https://www.youtube.com/embed/xpJA4IT5X88">
<img src="/data/video-aea.png?raw=true" alt="AEA Video" width="70%"/>
</a>
</p>

## Alternatively: Install from Source

This approach is not recommended!

### Cloning

This repository contains submodules. Clone with recursive strategy:

git clone https://github.com/fetchai/agents-aea.git --recursive && cd agents-aea
git clone https://github.com/fetchai/agents-aea.git --recursive && cd agents-aea

### Dependencies

All python specific dependencies are specified in the Pipfile (and installed via the commands specified in 'Preliminaries').
All python specific framework dependencies are specified in `setup.py` and installed with the framework. All development dependencies are specified in `Pipfile` (and installed via the commands specified in [Preliminaries](#preliminaries)).

Or, you can have more control on the installed dependencies by leveraging the setuptools' extras mechanism (more details later).
You can have more control on the installed dependencies by leveraging the setuptools' extras mechanism.

### Preliminaries

Expand All @@ -54,57 +64,62 @@ Or, you can have more control on the installed dependencies by leveraging the se

pip install .[all]

(`pip install ".[all]"` if you use `zsh` rather than `bash`.)
Or, if you use `zsh` rather than `bash`:

pip install ".[all]"

- Then, build your agent as described in the [docs](https://fetchai.github.io/agents-aea/).

## Contribute

The following dependency is **only relevant if you intend to contribute** to the repository:
- 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).

The following steps are only relevant if you intend to contribute to the repository. They are not required for agent development.
- 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).

The following steps are **only relevant if you intend to contribute** to the repository. They are **not required** for agent development.

- To install development dependencies (here optionally skipping `Pipfile.lock` creation):

- Install development dependencies (optionally skipping Lockfile creation):
pipenv install --dev --skip-lock

pipenv install --dev --skip-lock
- To install the package from source in development mode:

- Install package in development mode (this step replaces `pip install aea[all]` above):
pip install -e .[all]

pip install -e .[all]
Of, if you use `zsh` rather than `bash`:

(`pip install -e ".[all]"` if you use `zsh` rather than `bash`.)
pip install -e ".[all]"

- To run tests (ensure no oef docker containers are running):
- To run tests:

tox -e py3.7
tox -e py3.7

- To run linters (code style checks):

tox -e flake8
tox -e flake8

- To run static type checks:

tox -e mypy
tox -e mypy

- To run black code formatter:

tox -e black
tox -e black

- To run bandit security checks:

tox -e bandit-main
tox -e bandit-tests
tox -e bandit-main
tox -e bandit-tests

- Docs:
- To start a live-reloading docs server on localhost

mkdocs serve

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

To amend the docs, create a new documentation file in `docs/` and add a reference to it in `mkdocs.yml`.
- To fetch/update submodules:

- Fetch submodules:

git submodule sync --recursive && git submodule update --init --recursive
git submodule sync --recursive && git submodule update --init --recursive

## Cite

Expand All @@ -113,9 +128,8 @@ consider to cite it with the following BibTex entry:

```
@misc{agents-aea,
Author = {Marco Favorito and David Minarsch and Ali Hosseini and Aristotelis Triantafyllidis and Diarmid Campbell and Oleg Panasevych and Kevin Chen},
Author = {Marco Favorito and David Minarsch and Ali Hosseini and Aristotelis Triantafyllidis and Diarmid Campbell and Oleg Panasevych and Kevin Chen and Yuri Turchenkov and Lokman Rahmani},
Title = {Autonomous Economic Agent (AEA) Framework},
Year = {2019},
}
```
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.3.0"
__version__ = "0.3.1"
__author__ = "Fetch.AI Limited"
__license__ = "Apache-2.0"
__copyright__ = "2019 Fetch.AI Limited"
Loading

0 comments on commit d2675d4

Please sign in to comment.