Skip to content

Commit

Permalink
Merge pull request #107 from valory-xyz/chore/cleanup
Browse files Browse the repository at this point in the history
Clean up the repo
  • Loading branch information
Adamantios authored May 31, 2023
2 parents ebccdc8 + 1311fa1 commit 397e178
Show file tree
Hide file tree
Showing 22 changed files with 318 additions and 951 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/main_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.4
pip install tomte[tox,cli]==0.2.12
pip install --upgrade setuptools==60.10.0
- name: Check copyright headers
run: tox -e check-copyright
run: tomte check-copyright --author balancer
- name: License compatibility check
run: tox -e liccheck
- name: Check doc links and IPFS hashes
run: tox -e check-doc-links-hashes
- name: Check doc links
run: tomte check-doc-links
- name: Check doc IPFS hashes
run: tox -e check-doc-hashes

linter_checks:
continue-on-error: False
Expand All @@ -87,7 +89,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.4
pip install tomte[tox,cli]==0.2.12
pip install --upgrade setuptools==60.10.0
# install Protobuf compiler
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
Expand All @@ -101,27 +103,17 @@ jobs:
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
ipfs init
- name: Security checks
run: |
tox -e bandit
tox -e safety
run: tomte check-security
- name: Check packages
run: tox -e check-packages
- name: Check FSM Spec
run: tox -e check-abciapp-specs
- name: Check hash
run: tox -e check-hash
- name: Code style check
run: |
tox -e black-check
tox -e isort-check
tox -e flake8
tox -e darglint
- name: Static type check
run: tox -e mypy
- name: Pylint
run: tox -e pylint
- name: Code checks
run: tomte check-code
- name: Check spelling
run: tox -e spell-check
run: tomte check-spelling

scan:
name: gitleaks
Expand Down Expand Up @@ -169,7 +161,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.4
pip install tomte[tox]==0.2.12
pip install --upgrade setuptools==60.10.0
# install Protobuf compiler
Expand Down Expand Up @@ -202,7 +194,7 @@ jobs:
- if: matrix.os == 'macos-latest'
name: Install dependencies (macos-latest)
run: |
pip install tomte[tox]==0.2.4
pip install tomte[tox]==0.2.12
brew install gcc
# brew install protobuf
# brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/72457f0166d5619a83f508f2345b22d0617b5021/Formula/protobuf.rb
Expand Down Expand Up @@ -239,7 +231,7 @@ jobs:
choco install make -y
# to check make was installed
make --version
pip install tomte[tox]==0.2.4
pip install tomte[tox]==0.2.12
# wget https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip
# unzip protoc-3.19.4-win64.zip -d protoc
# sudo mv protoc/bin/protoc /usr/local/bin/protoc
Expand Down Expand Up @@ -288,7 +280,7 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
pip install tomte[tox]==0.2.4
pip install tomte[tox]==0.2.12
pip install --upgrade setuptools==60.10.0
# install Protobuf compiler
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release History - `Autonomous Fund`

## (TBD)
- Bumps to `[email protected]` and cleans up the repo #107

## 0.6.3 (2023-05-29)
- Bumps `open-aea` and `open-autonomy` frameworks to `v1.34.0` and `v0.10.5.post1` correspondingly #106

Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ clean-test:
# black: format files according to the pep standards
.PHONY: formatters
formatters:
tox -e isort
tox -e black
tomte format-code

# black-check: check code style
# isort-check: check for import order
Expand All @@ -53,27 +52,30 @@ formatters:
# darglint: docstring linter
.PHONY: code-checks
code-checks:
tox -p -e black-check -e isort-check -e flake8 -e mypy -e pylint -e darglint
tomte check-code

# safety: checks dependencies for known security vulnerabilities
# bandit: security linter
.PHONY: security
security:
tox -p -e safety -e bandit
tomte check-security
gitleaks detect --report-format json --report-path leak_report

# generate latest abci docstrings
# generate latest hashes for updated packages
# update copyright headers
.PHONY: generators
generators:
tox -e abci-docstrings
tox -e fix-copyright
tomte format-copyright --author balancer
autonomy hash all
autonomy packages lock

.PHONY: common-checks-1
common-checks-1:
tox -p -e check-copyright -e check-hash -e check-packages
tomte check-copyright --author balancer
tomte check-doc-links
tox -p -e check-hash -e check-packages -e check-doc-hashes

.PHONY: test
test:
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ open-aea-ledger-cosmos = "==1.34.0"
open-aea-cli-ipfs = "==1.34.0"
open-aea-test-autonomy = "==0.10.5.post1"
open-autonomy = {version = "==0.10.5.post1", extras = ["all"]}
tomte = {version = "==0.2.4", extras = ["tox", "tests"]}
tomte = {version = "==0.2.12", extras = ["cli", "tests"]}

