Skip to content

Commit

Permalink
Merge pull request #285 from fetchai/develop
Browse files Browse the repository at this point in the history
Release v0.1.9
  • Loading branch information
DavidMinarsch authored Oct 18, 2019
2 parents 9e321f0 + 8ced1c1 commit 9865a44
Show file tree
Hide file tree
Showing 28 changed files with 419 additions and 162 deletions.
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ _Put an `x` in the boxes that apply._
- [ ] I built the documentation and updated it with the latest changes
- [ ] I've added an item in `HISTORY.rst` for this release
- [ ] I bumped the version number in the `aea/__version__.py` file.
- [ ] I bumped the version number in every Docker image of the repo and published it. Also, I built and published them with tag `latest`
- [ ] I bumped the version number in every Docker image of the repo and published it. Also, I built and published them with tag `latest`
(check the READMEs of [`aea-develop`](../develop-image/README.md#publish)
and [`aea-deploy`](../deploy-image/README.md#publish))
- [ ] I have checked that the documentation about the `aea cli` tool works

## Further comments
Expand Down
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@ Release History
- Adds full test coverage on cli
- Improves docs
- Multiple additional minor fixes and changes

0.1.9 (2019-10-18)
-------------------

- Stability improvements
- Higher test coverage, including on Python 3.6
- Multiple additional minor fixes and changes
14 changes: 7 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ pipeline {

} // docs

// stage('Unit Tests: Python 3.6') {
//
// steps {
// sh 'tox -e py36 -- --no-integration-tests'
// }
//
// } // unit tests: python 3.6
stage('Unit Tests: Python 3.6') {

steps {
sh 'tox -e py36 -- --no-integration-tests --ci'
}

} // unit tests: python 3.6

stage('Unit Tests: Python 3.7') {

Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ colorlog = "*"
jsonschema = "*"
protobuf = "*"
flask = "*"
connexion = {git = "https://github.com/neverpanic/connexion.git",editable = true,ref = "jsonschema-3"}
connexion = ">=2.4.0"
watchdog = "*"
python-dotenv = "*"
fetchai-ledger-api = "*"
Expand Down
112 changes: 64 additions & 48 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ 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 Down
2 changes: 1 addition & 1 deletion aea/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__title__ = 'aea'
__description__ = 'Autonomous Economic Agent framework'
__url__ = 'https://github.com/fetchai/agents-aea.git'
__version__ = '0.1.8'
__version__ = '0.1.9'
__author__ = 'Fetch.AI Limited'
__license__ = 'Apache 2.0'
__copyright__ = '2019 Fetch.AI Limited'
19 changes: 11 additions & 8 deletions aea/cli_gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,22 @@ def get_agents():
return agent_list


def get_registered_items(item_type):
"""Return list of all protocols, connections or skills in the registry."""
item_dir = os.path.join(flask.app.agents_dir, "packages/" + item_type + "s")

def _add_items(item_dir, item_type, items_list):
file_list = glob.glob(os.path.join(item_dir, '*'))

items_list = []

for path in file_list:
if is_item_dir(path, item_type):
head, tail = os.path.split(path)
desc = read_description(path, item_type)
items_list.append({"id": tail, "description": desc})
if not {"id": tail, "description": desc} in items_list:
items_list.append({"id": tail, "description": desc})


def get_registered_items(item_type):
"""Return list of all protocols, connections or skills in the registry."""
items_list = []

_add_items(os.path.join(flask.app.agents_dir, "packages/" + item_type + "s"), item_type, items_list)
_add_items(os.path.join(flask.app.module_dir, "aea/" + item_type + "s"), item_type, items_list)

return items_list

Expand Down
3 changes: 2 additions & 1 deletion aea/configurations/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class ConfigLoader(Generic[T]):
def __init__(self, schema_filename: str, configuration_type: Type[T]):
"""Initialize the parser for configuration files."""
self.schema = json.load(open(os.path.join(_SCHEMAS_DIR, schema_filename)))
self.resolver = jsonschema.RefResolver("file://{}/".format(Path(_SCHEMAS_DIR).absolute()), self.schema)
root_path = "file://{}{}".format(Path(_SCHEMAS_DIR).absolute(), os.path.sep)
self.resolver = jsonschema.RefResolver(root_path, self.schema)
self.validator = Draft4Validator(self.schema, resolver=self.resolver)
self.configuration_type = configuration_type # type: Type[T]

Expand Down
2 changes: 1 addition & 1 deletion aea/connections/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from aea.configurations.base import ConnectionConfig
if TYPE_CHECKING:
from aea.mail.base import Envelope
from aea.mail.base import Envelope # pragma: no cover


class Channel(ABC):
Expand Down
4 changes: 2 additions & 2 deletions aea/connections/local/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def handle_agent_message(self, envelope: Envelope) -> None:
if destination not in self._queues:
msg = OEFMessage(oef_type=OEFMessage.Type.DIALOGUE_ERROR, id=STUB_DIALOGUE_ID, dialogue_id=STUB_DIALOGUE_ID, origin=destination)
msg_bytes = OEFSerializer().encode(msg)
error_envelope = Envelope(to=destination, sender=envelope.sender, protocol_id=OEFMessage.protocol_id, message=msg_bytes)
error_envelope = Envelope(to=envelope.sender, sender=DEFAULT_OEF, protocol_id=OEFMessage.protocol_id, message=msg_bytes)
self._send(error_envelope)
return
else:
Expand All @@ -140,7 +140,7 @@ def register_service(self, public_key: str, service_description: Description):

def register_service_wide(self, public_key: str, service_description: Description):
"""Register service wide."""
raise NotImplementedError
raise NotImplementedError # pragma: no cover

def unregister_service(self, public_key: str, msg_id: int, service_description: Description) -> None:
"""
Expand Down
3 changes: 2 additions & 1 deletion aea/registries/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def populate(self, directory: str) -> None:
logger.warning("No protocol found.")
return

protocols_packages = list(filter(lambda x: PACKAGE_NAME_REGEX.match(x), protocols_spec.loader.contents())) # type: ignore
loader_contents = [path.name for path in Path(directory, "protocols").iterdir()]
protocols_packages = list(filter(lambda x: PACKAGE_NAME_REGEX.match(x), loader_contents)) # type: ignore
logger.debug("Processing the following protocol package: {}".format(protocols_packages))
for protocol_name in protocols_packages:
try:
Expand Down
Loading

0 comments on commit 9865a44

Please sign in to comment.