Skip to content

Commit

Permalink
Unskip c2d tests and apply disk optimisation like in Provider. (#1471)
Browse files Browse the repository at this point in the history
* Unskip c2d tests and apply disk optimisation like in Provider.
* Update provider version.
* Remove veDelegationProxy and prepare libcheck.
* Remove custom barge provider version.
* Bump version: 3.0.1 → 3.0.2
  • Loading branch information
calina-c authored Sep 7, 2023
1 parent a439ec2 commit f14e384
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.0.1
current_version = 3.0.2
commit = True
tag = True

Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/libcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
env:
GANACHE_HARDFORK: london
run: |
bash -x start_ocean.sh --no-dashboard 2>&1 --with-provider2 > start_ocean.log &
bash -x start_ocean.sh --no-dashboard 2>&1 --with-provider2 --with-c2d > start_ocean.log &
for i in $(seq 1 108); do
sleep 5
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" -a -f "$HOME/.ocean/ocean-c2d/ready" ] && break
done
ls -la "$HOME/.ocean/ocean-contracts/artifacts/"
- name: Install dependencies
Expand All @@ -42,6 +42,19 @@ jobs:
python -m pip install --upgrade pip
pip install ocean-lib
pip install mkcodes pytest matplotlib
- name: Delete default runner images
run: |
docker image rm node:14
docker image rm node:14-alpine
docker image rm node:16
docker image rm node:16-alpine
docker image rm node:18
docker image rm node:18-alpine
docker image rm buildpack-deps:buster
docker image rm buildpack-deps:bullseye
docker image rm debian:10
docker image rm debian:11
docker image rm moby/buildkit:latest
- name: Generate and test readmes
working-directory: ${{ github.workspace }}
env:
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,31 @@ jobs:
env:
GANACHE_HARDFORK: london
run: |
bash -x start_ocean.sh --no-dashboard 2>&1 --with-provider2 --with-thegraph --skip-subgraph-deploy > start_ocean.log &
bash -x start_ocean.sh --no-dashboard 2>&1 --with-provider2 --with-thegraph --with-c2d --skip-subgraph-deploy > start_ocean.log &
- name: Install dependencies
working-directory: ${{ github.workspace }}
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Delete default runner images
run: |
docker image rm node:14
docker image rm node:14-alpine
docker image rm node:16
docker image rm node:16-alpine
docker image rm node:18
docker image rm node:18-alpine
docker image rm buildpack-deps:buster
docker image rm buildpack-deps:bullseye
docker image rm debian:10
docker image rm debian:11
docker image rm moby/buildkit:latest
- name: Wait for contracts deployment
working-directory: ${{ github.workspace }}/barge
run: |
for i in $(seq 1 250); do
sleep 5
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" -a -f "$HOME/.ocean/ocean-c2d/ready" ] && break
done
- name: "Read address.json contents"
working-directory: ${{ github.workspace }}
Expand Down
1 change: 0 additions & 1 deletion READMEs/df.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ It provides convenient access to [DF](https://github.com/oceanprotocol/ocean.py/
- `ocean.smart_wallet_checker -> SmartWalletChecker`
- `ocean.ve_allocate -> VeAllocate`
- `ocean.ve_delegation -> VeDelegation`
- `ocean.ve_delegation_proxy -> VeDelegationProxy`
- `ocean.ve_fee_distributor -> VeFeeDistributor`
- `ocean.ve_fee_estimate(self) -> VeFeeEstimate`

Expand Down
2 changes: 1 addition & 1 deletion ocean_lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

__author__ = """OceanProtocol"""
# fmt: off
__version__ = '3.0.1'
__version__ = '3.0.2'
# fmt: on
3 changes: 0 additions & 3 deletions ocean_lib/data_provider/test/test_data_service_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def test_send_compute_request_failure(with_evil_client, provider_wallet):
)


@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.unit
def test_compute_job_result_fails(provider_wallet):
"""Tests failure of compute job starting."""
Expand All @@ -164,7 +163,6 @@ def test_compute_job_result_fails(provider_wallet):
DataSP.compute_job_result("some_job_id", 0, mock_service, provider_wallet)


@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.unit
def test_delete_job_result(provider_wallet):
"""Tests a failure & a success of compute job deletion."""
Expand Down Expand Up @@ -278,7 +276,6 @@ def test_expose_endpoints():
]


@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_c2d_environments():
"""Tests that the test ocean-compute env exists on the DataServiceProvider."""
Expand Down
11 changes: 0 additions & 11 deletions ocean_lib/models/ve/test/test_ve_delegation_proxy.py

This file was deleted.

