Skip to content

Commit

Permalink
Merge pull request #683 from valory-xyz/release/v1.41.0
Browse files Browse the repository at this point in the history
Release `v1.41.0`
  • Loading branch information
angrybayblade authored Oct 10, 2023
2 parents 49fde22 + ee2f998 commit 3a13325
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 25 deletions.
16 changes: 16 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Release History - open AEA


## 1.40.0 (2023-09-26)

AEA:
- Fixes the source repository validation regex
- Updates the `generate-key` command to prompt before overwriting the existing keys file
- Fixes the inconsistent hashing caused by the `CRLF` line endings
- Updates the component loader to ignore the test modules when loading the component
- Adds support for overriding dependencies
- Updates the `sync` command to download missing dependencies and update `packages.json`
- Updates the error messages for missing ledger plugins on `generate-key` command

Plugins:
- Adds missing `py.typed` markers
- Backports the changes from the `agent-academy-2` repository on the ledger connection
- Ports `http_server` as a valory connection

## 1.40.0 (2023-09-26)

AEA:
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 `open-aea` are currently being suppo

| Version | Supported |
| --------- | ------------------ |
| `1.40.x` | :white_check_mark: |
| `< 1.40.0` | :x: |
| `1.41.x` | :white_check_mark: |
| `< 1.41.0` | :x: |

## Reporting a Vulnerability

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__ = "open-aea"
__description__ = "Open Autonomous Economic Agent framework (without vendor lock-in)"
__url__ = "https://github.com/valory-xyz/open-aea.git"
__version__ = "1.40.0"
__version__ = "1.41.0"
__author__ = "Valory AG"
__license__ = "Apache-2.0"
__copyright__ = "2021 Valory AG, 2019 Fetch.AI Limited"
25 changes: 25 additions & 0 deletions aea/helpers/ipfs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@
import hashlib
import io
import os
import platform
import re
from pathlib import Path
from typing import Any, Dict, Generator, Optional, Sized, Tuple, cast

import base58

from aea.helpers.cid import to_v1
from aea.helpers.io import open_file
from aea.helpers.ipfs.utils import _protobuf_python_implementation


Expand All @@ -41,12 +44,34 @@
from aea.helpers.ipfs.pb.merkledag_pb2 import PBNode # type: ignore


def _is_text(file_path: str) -> bool:
"""Check if a file can be read as text or not."""
try:
with open_file(file_path, "r") as f:
f.readline()
return True
except UnicodeDecodeError:
return False


def _dos2unix(file_content: bytes) -> bytes:
"""
Replace occurrences of Windows line terminator CR/LF with only LF.
:param file_content: the content of the file.
:return: the same content but with the line terminator
"""
return re.sub(b"\r\n", b"\n", file_content, flags=re.M)


def _read(file_path: str) -> bytes:
"""Read and verify the file is not empty."""
with open(file_path, "rb") as file:
data = file.read()
if len(data) == 0:
raise ValueError(f"File cannot be empty: {file_path}")
if platform.system() == "Windows" and _is_text(file_path=file_path):
data = _dos2unix(data)
return data


Expand Down
2 changes: 1 addition & 1 deletion deploy-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apk add --no-cache go

# aea installation
RUN pip install --upgrade pip
RUN pip install --upgrade --force-reinstall open-aea[all]==1.40.0 "open-aea-cli-ipfs<2.0.0,>=1.40.0"
RUN pip install --upgrade --force-reinstall open-aea[all]==1.41.0 "open-aea-cli-ipfs<2.0.0,>=1.41.0"

# directories and aea cli config
WORKDIR /home/agents
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The example uses the `fetchai/my_first_aea` project. You will likely want to mod
Install subversion, then download the example directory to your local working directory

``` bash
svn checkout https://github.com/valory-xyz/open-aea/tags/v1.40.0/packages packages
svn checkout https://github.com/valory-xyz/open-aea/tags/v1.41.0/packages packages
```

### Modify scripts
Expand Down
2 changes: 1 addition & 1 deletion develop-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Swap the following lines if you want to work with 'latest'
DOCKER_IMAGE_TAG=valory/open-aea-develop:1.40.0
DOCKER_IMAGE_TAG=valory/open-aea-develop:1.41.0
# DOCKER_IMAGE_TAG=valory/open-aea-develop:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down
2 changes: 1 addition & 1 deletion docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Below we describe the additional manual steps required to upgrade between differ

### Upgrade guide

## `v1.40.0` to `v1.40.1`
## `v1.40.0` to `v1.41.0`

- The way the dependencies will be selected for installation when running `aea install` has changed. Before this version, the versions were being merging all of the versions for a python package and using the most compatible version specifier possible. With this release, this behaviour will be replaced by overriding the dependencies in the following order `extra dependencies provided by flag > agent > skill > connection > contract > protocol` what this means is, let's say you have 3 packages with a same python package as a dependency