[requires]
python_version = "3.10"
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In order to run a local demo based on the SMPKit:
2. Fetch the Smart Managed Pools service.

```bash
autonomy fetch balancer/autonomous_fund_goerli:0.1.0:bafybeia2jxoqj3l7oxuazitlingy5wzat6qacvzfsdslgow7a4sswm22ue --service
autonomy fetch balancer/autonomous_fund_goerli:0.1.0:bafybeievjazzdjqv47z5jt3iaw423bqdgbe3tc5dzulwlokyx6v47zdpea --service
```

3. Build the Docker image of the service agents
Expand Down
106 changes: 0 additions & 106 deletions liccheck.ini

This file was deleted.

4 changes: 2 additions & 2 deletions packages/balancer/agents/autonomous_fund/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ protocols:
- open_aea/signing:1.0.0:bafybeibqlfmikg5hk4phzak6gqzhpkt6akckx7xppbp53mvwt6r73h7tk4
- valory/ipfs:0.1.0:bafybeic72ncgqbzoz2guj4p4yjqulid7mv6yroeh65hxznloamoveeg7hq
skills:
- balancer/autonomous_fund_abci:0.1.0:bafybeicbx53zdczmnio3hyrjnaytyacczimxx3oopqnhkxx3ywfbe3b3k4
- balancer/fear_and_greed_oracle_abci:0.1.0:bafybeiao62xpueyq3bw4ftnyfol7ck3hucfmxkqlc5rng72tdvgqwrrtbe
- balancer/autonomous_fund_abci:0.1.0:bafybeihcfyfkquwq7fenkzecsv7alv6wmpxn4ix3t4rvzszh5xfolpiety
- balancer/fear_and_greed_oracle_abci:0.1.0:bafybeidfvohetnouyglawqodc7tho5ibw7nkqcg2723mzwhl5ul34geu6y
- balancer/liquidity_provision_abci:0.1.0:bafybeigqec62rvlcpel4t63nxf6ilbukdnz257qzcyuwnf62253hsllydq
- balancer/pool_manager_abci:0.1.0:bafybeico4qp7yb27kgmnv4yqxhkt7lq7zimuqojglheyrgzgg36zhrqijq
- valory/abstract_abci:0.1.0:bafybeigte2l4en4otdp2maaoc3uesqdga5z4sqozrybsmcdp26bgfbcy54
Expand Down
2 changes: 1 addition & 1 deletion packages/balancer/services/autonomous_fund/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeibfahh3htjez7vf7lwx2s7tth26cwxgtalgn5hj7yg7akhk67f4ny
fingerprint_ignore_patterns: []
agent: balancer/autonomous_fund:0.1.0:bafybeiauemik3nihzvtdw346oiw53koyzxmfprdkbrbccs7chlijbwmaoe
agent: balancer/autonomous_fund:0.1.0:bafybeifxkk5jzw5esvvmdcz632ur2w3hhf4syimjdg7qeleevg5n62isjy
number_of_agents: 4
deployment: {}
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeie36flrik7sho37ynqzv7vc4thd5daw7h3af6fvi4o467fddbwgte
fingerprint_ignore_patterns: []
agent: balancer/autonomous_fund:0.1.0:bafybeiauemik3nihzvtdw346oiw53koyzxmfprdkbrbccs7chlijbwmaoe
agent: balancer/autonomous_fund:0.1.0:bafybeifxkk5jzw5esvvmdcz632ur2w3hhf4syimjdg7qeleevg5n62isjy
number_of_agents: 4
deployment: {}
---
Expand Down
2 changes: 1 addition & 1 deletion packages/balancer/skills/autonomous_fund_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ connections: []
contracts: []
protocols: []
skills:
- balancer/fear_and_greed_oracle_abci:0.1.0:bafybeiao62xpueyq3bw4ftnyfol7ck3hucfmxkqlc5rng72tdvgqwrrtbe
- balancer/fear_and_greed_oracle_abci:0.1.0:bafybeidfvohetnouyglawqodc7tho5ibw7nkqcg2723mzwhl5ul34geu6y
- balancer/liquidity_provision_abci:0.1.0:bafybeigqec62rvlcpel4t63nxf6ilbukdnz257qzcyuwnf62253hsllydq
- balancer/pool_manager_abci:0.1.0:bafybeico4qp7yb27kgmnv4yqxhkt7lq7zimuqojglheyrgzgg36zhrqijq
- valory/abstract_round_abci:0.1.0:bafybeigsbglflua5vdwmwmo2rjsogp4anxtpqjbtrcwfivuxjiv6xczpba
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ def _is_in_allowed_range(self, most_voted_estimates: Dict) -> bool:
if not status:
self.context.logger.warning(
f"The estimated values are outside of the allowed limits. "
f'min allowed value is "{self.params.min_index_value}", '
f'max allowed value is "{self.params.max_index_value}", '
f"min allowed value is {self.params.min_index_value!r}, "
f"max allowed value is {self.params.max_index_value!r}, "
f"the last two values are: {[values[0], values[1]]}."
)
return status
Expand All @@ -349,8 +349,8 @@ def _is_not_aggressive_change(self, most_voted_estimates: Dict) -> bool:
status = change <= self.params.max_index_change
if not status:
self.context.logger.warning(
f'The change is too aggressive. The max allowed change is "{self.params.max_index_change}", '
f'the current change is "{change}".'
f"The change is too aggressive. The max allowed change is {self.params.max_index_change!r}, "
f"the current change is {change!r}."
)
return status

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: bafybeibbvllj3mw4xbmnpbhat6hngbmdijpbxe464ekrg5kkhzbyoa4exe
behaviours.py: bafybeih6wxgupvr4exxvemijucfixw7zzqw2etjxb5irxwjg25hu5jnyhq
behaviours.py: bafybeigchzsthpug54fp2jsudwg5evfyic6reatnu3ymxve3tyy66ufcfe
dialogues.py: bafybeiffd2prpsv5uk4xxr2qixgpbgy2flonh2etz2fdtnojj2mrey4qty
fsm_specification.yaml: bafybeie4a2veb7scm7upgydyq2xroie3uj7ikbkiagc56y2eilmoiwqohm
handlers.py: bafybeia3xdhc2ffeqlk6n2krffvxvb6x2kq2eb2xzdazyqwamyzcluwrxa
Expand Down
10 changes: 5 additions & 5 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"dev": {
"agent/balancer/autonomous_fund/0.1.0": "bafybeiauemik3nihzvtdw346oiw53koyzxmfprdkbrbccs7chlijbwmaoe",
"skill/balancer/autonomous_fund_abci/0.1.0": "bafybeicbx53zdczmnio3hyrjnaytyacczimxx3oopqnhkxx3ywfbe3b3k4",
"agent/balancer/autonomous_fund/0.1.0": "bafybeifxkk5jzw5esvvmdcz632ur2w3hhf4syimjdg7qeleevg5n62isjy",
"skill/balancer/autonomous_fund_abci/0.1.0": "bafybeihcfyfkquwq7fenkzecsv7alv6wmpxn4ix3t4rvzszh5xfolpiety",
"skill/balancer/pool_manager_abci/0.1.0": "bafybeico4qp7yb27kgmnv4yqxhkt7lq7zimuqojglheyrgzgg36zhrqijq",
"skill/balancer/fear_and_greed_oracle_abci/0.1.0": "bafybeiao62xpueyq3bw4ftnyfol7ck3hucfmxkqlc5rng72tdvgqwrrtbe",
"skill/balancer/fear_and_greed_oracle_abci/0.1.0": "bafybeidfvohetnouyglawqodc7tho5ibw7nkqcg2723mzwhl5ul34geu6y",
"contract/balancer/managed_pool/0.1.0": "bafybeiethywywvvqxqhs4u3urj6gqp5qcw25gemyomg6mc3qfl47n326rq",
"service/balancer/autonomous_fund_goerli/0.1.0": "bafybeia2jxoqj3l7oxuazitlingy5wzat6qacvzfsdslgow7a4sswm22ue",
"service/balancer/autonomous_fund/0.1.0": "bafybeieslmzxicczsjaclewgwwialnvupvpzan7vyfzcqlvswckrmeuoke",
"service/balancer/autonomous_fund_goerli/0.1.0": "bafybeievjazzdjqv47z5jt3iaw423bqdgbe3tc5dzulwlokyx6v47zdpea",
"service/balancer/autonomous_fund/0.1.0": "bafybeib4oszvjn4cvxugaae4w6honupp74jbuzuzgn47lvn463chn5532y",
"skill/balancer/liquidity_provision_abci/0.1.0": "bafybeigqec62rvlcpel4t63nxf6ilbukdnz257qzcyuwnf62253hsllydq"
},
"third_party": {
Expand Down
13 changes: 0 additions & 13 deletions pytest.ini

This file was deleted.

Loading

0 comments on commit 397e178

Please sign in to comment.