Skip to content

Commit 6e4ba0c

Browse files
authored
Merge pull request #772 from valory-xyz/chore/macos-workflow
Upgrade macos in workflow
2 parents 436e63e + 98eb898 commit 6e4ba0c

File tree

121 files changed

+460
-404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+460
-404
lines changed

.github/workflows/workflow.yml

+22-22
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ jobs:
5252
- uses: actions/setup-python@v3
5353
with:
5454
python-version: "3.10"
55-
- uses: actions/setup-go@v3
55+
- uses: actions/setup-go@v5.2.0
5656
with:
57-
go-version: "1.17.7"
57+
go-version: '1.17.7'
5858
- name: Install dependencies (ubuntu-latest)
5959
run: |
6060
sudo apt-get update --fix-missing
@@ -112,9 +112,9 @@ jobs:
112112
- uses: actions/setup-python@v3
113113
with:
114114
python-version: "3.10"
115-
- uses: actions/setup-go@v3
115+
- uses: actions/setup-go@v5.2.0
116116
with:
117-
go-version: "1.17.7"
117+
go-version: '1.20.0'
118118
- name: Install dependencies (ubuntu-latest)
119119
run: |
120120
sudo apt-get update --fix-missing
@@ -228,9 +228,9 @@ jobs:
228228
- uses: actions/checkout@v3
229229
with:
230230
fetch-depth: 0
231-
- uses: actions/setup-go@v3
231+
- uses: actions/setup-go@v5.2.0
232232
with:
233-
go-version: "1.17.7"
233+
go-version: '1.20.0'
234234
- run: |
235235
wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \
236236
tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \
@@ -240,7 +240,7 @@ jobs:
240240
continue-on-error: False
241241
strategy:
242242
matrix:
243-
os: [ubuntu-latest, macos-14-large, windows-latest]
243+
os: [ubuntu-latest, macos-latest-large, windows-latest]
244244
python_version: ["3.10",]
245245
timeout-minutes: 10
246246
runs-on: ${{ matrix.os }}
@@ -271,7 +271,7 @@ jobs:
271271
sys:
272272
- { os: windows-latest, shell: "msys2 {0}" }
273273
- { os: ubuntu-latest, shell: bash }
274-
# - { os: macos-14-large, shell: bash }
274+
# - { os: macos-latest-large, shell: bash }
275275
python_version: ["3.10",]
276276
timeout-minutes: 15
277277
steps:
@@ -311,9 +311,9 @@ jobs:
311311
- uses: actions/setup-python@v3
312312
with:
313313
python-version: "3.10"
314-
- uses: actions/setup-go@v3
314+
- uses: actions/setup-go@v5.2.0
315315
with:
316-
go-version: "1.17.7"
316+
go-version: '1.20.0'
317317
- name: Install protolint (ubuntu-latest)
318318
run: |
319319
sudo apt-get update --fix-missing
@@ -339,9 +339,9 @@ jobs:
339339
- uses: actions/setup-python@v3
340340
with:
341341
python-version: "3.10"
342-
- uses: actions/setup-go@v3
342+
- uses: actions/setup-go@v5.2.0
343343
with:
344-
go-version: "1.17.7"
344+
go-version: '1.20.0'
345345
- name: Install dependencies (ubuntu-latest)
346346
run: |
347347
sudo apt-get update --fix-missing
@@ -376,9 +376,9 @@ jobs:
376376
- uses: actions/setup-python@v3
377377
with:
378378
python-version: "3.10"
379-
- uses: actions/setup-go@v3
379+
- uses: actions/setup-go@v5.2.0
380380
with:
381-
go-version: "1.17.7"
381+
go-version: '1.20.0'
382382
- name: Install dependencies (ubuntu-latest)
383383
run: |
384384
sudo apt-get update --fix-missing
@@ -433,17 +433,17 @@ jobs:
433433
runs-on: ${{ matrix.os }}
434434
strategy:
435435
matrix:
436-
os: [ubuntu-latest, windows-latest]
436+
os: [ubuntu-latest, macos-latest-large, windows-latest]
437437
python_version: ['3.8', '3.9', '3.10', '3.11']
438438
timeout-minutes: 120
439439
steps:
440440
- uses: actions/checkout@master
441441
- uses: actions/setup-python@v3
442442
with:
443443
python-version: ${{ matrix.python_version }}
444-
- uses: actions/setup-go@v3
444+
- uses: actions/setup-go@v5.2.0
445445
with:
446-
go-version: "1.17.7"
446+
go-version: '1.20.0'
447447
- if: matrix.os == 'ubuntu-latest'
448448
name: Install dependencies (ubuntu-latest)
449449
run: |
@@ -469,8 +469,8 @@ jobs:
469469
# sudo apt-get install -y protobuf-compiler
470470
# use sudo rm /var/lib/apt/lists/lock above in line above update if dependency install failures persist
471471
# use sudo apt-get dist-upgrade above in line below update if dependency install failures persist
472-
- if: matrix.os == 'macos-14-large'
473-
name: Install dependencies (macos-14-large)
472+
- if: matrix.os == 'macos-latest-large'
473+
name: Install dependencies (macos-latest-large)
474474
run: |
475475
pip install tomte[tox]==0.2.13
476476
brew install gcc
@@ -558,14 +558,14 @@ jobs:
558558
runs-on: ${{ matrix.os }}
559559
strategy:
560560
matrix:
561-
os: [ubuntu-latest, macos-14-large, windows-latest]
561+
os: [ubuntu-latest, macos-latest-large, windows-latest]
562562
python-version: ["3.10"]
563563
timeout-minutes: 45
564564
steps:
565565
- uses: actions/checkout@master
566566
- uses: actions/setup-python@v3
567567
with:
568568
python-version: ${{ matrix.python-version }}
569-
- uses: actions/setup-go@v3
569+
- uses: actions/setup-go@v5.2.0
570570
with:
571-
go-version: "1.17.7"
571+
go-version: '1.20.0'