9 changes: 0 additions & 9 deletions ocean_lib/models/ve/ve_delegation_proxy.py

This file was deleted.

6 changes: 0 additions & 6 deletions ocean_lib/ocean/ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from ocean_lib.models.ve.smart_wallet_checker import SmartWalletChecker
from ocean_lib.models.ve.ve_allocate import VeAllocate
from ocean_lib.models.ve.ve_delegation import VeDelegation
from ocean_lib.models.ve.ve_delegation_proxy import VeDelegationProxy
from ocean_lib.models.ve.ve_fee_distributor import VeFeeDistributor
from ocean_lib.models.ve.ve_fee_estimate import VeFeeEstimate
from ocean_lib.models.ve.ve_ocean import VeOcean
Expand Down Expand Up @@ -235,11 +234,6 @@ def ve_allocate(self) -> VeAllocate:
def ve_delegation(self) -> VeDelegation:
return VeDelegation(self.config, self._addr("veDelegation"))

@property
@enforce_types
def ve_delegation_proxy(self) -> VeDelegationProxy:
return VeDelegationProxy(self.config, self._addr("veDelegationProxy"))

@property
@enforce_types
def ve_fee_distributor(self) -> VeFeeDistributor:
Expand Down
2 changes: 0 additions & 2 deletions ocean_lib/ocean/test/test_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from ocean_lib.models.ve.smart_wallet_checker import SmartWalletChecker
from ocean_lib.models.ve.ve_allocate import VeAllocate
from ocean_lib.models.ve.ve_delegation import VeDelegation
from ocean_lib.models.ve.ve_delegation_proxy import VeDelegationProxy
from ocean_lib.models.ve.ve_fee_distributor import VeFeeDistributor
from ocean_lib.models.ve.ve_fee_estimate import VeFeeEstimate
from ocean_lib.models.ve.ve_ocean import VeOcean
Expand Down Expand Up @@ -53,7 +52,6 @@ def test_contract_objects(publisher_ocean):
assert isinstance(ocean.smart_wallet_checker, SmartWalletChecker)
assert isinstance(ocean.ve_allocate, VeAllocate)
assert isinstance(ocean.ve_delegation, VeDelegation)
assert isinstance(ocean.ve_delegation_proxy, VeDelegationProxy)
assert isinstance(ocean.ve_fee_distributor, VeFeeDistributor)
assert isinstance(ocean.ve_fee_estimate, VeFeeEstimate)
assert isinstance(ocean.ve_ocean, VeOcean)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
url="https://github.com/oceanprotocol/ocean.py",
# fmt: off
# bumpversion.sh needs single-quotes
version='3.0.1',
version='3.0.2',
# fmt: on
zip_safe=False,
)
7 changes: 0 additions & 7 deletions tests/integration/ganache/test_compute_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def wait_for_ddo(self, ddo):

return self.published_ddos[ddo.did]

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_raw_algo(
self,
Expand Down Expand Up @@ -114,7 +113,6 @@ def test_compute_raw_algo(
algorithm_meta=raw_algorithm,
)

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_registered_algo(
self,
Expand All @@ -136,7 +134,6 @@ def test_compute_registered_algo(
algorithm_and_userdata=AssetAndUserdata(self.algorithm, None),
)

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_reuse_order(
self,
Expand All @@ -159,7 +156,6 @@ def test_compute_reuse_order(
scenarios=["reuse_order"],
)

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_multi_inputs(
self,
Expand Down Expand Up @@ -193,7 +189,6 @@ def test_compute_trusted_algorithm(self):
# functionality covered in test_compute_update_trusted_algorithm
assert True

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_update_trusted_algorithm(
self,
Expand Down Expand Up @@ -245,7 +240,6 @@ def test_compute_update_trusted_algorithm(
scenarios=["with_result"],
)

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_trusted_publisher(
self,
Expand Down Expand Up @@ -283,7 +277,6 @@ def test_compute_trusted_publisher(
),
)

@pytest.mark.skip(reason="Need to fix c2d CI containers in #1449")
@pytest.mark.integration
def test_compute_just_provider_fees(
self,
Expand Down
2 changes: 1 addition & 1 deletion tests/readmes/test_readmes.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_script_execution(self, script_name):
"publish-flow-restapi", # TODO: fix and restore
"gas-strategy-remote",
# "using-clef", # TODO: removed original clef readme, to reinstate in #1461
"c2d-flow", # TODO: fix c2d CI containers in #1449 and restore afterwards
"c2d-flow",
]

if script_name.replace("test_", "").replace(".py", "") in skippable:
Expand Down

0 comments on commit f14e384

Please sign in to comment.