Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade macos in workflow #772

Merged
merged 9 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.17.7'
- name: Install dependencies (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
Expand Down Expand Up @@ -112,9 +112,9 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
- name: Install dependencies (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
Expand Down Expand Up @@ -228,9 +228,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
- run: |
wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \
tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \
Expand All @@ -240,7 +240,7 @@ jobs:
continue-on-error: False
strategy:
matrix:
os: [ubuntu-latest, macos-14-large, windows-latest]
os: [ubuntu-latest, macos-latest-large, windows-latest]
python_version: ["3.10",]
timeout-minutes: 10
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
sys:
- { os: windows-latest, shell: "msys2 {0}" }
- { os: ubuntu-latest, shell: bash }
# - { os: macos-14-large, shell: bash }
# - { os: macos-latest-large, shell: bash }
python_version: ["3.10",]
timeout-minutes: 15
steps:
Expand Down Expand Up @@ -311,9 +311,9 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
- name: Install protolint (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
Expand All @@ -339,9 +339,9 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
- name: Install dependencies (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
Expand Down Expand Up @@ -376,9 +376,9 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
- name: Install dependencies (ubuntu-latest)
run: |
sudo apt-get update --fix-missing
Expand Down Expand Up @@ -433,17 +433,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, macos-latest-large, windows-latest]
python_version: ['3.8', '3.9', '3.10', '3.11']
timeout-minutes: 120
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python_version }}
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
- if: matrix.os == 'ubuntu-latest'
name: Install dependencies (ubuntu-latest)
run: |
Expand All @@ -469,8 +469,8 @@ jobs:
# sudo apt-get install -y protobuf-compiler
# 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-14-large'
name: Install dependencies (macos-14-large)
- if: matrix.os == 'macos-latest-large'
name: Install dependencies (macos-latest-large)
run: |
pip install tomte[tox]==0.2.13
brew install gcc
Expand Down Expand Up @@ -558,14 +558,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14-large, windows-latest]
os: [ubuntu-latest, macos-latest-large, windows-latest]
python-version: ["3.10"]
timeout-minutes: 45
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5.2.0
with:
go-version: "1.17.7"
go-version: '1.20.0'
59 changes: 38 additions & 21 deletions aea/cli/check_packages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022-2024 Valory AG
# Copyright 2022-2025 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -361,45 +361,62 @@ def check_public_id(configuration_file: Path) -> None:
content = module_path_to_load.read_text()

# check number of definitions of PUBLIC_ID. Required exactly one match.
assignments_to_public_id = re.findall("^PUBLIC_ID = (.*)", content, re.MULTILINE)
assignments_to_public_id = find_public_id_assignments(content)
if len(assignments_to_public_id) != 1:
raise PublicIdDefinitionError(
package_type, expected_public_id, len(assignments_to_public_id)
)

# check first pattern of public id: PublicId.from_str(...)
# check for valid PUBLIC_ID patterns
public_id_match = find_public_id_from_str(content)
if public_id_match:
if str(expected_public_id) != public_id_match:
raise WrongPublicIdError(package_type, expected_public_id, public_id_match)
return

public_id_components = find_public_id_components(content)
if public_id_components:
author, name, version = public_id_components
actual_public_id_str = f"{author}/{name}:{version}"
if str(expected_public_id) != actual_public_id_str:
raise WrongPublicIdError(
package_type, expected_public_id, actual_public_id_str
)
return

# if no valid pattern is found
raise WrongPublicIdError(package_type, expected_public_id, content)


def find_public_id_assignments(content: str) -> list:
"""Find assignments to PUBLIC_ID."""
return re.findall(r"^PUBLIC_ID = (.*)", content, re.MULTILINE)


def find_public_id_from_str(content: str) -> Optional[str]:
"""Find public_id using the `PublicId.from_str` pattern."""
matches = re.findall(
r"^PUBLIC_ID = PublicId.from_str\( *(\"(.*)\"|'(.*)') *\)$",
content,
re.MULTILINE,
)
if len(matches) == 1:
# process the result
_, match1, match2 = matches[0]
match = match1 if match1 != "" else match2
if str(expected_public_id) != match:
raise WrongPublicIdError(package_type, expected_public_id, match)
return
# return the non-empty match
return match1 or match2
return None

# check second pattern of public id: PublicId('...', '...', '...')