aea/cli/check_packages.py

+38-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# ------------------------------------------------------------------------------
33
#
4-
# Copyright 2022-2024 Valory AG
4+
# Copyright 2022-2025 Valory AG
55
# Copyright 2018-2021 Fetch.AI Limited
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -361,45 +361,62 @@ def check_public_id(configuration_file: Path) -> None:
361361
content = module_path_to_load.read_text()
362362

363363
# check number of definitions of PUBLIC_ID. Required exactly one match.
364-
assignments_to_public_id = re.findall("^PUBLIC_ID = (.*)", content, re.MULTILINE)
364+
assignments_to_public_id = find_public_id_assignments(content)
365365
if len(assignments_to_public_id) != 1:
366366
raise PublicIdDefinitionError(
367367
package_type, expected_public_id, len(assignments_to_public_id)
368368
)
369369

370-
# check first pattern of public id: PublicId.from_str(...)
370+
# check for valid PUBLIC_ID patterns
371+
public_id_match = find_public_id_from_str(content)
372+
if public_id_match:
373+
if str(expected_public_id) != public_id_match:
374+
raise WrongPublicIdError(package_type, expected_public_id, public_id_match)
375+
return
376+
377+
public_id_components = find_public_id_components(content)
378+
if public_id_components:
379+
author, name, version = public_id_components
380+
actual_public_id_str = f"{author}/{name}:{version}"
381+
if str(expected_public_id) != actual_public_id_str:
382+
raise WrongPublicIdError(
383+
package_type, expected_public_id, actual_public_id_str
384+
)
385+
return
386+
387+
# if no valid pattern is found
388+
raise WrongPublicIdError(package_type, expected_public_id, content)
389+
390+
391+
def find_public_id_assignments(content: str) -> list:
392+
"""Find assignments to PUBLIC_ID."""
393+
return re.findall(r"^PUBLIC_ID = (.*)", content, re.MULTILINE)
394+
395+
396+
def find_public_id_from_str(content: str) -> Optional[str]:
397+
"""Find public_id using the `PublicId.from_str` pattern."""
371398
matches = re.findall(
372399
r"^PUBLIC_ID = PublicId.from_str\( *(\"(.*)\"|'(.*)') *\)$",
373400
content,
374401
re.MULTILINE,
375402
)
376403
if len(matches) == 1:
377-
# process the result
378404
_, match1, match2 = matches[0]
379-
match = match1 if match1 != "" else match2
380-
if str(expected_public_id) != match:
381-
raise WrongPublicIdError(package_type, expected_public_id, match)
382-
return
405+
# return the non-empty match
406+
return match1 or match2
407+
return None
383408

384-
# check second pattern of public id: PublicId('...', '...', '...')
409+
410+
def find_public_id_components(content: str) -> Optional[tuple]:
411+
"""Find public_id components using the `PublicId('...', '...', '...')` pattern."""
385412
matches = re.findall(
386413
r"^PUBLIC_ID = PublicId\( *['\"](.*)['\"] *, *['\"](.*)['\"] *, *['\"](.*)['\"] *\)$",
387414
content,
388415
re.MULTILINE,
389416
)
390417
if len(matches) == 1:
391-
# process the result
392-
author, name, version = matches[0]
393-
actual_public_id_str = f"{author}/{name}:{version}"
394-
if str(expected_public_id) != actual_public_id_str:
395-
raise WrongPublicIdError(
396-
package_type, expected_public_id, actual_public_id_str
397-
)
398-
return
399-
400-
public_id_code = matches[0]
401-
if str(expected_public_id) not in public_id_code:
402-
raise WrongPublicIdError(package_type, expected_public_id, public_id_code)
418+
return matches[0]
419+
return None
403420

