Skip to content
This repository has been archived by the owner on Jul 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #336 from fetchai/develop
Browse files Browse the repository at this point in the history
Merge develop into master for release 0.1.3
  • Loading branch information
DavidMinarsch authored Aug 9, 2019
2 parents 6cfe6db + 0eb7d96 commit 1d5036c
Show file tree
Hide file tree
Showing 104 changed files with 3,943 additions and 927 deletions.
10 changes: 9 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ Release History
0.1.2 (2019-07-08)
-------------------

- Minor updates, many bug fixes, no breaking changes.
- Minor updates, many bug fixes, no breaking changes.

0.1.3 (2019-08-09)
-------------------

- Updated to OEF SDK version 0.6
- Improved documentation by adding detailed guides
- Added more tools/features to support the developer (e.g. the launcher app)

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2019 Fetch.AI Limited

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ recursive-include templates *
recursive-include sandbox *
recursive-include simulation *
recursive-include scripts *
recursive-include oef_search_pluto_scripts *
11 changes: 10 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[[source]]
url = "https://test.pypi.org/simple"
verify_ssl = true
name = "test-pypi"

[dev-packages]
flake8 = "*"
ipython = "*"
jupyter = "*"
pytest = "*"
tox = "*"
tox-pipenv = "*"
pytest-cov = "*"
docker = "*"
flake8-docstrings = "*"
Expand All @@ -20,11 +26,14 @@ python-dateutil = "*"
visdom = "*"
cryptography = "*"
base58 = "*"
oef = "==0.4.0"
fetchai-ledger-api = {git = "https://github.com/fetchai/ledger-api-py.git",
oef = {version="*", index="test-pypi"}
sphinxcontrib-mermaid = "*"
sphinxcontrib-apidoc = "*"
sphinx = "*"
nbsphinx = "*"
flask-restful = "*"
wtforms = "*"

[requires]
python_version = "3.7"
427 changes: 264 additions & 163 deletions Pipfile.lock

Large diffs are not rendered by default.

22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ This repository contains submodules. Clone with recursive strategy:

git clone [email protected]:fetchai/agents-tac.git --recursive && cd agents-tac

## Quick Start
## Quick Start:

- [x] You have followed the steps under 'Dependencies' and 'Preliminaries' below
- [x] You have entered the virtual environment and launched the script:

pipenv shell
python scripts/launch.py

The controller GUI at http://localhost:8097 provides real time insights.

## Step by step:

- [x] You have followed the steps under 'Dependencies' and 'Preliminaries' below
- [x] In one terminal, you have built the sandbox and then launched it:
Expand All @@ -19,7 +29,7 @@ This repository contains submodules. Clone with recursive strategy:
- [x] In another terminal, you have entered the virtual environment and connected a template agent to the sandbox:

pipenv shell
python3 templates/v1/basic.py --name my_agent --gui
python templates/v1/basic.py --name my_agent --gui

The sandbox is starting up:
<p align="center">
Expand Down Expand Up @@ -88,7 +98,7 @@ The [competition sandbox](../master/sandbox) provides the code to build the dock

- Install the package:

python3 setup.py install
python setup.py install

## Contribute

Expand All @@ -97,6 +107,10 @@ The following dependency is only relevant if you intend to contribute to the rep

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

- Clear cache

pipenv --clear

- Install development dependencies:

pipenv install --dev
Expand All @@ -119,7 +133,7 @@ The following steps are only relevant if you intend to contribute to the reposit

- We recommend you use the latest OEF build:

python3 oef_search_pluto_scripts/launch.py -c ./oef_search_pluto_scripts/launch_config_latest.json
python oef_search_pluto_scripts/launch.py -c ./oef_search_pluto_scripts/launch_config_latest.json

## Resources

Expand Down
9 changes: 2 additions & 7 deletions docker-tac-develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,14 @@ RUN sudo apt install python3.7-dev -y
RUN sudo apt install python3-pip -y
RUN sudo pip install pipenv

## Docs dependencies:
#RUN apt install pandoc -y
## python package to parse plantuml files. docs: https://pythonhosted.org/plantuml/
#RUN apt install plantuml -y

RUN sudo mkdir /build
WORKDIR /build
COPY . /build

RUN sudo make clean

RUN pipenv --python python3.7
RUN pipenv install --dev --skip-lock
RUN pipenv run pip3 install . --no-cache-dir --force
RUN pipenv install --dev
RUN pipenv run pip3 install .

ENTRYPOINT []
5 changes: 5 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# TAC Documentation

## Dependency

This requires `pandoc` to be installed locally. See [here](https://pandoc.org/installing.html) for instructions.

## Build

- Before getting started, check that:

- [x] You have followed the steps under 'Dependencies' and 'Preliminaries' on root readme.
- [x] You have installed the development dependencies as described on root readme.

- Activate the virtual environment:

Expand Down
24 changes: 13 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.mathjax',
'sphinx.ext.githubpages',
'nbsphinx',
'sphinxcontrib.mermaid',
'sphinx.ext.todo',
'sphinx.ext.autodoc',
'sphinx.ext.autosectionlabel',
'sphinx.ext.intersphinx'
extensions = [
'sphinx.ext.mathjax',
'sphinx.ext.githubpages',
'nbsphinx',
'sphinxcontrib.mermaid',
'sphinx.ext.todo',
'sphinx.ext.autodoc',
'sphinx.ext.autosectionlabel',
'sphinx.ext.intersphinx',
]

# autodoc conf
Expand Down Expand Up @@ -67,14 +68,15 @@
copyright = '2019, Fetch.AI'
author = 'Fetch.AI'

from tac import __version__
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.1.2'
version = __version__
# The full version, including alpha/beta/rc tags.
release = '0.1.2'
release = __version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -112,7 +114,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
45 changes: 45 additions & 0 deletions docs/diagrams/agent-state-management-guide/summary.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
sequenceDiagram

participant Agent_1

participant Agent_2

participant Controller

activate Controller

Agent_1->>Agent_2: (1) send_cfp(1, 1, "agent_2_pbk", 0, query)

Agent_2->>Agent_2: (2) get_proposal()
Agent_2->>Agent_2: (3) add_pending_proposal()

Agent_2->>Agent_1: (4) send_propose(2, 1, "agent_1_pbk", 1, proposals)

Agent_1->>Agent_1: (5) is_profitable_transaction()
Agent_1->>Agent_1: (6) add_locked_tx()
Agent_1->>Agent_1: (7) add_pending_initial_acceptance()

Agent_1->>Agent_2: (8) send_accept(3, 1, "agent_2_pbk", 2)

Agent_2->>Agent_2: (9) pop_pending_proposal()
Agent_2->>Agent_2: (10) is_profitable_transaction()
Agent_2->>Agent_2: (11) add_locked_tx()

Agent_2->>Agent_1: (12) send_accept(4, 1, "agent_1_pbk", 3)
Agent_2->>Controller: (13) send_message(4, 1, "controller_pbk", transaction)

Agent_1->>Agent_1: (14) pop_pending_initial_acceptance()

Agent_1->>Controller: (15) send_message(5, 1, "controller_pbk", transaction)

Controller->>Agent_1: (16) TransactionConfirmation(transaction)

Agent_1->>Agent_1: (17) pop_locked_tx()
Agent_1->>Agent_1: (18) agent_state.update()

Controller->>Agent_2: (19) TransactionConfirmation(transaction)

Agent_2->>Agent_2: (20) pop_locked_tx()
Agent_2->>Agent_2: (21) agent_state.update()

deactivate Controller
41 changes: 41 additions & 0 deletions docs/diagrams/negotiation-guide/summary.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
sequenceDiagram

participant Agent_1

participant Agent_2

participant Controller

participant OEF



activate Controller

Agent_1->>Agent_1: (1) get_service_description()
Agent_1->>OEF: (2) register_service(description)

Agent_2->>Agent_2: (3) get_service_description()
Agent_2->>OEF: (4) register_service(description)

Agent_1->>Agent_1: (5) build_services_query()
Agent_1->>OEF: (6) search_services(query)

OEF->>Agent_1: (7) search_results(agents)

Agent_1->>Agent_2: (8) send_cfp(1, 1, "agent_2_pbk", 0, query)
Agent_2->>Agent_2: (9) get_proposal()

Agent_2->>Agent_1: (10) send_propose(2, 1, "agent_1_pbk", 1, proposals)

Agent_1->>Agent_2: (11) send_accept(3, 1, "agent_2_pbk", 2)

Agent_2->>Agent_1: (13) send_accept(4, 1, "agent_1_pbk", 3)
Agent_2->>Controller: (14) send_message(4, 1, "controller_pbk", transaction)

Agent_1->>Controller: (12) send_message(5, 1, "controller_pbk", transaction)

Controller->>Agent_1: (15) TransactionConfirmation(transaction)
Controller->>Agent_2: (16) TransactionConfirmation(transaction)

deactivate Controller
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Welcome to TAC's documentation!
sections/controller_protocol
sections/baseline_agent
sections/develop_agent
sections/negotiation_guide
sections/agent_state_management_guide
sections/glossary

reference/api/tac
Expand Down
40 changes: 40 additions & 0 deletions docs/publish_to_ghpages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

if [ -z $1 ]
then
echo "Please provide a tag argument."
exit 1;
fi

STATUS="$(git status)"

if ! [[ $STATUS == *"nothing to commit, working tree clean"* ]]
then
echo "The working directory is dirty. Please commit any pending changes."
exit 1;
fi

set -e

echo "Deleting old publication"
rm -rf _build

echo "Cloning gh-pages branch"
mkdir _build -p
cd _build
git clone --single-branch --branch gh-pages [email protected]:fetchai/agents-tac.git html
cd ..

echo "Building docs"
sphinx-apidoc -o reference/api/ ../tac/
make html
cd _build/html

echo "Pushing to gh-pages branch"
git add --all && git commit -m "Publish docs ($1)"
git tag $1
git push origin gh-pages

echo "Delete local repo"
cd ../../
make clean
16 changes: 8 additions & 8 deletions docs/reference/api/tac.agents.v1.base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ tac.agents.v1.base.interfaces module
:undoc-members:
:show-inheritance:

tac.agents.v1.base.lock\_manager module
---------------------------------------

.. automodule:: tac.agents.v1.base.lock_manager
:members:
:undoc-members:
:show-inheritance:

tac.agents.v1.base.negotiation\_behaviours module
-------------------------------------------------

Expand Down Expand Up @@ -100,6 +92,14 @@ tac.agents.v1.base.strategy module
:undoc-members:
:show-inheritance:

tac.agents.v1.base.transaction\_manager module
----------------------------------------------

.. automodule:: tac.agents.v1.base.transaction_manager
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------
Expand Down
8 changes: 8 additions & 0 deletions docs/reference/api/tac.gui.dashboards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ tac.gui.dashboards.controller module
:undoc-members:
:show-inheritance:

tac.gui.dashboards.leaderboard module
-------------------------------------

.. automodule:: tac.gui.dashboards.leaderboard
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------
Expand Down
Loading

0 comments on commit 1d5036c

Please sign in to comment.