def find_public_id_components(content: str) -> Optional[tuple]:
"""Find public_id components using the `PublicId('...', '...', '...')` pattern."""
matches = re.findall(
r"^PUBLIC_ID = PublicId\( *['\"](.*)['\"] *, *['\"](.*)['\"] *, *['\"](.*)['\"] *\)$",
content,
re.MULTILINE,
)
if len(matches) == 1:
# process the result
author, name, version = matches[0]
actual_public_id_str = f"{author}/{name}:{version}"
if str(expected_public_id) != actual_public_id_str:
raise WrongPublicIdError(
package_type, expected_public_id, actual_public_id_str
)
return

public_id_code = matches[0]
if str(expected_public_id) not in public_id_code:
raise WrongPublicIdError(package_type, expected_public_id, public_id_code)
return matches[0]
return None


class DependenciesTool:
Expand Down
4 changes: 2 additions & 2 deletions aea/configurations/constants.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021-2024 Valory AG
# Copyright 2021-2025 Valory AG
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -30,7 +30,7 @@
_SOLANA_IDENTIFIER = "solana"
SIGNING_PROTOCOL = "open_aea/signing:latest"
SIGNING_PROTOCOL_WITH_HASH = (
"open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi"
"open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm"
)
DEFAULT_LEDGER = _ETHEREUM_IDENTIFIER
PRIVATE_KEY_PATH_SCHEMA = "{}_private_key.txt"
Expand Down
2 changes: 1 addition & 1 deletion deploy-image/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# setup the agent
aea fetch open_aea/my_first_aea:0.1.0:bafybeiaf6fgfmljz6pl7q6zfs3lhqmqbzydlqcen3qek5jjly77vhjowra --remote
aea fetch open_aea/my_first_aea:0.1.0:bafybeiakpjbpsqbmgqdg6c36nhujqmk446u2qn7jvi2lefmnyxtmnv3tqe --remote
cd my_first_aea/
aea install
aea build
4 changes: 2 additions & 2 deletions docs/agent-vs-aea.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ First, use an empty agent to get the stub connection and default protocol.
mkdir packages # packages folder will contain the local package repository
aea create my_aea # create an agent
cd my_aea
aea add connection fetchai/stub:0.21.0:bafybeibybboiwgklfiqpkkcw6rwj65s5jalzfzf6mh6fstxdlt6habzwvy --remote # get a connection from the remote registry
aea add connection fetchai/stub:0.21.0:bafybeibqrgcch7dufgvzoxi43vxbbhx6isfn3njhq5q3eud6yhhyjdnthm --remote # get a connection from the remote registry
aea push connection fetchai/stub --local # push to local registry
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
aea push protocol fetchai/default --local
cd ..
aea delete my_aea # delete the agent
Expand Down
2 changes: 1 addition & 1 deletion docs/build-aea-programmatically.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Get the needed packages from IPFS:
mkdir packages
aea create my_aea
cd my_aea
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
aea push protocol fetchai/default --local
cd ..
aea delete my_aea
Expand Down
2 changes: 1 addition & 1 deletion docs/decision-maker-transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ First, get the packages directory from IPFS:
mkdir packages
aea create my_aea
cd my_aea
aea add protocol open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi --remote
aea add protocol open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm --remote
aea push protocol open_aea/signing --local
cd ..
aea delete my_aea
Expand Down
2 changes: 1 addition & 1 deletion docs/echo_demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This demo assumes you have followed the setup guide.
The fastest way to have your first AEA is to fetch one that already exists!

``` bash
aea fetch open_aea/my_first_aea:0.1.0:bafybeiaf6fgfmljz6pl7q6zfs3lhqmqbzydlqcen3qek5jjly77vhjowra --remote
aea fetch open_aea/my_first_aea:0.1.0:bafybeiakpjbpsqbmgqdg6c36nhujqmk446u2qn7jvi2lefmnyxtmnv3tqe --remote
cd my_first_aea
```
### Install AEA dependencies
Expand Down
4 changes: 2 additions & 2 deletions docs/gym-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Follow the <a href="../quickstart/#preliminaries">Preliminaries</a> and <a href=