404421

405422
class DependenciesTool:

aea/configurations/constants.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
# ------------------------------------------------------------------------------
33
#
4-
# Copyright 2021-2024 Valory AG
4+
# Copyright 2021-2025 Valory AG
55
# Copyright 2018-2020 Fetch.AI Limited
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,7 +30,7 @@
3030
_SOLANA_IDENTIFIER = "solana"
3131
SIGNING_PROTOCOL = "open_aea/signing:latest"
3232
SIGNING_PROTOCOL_WITH_HASH = (
33-
"open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi"
33+
"open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm"
3434
)
3535
DEFAULT_LEDGER = _ETHEREUM_IDENTIFIER
3636
PRIVATE_KEY_PATH_SCHEMA = "{}_private_key.txt"

deploy-image/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
# setup the agent
5-
aea fetch open_aea/my_first_aea:0.1.0:bafybeiaf6fgfmljz6pl7q6zfs3lhqmqbzydlqcen3qek5jjly77vhjowra --remote
5+
aea fetch open_aea/my_first_aea:0.1.0:bafybeiakpjbpsqbmgqdg6c36nhujqmk446u2qn7jvi2lefmnyxtmnv3tqe --remote
66
cd my_first_aea/
77
aea install
88
aea build

docs/agent-vs-aea.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ First, use an empty agent to get the stub connection and default protocol.
1111
mkdir packages # packages folder will contain the local package repository
1212
aea create my_aea # create an agent
1313
cd my_aea
14-
aea add connection fetchai/stub:0.21.0:bafybeibybboiwgklfiqpkkcw6rwj65s5jalzfzf6mh6fstxdlt6habzwvy --remote # get a connection from the remote registry
14+
aea add connection fetchai/stub:0.21.0:bafybeibqrgcch7dufgvzoxi43vxbbhx6isfn3njhq5q3eud6yhhyjdnthm --remote # get a connection from the remote registry
1515
aea push connection fetchai/stub --local # push to local registry
16-
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
16+
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
1717
aea push protocol fetchai/default --local
1818
cd ..
1919
aea delete my_aea # delete the agent

docs/build-aea-programmatically.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Get the needed packages from IPFS:
99
mkdir packages
1010
aea create my_aea
1111
cd my_aea
12-
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
12+
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
1313
aea push protocol fetchai/default --local
1414
cd ..
1515
aea delete my_aea

docs/decision-maker-transaction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ First, get the packages directory from IPFS:
66
mkdir packages
77
aea create my_aea
88
cd my_aea
9-
aea add protocol open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi --remote
9+
aea add protocol open_aea/signing:1.0.0:bafybeig2d36zxy65vd7fwhs7scotuktydcarm74aprmrb5nioiymr3yixm --remote
1010
aea push protocol open_aea/signing --local
1111
cd ..
1212
aea delete my_aea

docs/echo_demo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This demo assumes you have followed the setup guide.
77
The fastest way to have your first AEA is to fetch one that already exists!
88

99
``` bash
10-
aea fetch open_aea/my_first_aea:0.1.0:bafybeiaf6fgfmljz6pl7q6zfs3lhqmqbzydlqcen3qek5jjly77vhjowra --remote
10+
aea fetch open_aea/my_first_aea:0.1.0:bafybeiakpjbpsqbmgqdg6c36nhujqmk446u2qn7jvi2lefmnyxtmnv3tqe --remote
1111
cd my_first_aea
1212
```
1313
### Install AEA dependencies

docs/gym-skill.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Follow the <a href="../quickstart/#preliminaries">Preliminaries</a> and <a href=
1919

2020
First, fetch the gym AEA:
2121
``` bash
22-
aea fetch open_aea/gym_aea:0.1.0:bafybeietomk7c6dn6gvgix4s3jfzbrqjqzday6lofbk7wmkczhtgrijvmy --remote
22+
aea fetch open_aea/gym_aea:0.1.0:bafybeifb6ldx7mvgqo7c6blusile4rvneiw3uxjvy2vxcgn7v4pw3la5xu --remote
2323
cd gym_aea
2424
aea install
2525
```
@@ -36,7 +36,7 @@ cd my_gym_aea
3636

