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

Fix/timeouts #238

Merged
merged 16 commits into from
Jul 19, 2024
68 changes: 22 additions & 46 deletions .github/workflows/common_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.10" ]
poetry-version: ["1.3.2"]
timeout-minutes: 10
poetry-version: ["1.4.0"]

defaults:
run:
shell: bash

timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -51,21 +54,16 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox,cli]==0.2.15
pip install --user --upgrade setuptools
run: pip install tomte[tox,cli]==0.2.14
- name: Check copyright headers
run: tomte check-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription
run: tomte check-copyright --author valory --exclude-part abci --exclude-part http_client --exclude-part ipfs --exclude-part ledger --exclude-part p2p_libp2p_client --exclude-part gnosis_safe --exclude-part gnosis_safe_proxy_factory --exclude-part multisend --exclude-part service_registry --exclude-part protocols --exclude-part abstract_abci --exclude-part abstract_round_abci --exclude-part registration_abci --exclude-part reset_pause_abci --exclude-part termination_abci --exclude-part transaction_settlement_abci --exclude-part websocket_client --exclude-part contract_subscription --exclude-part mech --exclude-part mech_interact_abci --exclude-part http_server
- name: License compatibility check
run: tox -e liccheck
# TODO: reactivate once false positives are fixed
Expand All @@ -88,41 +86,20 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-go@v3
with:
go-version: "1.17.7"
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox,cli]==0.2.15
pip install --user --upgrade setuptools

# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v24.3/protoc-24.3-linux-x86_64.zip
unzip protoc-24.3-linux-x86_64.zip -d protoc
sudo mv protoc/bin/protoc /usr/local/bin/protoc

# install IPFS
sudo apt-get install -y wget
wget -O ./go-ipfs.tar.gz https://dist.ipfs.io/go-ipfs/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz
tar xvfz go-ipfs.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
ipfs init
pip install tomte[tox,cli]==0.2.17

# Install `mdspell` for spelling checks
sudo npm install -g markdown-spellcheck
make protolint_install

- name: Check generate protocols
run: echo "Skipped..." # tox -e check-generate-all-protocols
- name: Security checks
run: tomte check-security
# TODO: tomte check-security
run: echo "Skipped until service is bumped"
- name: Check packages
run: tox -e check-packages
- name: Check hash
Expand All @@ -135,9 +112,8 @@ jobs:
run: |
tox -e check-abci-docstrings
tox -e check-abciapp-specs
# tox -e check-handlers
# ignore for now due to https://github.com/valory-xyz/open-autonomy/issues/1988
# tox -e analyse-service
tox -e check-handlers
tox -e analyse-service

scan:
name: gitleaks
Expand All @@ -146,18 +122,18 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: "1.17.7"
- 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 && \
sudo install gitleaks /usr/bin && \
gitleaks detect --report-format json --report-path leak_report -v

tools_checks:
environment: 'ci'
continue-on-error: False
test:
continue-on-error: True
needs:
- lock_check
- copyright_and_dependencies_check
- linter_checks
runs-on: ${{ matrix.os }}

strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,4 @@ c73b5d88fe1a364d7b1168b3ad171da59e7a2eac:packages/valory/protocols/websocket_cli
3a080091883863f5b62d1dcfe030ec7577889f8c:packages/valory/skills/task_execution/skill.yaml:generic-api-key:15
eecbf34a242377fb07d28230cf11ea43fb07de8d:packages/valory/skills/task_execution/skill.yaml:generic-api-key:15
d7f9fd6ad8bcf9ea2bf14bf3de221971ddb56268:packages/valory/skills/task_execution/skill.yaml:generic-api-key:15
c0dee637e3d520b9706e91db197e859ca5fce23a:packages/valory/skills/task_execution/skill.yaml:generic-api-key:15
4 changes: 3 additions & 1 deletion packages/gnosis/customs/omen_tools/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
pydantic:
version: '>=1.9.0,<3'
prediction-market-agent-tooling:
version: '^0.39.0'
version: '>=0.39.0,<0.40.0'
langchain:
version: ==0.1.20
langchain-core:
Expand All @@ -27,3 +27,5 @@ dependencies:
version: ==0.2.1
openai:
version: ==1.30.2
web3:
version: <7,>=6.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeibbn67pnrrm4qm3n3kbelvbs3v7fjlrjniywmw2vbizarippidtvi
prediction_sum_url_content.py: bafybeieywowx265yycgf5735bw4zyabfy6ivwnntl6smxa2hicktipgeby
prediction_sum_url_content.py: bafybeig3kioqilxhnxw7pbtq5kj7osjgggexvkpnjewixfuuzeojww32jy
fingerprint_ignore_patterns: []
entry_point: prediction_sum_url_content.py
callable: run
Expand Down Expand Up @@ -43,3 +43,5 @@ dependencies:
version: ==4.12.2
spacy:
version: ==3.7.2
anthropic:
version: ==0.21.3
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeibt7f7crtwvmkg7spy3jhscmlqltvyblzp32g6gj44v7tlo5lycuq
prediction_request_rag.py: bafybeicz56wjrxavm4iwkuh7x7wbk5eiviavnikyf334u7z7cmr3mrhe4i
prediction_request_rag.py: bafybeif7t3bdvztc5eszabbc6ywabfvodqqbkr7cfbzjnasr5dpl75bqzq
fingerprint_ignore_patterns: []
entry_point: prediction_request_rag.py
callable: run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeiekjzoy2haayvkiwhb2u2epflpqxticud34mma3gdhfzgu36lxwiq
prediction_request_rag_cohere.py: bafybeigusvetxjp37yzrpracrmtfai4lhcsktlzy5yimjissw7cgxhr6rm
prediction_request_rag_cohere.py: bafybeicfhkjsor4d7mv3uacddyfor4e2x6742hqc5sihpwmus6ploylofq
fingerprint_ignore_patterns: []
entry_point: prediction_request_rag_cohere.py
callable: run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeib36ew6vbztldut5xayk5553rylrq7yv4cpqyhwc5ktvd4cx67vwu
prediction_request_reasoning.py: bafybeiggh5wuwqr6ggoeug6vng7uzuzjup5n46vrryrkxczpqeioadajhm
prediction_request_reasoning.py: bafybeihegrezgrsqxkbqjqrze2tzxozioomc5sepb7mwkirkazwtrr3jky
fingerprint_ignore_patterns: []
entry_point: prediction_request_reasoning.py
callable: run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
4 changes: 3 additions & 1 deletion packages/napthaai/customs/prediction_url_cot/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeiflni5dkn5fqe7fnu4lgbqxzfrgochhqfbgzwz3vlf5grijp3nkpm
prediction_url_cot.py: bafybeieaw7thcrzybrxegygkoampyj4xqggyji7enfgm6xi4ca6yp6jsui
prediction_url_cot.py: bafybeie4psenokmw52srxs5h3do5bfzczkdb4uxh5ree2ac4c57pxkntee
fingerprint_ignore_patterns: []
entry_point: prediction_url_cot.py
callable: run
Expand All @@ -33,3 +33,5 @@ dependencies:
version: '>=1.19.0'
pydantic:
version: '>=1.9.0,<3'
openai:
version: ==1.30.2
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeib36ew6vbztldut5xayk5553rylrq7yv4cpqyhwc5ktvd4cx67vwu
resolve_market_reasoning.py: bafybeifouismth2zg4upbxyt5kgtukvt2foah53nwvymvybe3kr3pw52ou
resolve_market_reasoning.py: bafybeid2265b6pualrczx6cm3sre5pc3cl5fwompsgwwoiwmffoxgvuzsu
fingerprint_ignore_patterns: []
entry_point: resolve_market_reasoning.py
callable: run
Expand Down Expand Up @@ -37,3 +37,5 @@ dependencies:
version: ==3.0.1
numpy:
version: '>=1.19.0'
anthropic:
version: ==0.21.3
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeibbn67pnrrm4qm3n3kbelvbs3v7fjlrjniywmw2vbizarippidtvi
prediction_request_sme.py: bafybeicrc5ljljdpv53f75ubmbryjehlqpt5tfsorgsyujexzm5zi34dhe
prediction_request_sme.py: bafybeigfn66axfnuah6azt5j35scsvhz3dpx6azkigv4jiotgq2vglug5q
fingerprint_ignore_patterns: []
entry_point: prediction_request_sme.py
callable: run
Expand All @@ -28,3 +28,5 @@ dependencies:
version: ==0.11.6
openai:
version: ==1.30.2
anthropic:
version: ==0.21.3
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ dependencies:
version: ==0.11.6
openai:
version: ==1.11.0
anthropic:
version: ==0.21.3
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeibbn67pnrrm4qm3n3kbelvbs3v7fjlrjniywmw2vbizarippidtvi
sme_generation_request.py: bafybeib2isi426675grx5gl73l6jwcfwamkrpfjwgtlwynemolkz3iip5e
sme_generation_request.py: bafybeiggzdmha57g5lizljw2cgmsafwjaid7sc4dstjkuiwjvyimt4u4eq
fingerprint_ignore_patterns: []
entry_point: sme_generation_request.py
callable: run
Expand All @@ -18,3 +18,7 @@ dependencies:
requests: {}
tiktoken:
version: ==0.7.0
anthropic:
version: ==0.21.3
google-api-python-client:
version: ==2.95.0
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def execute() -> MechResponse:
service = "google_api_key"
if retries_left[service] <= 0:
raise e
retries_left[service] -= 1
api_keys.rotate(service)
return execute()
except Exception as e:
Expand Down
Loading
Loading