-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: import sys.path not including folder of yaml config file * chore: bump version 1.0.7 -> 1.0.8 * chore: add folders to gitignore * fix: xmpp server docker * fix: add docker folders to gitignore * fix: logger in yaml config parser * fix: receive method in behaviours from returning instantly when timeout is None * docs: corrected example 2 * chore: format using black and isort * chore: bump version 1.0.8 -> 1.0.9 * docs: add readme to docker folder * docs: simplify main readme example * feat: add logging module to the framework to facilitate logging * docs: corrected uncorrected merge
- Loading branch information
1 parent
e405d31
commit 89b5748
Showing
14 changed files
with
95 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Docker for the XMPP server | ||
|
||
This docker is only for the XMPP server and the Directory Facilitator agent. The only files missing are the certificates that must be in the folder `server/config/certs`. | ||
To create self-assign certificates you can use OpenSSL to do it. The name of the certificates must be `localhost.key` and `localhost.crt`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,8 @@ services: | |
depends_on: | ||
- server | ||
build: . | ||
links: | ||
- server:localhost | ||
ports: | ||
- 10000:10000 | ||
restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "peak-mas" | ||
version = "1.0.7" | ||
version = "1.0.9" | ||
description = "Python-based framework for heterogeneous agent communities" | ||
readme = "README.md" | ||
authors = [{ name = "Bruno Ribeiro", email = "[email protected]" }] | ||
|
@@ -42,7 +42,7 @@ Github = "https://github.com/gecad-group/peak-mas" | |
peak = "peak.__main__:main" | ||
|
||
[tool.bumpver] | ||
current_version = "1.0.7" | ||
current_version = "1.0.9" | ||
version_pattern = "MAJOR.MINOR.PATCH" | ||
commit_message = "chore: bump version {old_version} -> {new_version}" | ||
commit = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,10 @@ | |
from peak.core import * | ||
from peak.agents import * | ||
from peak.behaviours import * | ||
from peak.logging import * | ||
|
||
logging.getLogger(__name__).addHandler(logging.NullHandler()) | ||
|
||
__author__ = "Bruno Ribeiro" | ||
__email__ = "[email protected]" | ||
__version__ = "1.0.7" | ||
__version__ = "1.0.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import logging | ||
import sys | ||
from typing import Optional | ||
|
||
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | ||
_logger = logging.getLogger(__name__) | ||
_logger.setLevel(logging.DEBUG) | ||
_handler = logging.StreamHandler(sys.stdout) | ||
_handler.setFormatter(FORMATTER) | ||
_logger.addHandler(_handler) | ||
|
||
def getLogger(name: Optional[str], level: int = logging.INFO): | ||
logger = logging.getLogger(name) | ||
logger.setLevel(level) | ||
handler = logging.StreamHandler(sys.stdout) | ||
handler.setFormatter(FORMATTER) | ||
logger.addHandler(handler) | ||
return logger | ||
|
||
def log(message: str, level: int = logging.INFO): | ||
_logger.log(level, message) |