3737
### Add the gym skill
3838
``` bash
39-
aea add skill fetchai/gym:0.20.0:bafybeie7y2fsxfuhsqxqcaluo5exskmrm5q3a6e2hfcskcuvzvxjjhijh4 --remote
39+
aea add skill fetchai/gym:0.20.0:bafybeih27hdrpzjz2fp5u2n7mgyrqqk3cyuempiixn6ptkkztvld7d4jhe --remote
4040
```
4141

4242
### Set gym connection as default

docs/http-connection-and-skill.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Add the http server connection package:
2929
mkdir packages
3030
aea create my_aea
3131
cd my_aea
32-
aea add connection valory/http_server:0.22.0:bafybeihpgu56ovmq4npazdbh6y6ru5i7zuv6wvdglpxavsckyih56smu7m --remote
32+
aea add connection valory/http_server:0.22.0:bafybeic3jpkum7g6qo6x6vdrmvvhj7vqw7ec2op72uc3yfhmnlp5hn3joy --remote
3333
aea push connection valory/http_server --local
34-
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
34+
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
3535
aea push protocol fetchai/default --local
36-
aea add protocol valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae --remote
36+
aea add protocol valory/http:1.0.0:bafybeih4azmfwtamdbkhztkm4xitep3gx6tfdnoz6tvllmaqnhu3klejfa --remote
3737
aea push protocol valory/http --local
3838
cd ..
3939
aea delete my_aea

docs/http-echo-demo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The easiest way to get started with the http server is to use our pre-built exam
1616

1717
``` bash
1818
pipenv shell
19-
aea fetch open_aea/http_echo:0.1.0:bafybeigeufwgu6cxjcvxsks2j4mjk6kir7vnjgr2wfbytqlztqezkzijwy --remote
19+
aea fetch open_aea/http_echo:0.1.0:bafybeic2zpk3epl4mnkrufl22u5wtiohitgab5otcjruhpqiicsijp3jem --remote
2020
cd http_echo
2121
aea generate-key ethereum; aea add-key ethereum
2222
aea install

docs/ipfs_registry.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Packages can be downloaded using both extended public ids and hashes
3838

3939
Add the signing protocol using
4040

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

4343
Or
4444

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

4747
## Publishing agents
4848

docs/multiplexer-standalone.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ First, get the required packages from IPFS.
66
mkdir packages
77
aea create my_aea
88
cd my_aea
9-
aea add protocol fetchai/default:1.0.0:bafybeihdvtmnz7fzy7kwi3wlo6rfl27f6q3g5entplgvq7y23i3v5uoz24 --remote
9+
aea add protocol fetchai/default:1.0.0:bafybeiaf3qhrdttthrisrl2tlpt3mpo5btkozw2dnxlj4cbqq56ilcl6oa --remote
1010
aea push connection fetchai/default --local
11-
aea add connection fetchai/stub:0.21.0:bafybeibybboiwgklfiqpkkcw6rwj65s5jalzfzf6mh6fstxdlt6habzwvy --remote
11+
aea add connection fetchai/stub:0.21.0:bafybeibqrgcch7dufgvzoxi43vxbbhx6isfn3njhq5q3eud6yhhyjdnthm --remote
1212
aea push connection fetchai/stub --local
1313
cd ..
1414
aea delete my_aea

docs/p2p-connection.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Create one AEA as follows:
2626
``` bash
2727
aea create my_genesis_aea
2828
cd my_genesis_aea
29-
aea add connection valory/p2p_libp2p:0.1.0:bafybeihmzdqkdukajnw4fjvkrgsyanrwxnuptlzbaxof7zfq7suvk5fknq --remote
29+
aea add connection valory/p2p_libp2p:0.1.0:bafybeig2atkjnrz7lsboubaque567ndtzog6k53dnmrrq3eeqgbqmmcq5y --remote
3030
aea config set agent.default_connection valory/p2p_libp2p:0.1.0
3131
aea install
3232
aea build
@@ -58,7 +58,7 @@ Create a second AEA:
5858
``` bash
5959
aea create my_other_aea
6060
cd my_other_aea
61-
aea add connection valory/p2p_libp2p:0.1.0:bafybeihmzdqkdukajnw4fjvkrgsyanrwxnuptlzbaxof7zfq7suvk5fknq --remote
61+
aea add connection valory/p2p_libp2p:0.1.0:bafybeig2atkjnrz7lsboubaque567ndtzog6k53dnmrrq3eeqgbqmmcq5y --remote
6262
aea config set agent.default_connection valory/p2p_libp2p:0.1.0
6363
aea install
6464
aea build

0 commit comments

Comments
 (0)