Skip to content

Commit

Permalink
Bump version: 0.8.5 → 0.8.6 (#822)
Browse files Browse the repository at this point in the history
- Bump version from 0.8.5 to 0.8 6
- Fix black CI check by backporting #691
  - Update .pre-commit-config.yaml using `pre-commit autoupdate`
  - Bind `black`, `isort`, `flake8`, and `licenseheaders` versions in `setup.py` to match `.pre-commit-config.yaml`
  - Update licenseheaders template to 2022
  - Run pre-commit checks on all files using `pre-commit run --all-files`
- Fix tox CI check by using v3 barge
  • Loading branch information
David Hunt-Mateo authored May 18, 2022
1 parent 8d3ded0 commit 3790093
Show file tree
Hide file tree
Showing 145 changed files with 300 additions and 230 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 = 0.8.5
current_version = 0.8.6
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion .copyright.tmpl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
2 changes: 1 addition & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
## Copyright 2021 Ocean Protocol Foundation
## Copyright 2022 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
name: black
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
## Copyright 2021 Ocean Protocol Foundation
## Copyright 2022 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
name: Ocean.py release
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
## Copyright 2021 Ocean Protocol Foundation
## Copyright 2022 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
name: Ocean.py tests
Expand All @@ -24,6 +24,7 @@ jobs:
with:
repository: "oceanprotocol/barge"
path: 'barge'
ref: v3
- name: Run Barge
working-directory: ${{ github.workspace }}/barge
env:
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
##
## Copyright 2021 Ocean Protocol Foundation
## Copyright 2022 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
repos:
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 19.3b0
rev: 22.1.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
rev: 3.9.2
hooks:
- id: flake8
- repo: https://github.com/johann-petrak/licenseheaders.git
Expand Down
2 changes: 1 addition & 1 deletion .prospector.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
## Copyright 2021 Ocean Protocol Foundation
## Copyright 2022 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
pep257:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->
See [`releases`](https://github.com/oceanprotocol/ocean.py/releases).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
4 changes: 4 additions & 0 deletions READMEs/ALG_ddo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->
(HACK to help debugging. Remove later)

In Python console:
Expand Down
4 changes: 4 additions & 0 deletions READMEs/DATA_ddo.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->
(HACK to help debugging. Remove later)

In Python console:
Expand Down
2 changes: 1 addition & 1 deletion READMEs/c2d-flow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/datatokens-flow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/developers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/dispenser-flow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/fixed-rate-exchange-flow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/get-test-OCEAN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/marketplace-flow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/parameters.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/release-process.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/services.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion READMEs/wallets.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2021 Ocean Protocol Foundation
Copyright 2022 Ocean Protocol Foundation
SPDX-License-Identifier: Apache-2.0
-->

Expand Down
2 changes: 1 addition & 1 deletion bumpversion.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
##
## Copyright 2021 Ocean Protocol Foundation
## Copyright 2022 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##

Expand Down
3 changes: 2 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import json
import os
import uuid

import pytest

from ocean_lib.common.aquarius.aquarius_provider import AquariusProvider
from ocean_lib.web3_internal.currency import from_wei, to_wei
from ocean_lib.web3_internal.transactions import send_ether
Expand Down
4 changes: 2 additions & 2 deletions ocean_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#

"""Initialises ocean lib package."""

__author__ = """OceanProtocol"""
# fmt: off
__version__ = '0.8.5'
__version__ = '0.8.6'
# fmt: on
2 changes: 1 addition & 1 deletion ocean_lib/assets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
3 changes: 2 additions & 1 deletion ocean_lib/assets/asset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import copy
Expand All @@ -11,6 +11,7 @@
from enforce_typing import enforce_types
from eth_account.account import Account
from eth_utils import add_0x_prefix

from ocean_lib.assets.credentials import AddressCredential
from ocean_lib.assets.did import did_to_id
from ocean_lib.common.agreements.consumable import ConsumableCodes
Expand Down
3 changes: 2 additions & 1 deletion ocean_lib/assets/asset_downloader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#

Expand All @@ -8,6 +8,7 @@
from typing import Optional, Type

from enforce_typing import enforce_types

from ocean_lib.assets.asset import V3Asset
from ocean_lib.common.agreements.service_types import ServiceTypes
from ocean_lib.data_provider.data_service_provider import DataServiceProvider
Expand Down
5 changes: 3 additions & 2 deletions ocean_lib/assets/asset_resolver.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
"""DID Resolver module."""
Expand All @@ -10,10 +10,11 @@
from typing import Optional

from enforce_typing import enforce_types
from web3.main import Web3

from ocean_lib.assets.asset import V3Asset
from ocean_lib.common.aquarius.aquarius_provider import AquariusProvider
from ocean_lib.models.data_token import DataToken
from web3.main import Web3

logger = logging.getLogger("keeper")

Expand Down
3 changes: 2 additions & 1 deletion ocean_lib/assets/credentials.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
from typing import Optional

from enforce_typing import enforce_types

from ocean_lib.common.agreements.consumable import ConsumableCodes, MalformedCredential


Expand Down
5 changes: 3 additions & 2 deletions ocean_lib/assets/did.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
"""DID Lib to do DID's and DDO's."""
Expand All @@ -8,9 +8,10 @@

from enforce_typing import enforce_types
from eth_utils import remove_0x_prefix
from ocean_lib.utils.utilities import checksum
from web3 import Web3

from ocean_lib.utils.utilities import checksum

OCEAN_PREFIX = "did:op:"


Expand Down
2 changes: 1 addition & 1 deletion ocean_lib/assets/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
2 changes: 1 addition & 1 deletion ocean_lib/assets/test/test_asset.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
from ocean_lib.assets.asset import V3Asset
Expand Down
3 changes: 2 additions & 1 deletion ocean_lib/assets/test/test_asset_downloader.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import os

import pytest

from ocean_lib.assets.asset_downloader import download_asset_files
from ocean_lib.common.agreements.service_types import ServiceTypes
from ocean_lib.data_provider.data_service_provider import DataServiceProvider
Expand Down
3 changes: 2 additions & 1 deletion ocean_lib/assets/test/test_asset_resolver.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import json

import pytest

from ocean_lib.assets.asset import V3Asset
from ocean_lib.assets.asset_resolver import resolve_asset
from tests.resources.ddo_helpers import wait_for_ddo
Expand Down
5 changes: 3 additions & 2 deletions ocean_lib/assets/test/test_did.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
"""
Expand All @@ -11,6 +11,8 @@
import secrets

import pytest
from web3 import Web3

from ocean_lib.assets.did import (
DID,
OCEAN_PREFIX,
Expand All @@ -19,7 +21,6 @@
did_to_id_bytes,
id_to_did,
)
from web3 import Web3

TEST_SERVICE_TYPE = "ocean-meta-storage"
TEST_SERVICE_URL = "http://localhost:8005"
Expand Down
3 changes: 2 additions & 1 deletion ocean_lib/assets/test/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
from unittest.mock import patch

import pytest

from ocean_lib.assets.did import DID
from ocean_lib.assets.trusted_algorithms import (
add_publisher_trusted_algorithm,
Expand Down
3 changes: 2 additions & 1 deletion ocean_lib/assets/trusted_algorithms.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#
# Copyright 2021 Ocean Protocol Foundation
# Copyright 2022 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
#
import json
from typing import Optional, Union

from enforce_typing import enforce_types

from ocean_lib.assets.asset import V3Asset
from ocean_lib.assets.asset_resolver import resolve_asset
from ocean_lib.common.agreements.service_types import ServiceTypes
Expand Down
Loading

0 comments on commit 3790093

Please sign in to comment.