Expand Down
2 changes: 1 addition & 1 deletion examples/tac_deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apk add --no-cache go

# aea installation
RUN python -m pip install --upgrade pip
RUN pip install --upgrade --force-reinstall open-aea[all]==1.40.0
RUN pip install --upgrade --force-reinstall open-aea[all]==1.41.0

# directories and aea cli config
COPY /.aea /home/.aea
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-cli-benchmark/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="open-aea-cli-benchmark",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="CLI extension for AEA framework benchmarking.",
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-cli-ipfs/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

setup(
name="open-aea-cli-ipfs",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="CLI extension for open AEA framework wrapping IPFS functionality.",
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-ledger-cosmos/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="open-aea-ledger-cosmos",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger api of Cosmos.",
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-ledger-ethereum-flashbots/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="open-aea-ledger-ethereum-flashbots",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="Python package extending the default open-aea ethereum ledger plugin to add support for flashbots.",
Expand All @@ -41,7 +41,7 @@
},
python_requires=">=3.9,<4.0",
install_requires=[
"open-aea-ledger-ethereum~=1.40.0",
"open-aea-ledger-ethereum~=1.41.0",
"open-aea-flashbots==1.4.0",
],
tests_require=["pytest"],
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-ledger-ethereum-hwi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="open-aea-ledger-ethereum-hwi",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and support for hardware wallet interactions.",
Expand All @@ -42,7 +42,7 @@
"web3>=6.0.0,<7",
"ipfshttpclient==0.8.0a2",
"eth-account>=0.8.0,<0.9.0",
"open-aea-ledger-ethereum~=1.40.0",
"open-aea-ledger-ethereum~=1.41.0",
"ledgerwallet==0.1.3",
"protobuf>=4.21.6,<5.0.0",
"construct<=2.10.61",
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-ledger-ethereum/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

setup(
name="open-aea-ledger-ethereum",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger api of Ethereum.",
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-ledger-fetchai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

setup(
name="open-aea-ledger-fetchai",
version="1.40.0",
version="1.41.0",
author="Valory AG",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger API of Fetch.AI.",
Expand All @@ -44,7 +44,7 @@
"test_tools/data/*",
]
},
install_requires=["open-aea-ledger-cosmos~=1.40.0"],
install_requires=["open-aea-ledger-cosmos~=1.41.0"],
tests_require=["pytest"],
entry_points={
"aea.cryptos": ["fetchai = aea_ledger_fetchai:FetchAICrypto"],
Expand Down
2 changes: 1 addition & 1 deletion plugins/aea-ledger-solana/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="open-aea-ledger-solana",
version="1.40.0",
version="1.41.0",
author="dassy23",
license="Apache-2.0",
description="Python package wrapping the public and private key cryptography and ledger api of solana.",
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function instal_choco_golang_gcc {
}
function install_aea {
echo "Install aea"
$output=pip install open-aea[all]==1.40.0 --force --no-cache-dir 2>&1 |out-string;
$output=pip install open-aea[all]==1.41.0 --force --no-cache-dir 2>&1 |out-string;
if ($LastExitCode -ne 0) {
echo $output
echo "AEA install failed!"
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function is_python_version_ok() {

function install_aea (){
echo "Install AEA"
output=$(pip3 install --user open-aea[all]==1.40.0 --force --no-cache-dir)
output=$(pip3 install --user open-aea[all]==1.41.0 --force --no-cache-dir)
if [[ $? -ne 0 ]];
then
echo "$output"
Expand Down
4 changes: 2 additions & 2 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
build:
tagPolicy:
envTemplate:
template: "1.40.0"
template: "1.41.0"
artifacts:
- image: valory/open-aea-develop
docker:
Expand All @@ -24,7 +24,7 @@ profiles:
build:
tagPolicy:
envTemplate:
template: "1.40.0"
template: "1.41.0"
artifacts:
- image: valory/open-aea-docs
docker:
Expand Down
2 changes: 1 addition & 1 deletion user-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV LANG C.UTF-8
RUN apt update && apt install -y python3.11-dev python3-pip -y && apt autoremove && apt autoclean

RUN pip3 install --upgrade pip
RUN pip3 install "open-aea[all]==1.40.0" open-aea-cli-ipfs==1.40.0
RUN pip3 install "open-aea[all]==1.41.0" open-aea-cli-ipfs==1.41.0

COPY user-image/openssl.cnf /etc/ssl

Expand Down
2 changes: 1 addition & 1 deletion user-image/docker-env.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Swap the following lines if you want to work with 'latest'
DOCKER_IMAGE_TAG=valory/open-aea-user:1.40.0
DOCKER_IMAGE_TAG=valory/open-aea-user:1.41.0
# DOCKER_IMAGE_TAG=valory/open-aea-user:latest

DOCKER_BUILD_CONTEXT_DIR=..
Expand Down

0 comments on commit 3a13325

Please sign in to comment.