First, fetch the gym AEA:
``` bash
aea fetch open_aea/gym_aea:0.1.0:bafybeietomk7c6dn6gvgix4s3jfzbrqjqzday6lofbk7wmkczhtgrijvmy --remote
aea fetch open_aea/gym_aea:0.1.0:bafybeifb6ldx7mvgqo7c6blusile4rvneiw3uxjvy2vxcgn7v4pw3la5xu --remote
cd gym_aea
aea install
```
Expand All @@ -36,7 +36,7 @@ cd my_gym_aea

### Add the gym skill
``` bash
aea add skill fetchai/gym:0.20.0:bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4 --remote
aea add skill fetchai/gym:0.20.0:bafybeih27hdrpzjz2fp5u2n7mgyrqqk3cyuempiixn6ptkkztvld7d4jhe --remote
```

### Set gym connection as default
Expand Down
6 changes: 3 additions & 3 deletions docs/http-connection-and-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ Add the http server connection package:
mkdir packages
aea create my_aea
cd my_aea
aea add connection valory/http_server:0.22.0:bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m --remote
aea add connection valory/http_server:0.22.0:bafybeic3jpkum7g6qo6x6vdrmvvhj7vqw7ec2op72uc3yfhmnlp5hn3joy --remote
aea push connection valory/http_server --local
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
aea push protocol fetchai/default --local
aea add protocol valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae --remote
aea add protocol valory/http:1.0.0:bafybeih4azmfwtamdbkhztkm4xitep3gx6tfdnoz6tvllmaqnhu3klejfa --remote
aea push protocol valory/http --local
cd ..
aea delete my_aea
Expand Down
2 changes: 1 addition & 1 deletion docs/http-echo-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The easiest way to get started with the http server is to use our pre-built exam

``` bash
pipenv shell
aea fetch open_aea/http_echo:0.1.0:bafybeigeufwgu6cxjcvxsks2j4mjk6kir7vnjgr2wfbytqlztqezkzijwy --remote
aea fetch open_aea/http_echo:0.1.0:bafybeic2zpk3epl4mnkrufl22u5wtiohitgab5otcjruhpqiicsijp3jem --remote
cd http_echo
aea generate-key ethereum; aea add-key ethereum
aea install
Expand Down
4 changes: 2 additions & 2 deletions docs/ipfs_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ Packages can be downloaded using both extended public ids and hashes

Add the signing protocol using

`aea add protocol open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi --remote`
`aea add protocol open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm --remote`

Or

`aea add protocol open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi --remote`
`aea add protocol open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm --remote`

## Publishing agents

Expand Down
4 changes: 2 additions & 2 deletions docs/multiplexer-standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ First, get the required packages from IPFS.
mkdir packages
aea create my_aea
cd my_aea
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
aea push connection fetchai/default --local
aea add connection fetchai/stub:0.21.0:bafybeibybboiwgklfiqpkkcw6rwj65s5jalzfzf6mh6fstxdlt6habzwvy --remote
aea add connection fetchai/stub:0.21.0:bafybeibqrgcch7dufgvzoxi43vxbbhx6isfn3njhq5q3eud6yhhyjdnthm --remote
aea push connection fetchai/stub --local
cd ..
aea delete my_aea
Expand Down
4 changes: 2 additions & 2 deletions docs/p2p-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Create one AEA as follows:
``` bash
aea create my_genesis_aea
cd my_genesis_aea
aea add connection valory/p2p_libp2p:0.1.0:bafybeihmzdqkdukajnw4fjvkrgsyanrwxnuptlzbaxof7zfq7suvk5fknq --remote
aea add connection valory/p2p_libp2p:0.1.0:bafybeig2atkjnrz7lsboubaque567ndtzog6k53dnmrrq3eeqgbqmmcq5y --remote
aea config set agent.default_connection valory/p2p_libp2p:0.1.0
aea install
aea build
Expand Down Expand Up @@ -58,7 +58,7 @@ Create a second AEA:
``` bash
aea create my_other_aea
cd my_other_aea
aea add connection valory/p2p_libp2p:0.1.0:bafybeihmzdqkdukajnw4fjvkrgsyanrwxnuptlzbaxof7zfq7suvk5fknq --remote
aea add connection valory/p2p_libp2p:0.1.0:bafybeig2atkjnrz7lsboubaque567ndtzog6k53dnmrrq3eeqgbqmmcq5y --remote
aea config set agent.default_connection valory/p2p_libp2p:0.1.0
aea install
aea build
Expand Down
Loading
Loading