diff --git a/README.md b/README.md index c37fa4c..d82616c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -# Python SDK for IBM Cloud Code Engine 4.0.0 +# Python SDK for IBM Cloud Code Engine 4.1.1 Python client library to interact with the [IBM Cloud Code Engine API](https://cloud.ibm.com/apidocs/codeengine). @@ -20,17 +20,15 @@ Python client library to interact with the [IBM Cloud Code Engine API](https://c -- [Python SDK for IBM Cloud Code Engine 3.1.0](#python-sdk-for-ibm-cloud-code-engine-310) - - [Table of Contents](#table-of-contents) - - [Overview](#overview) - - [Prerequisites](#prerequisites) - - [Installation](#installation) - - [Using the SDK](#using-the-sdk) - - [Questions](#questions) - - [Issues](#issues) - - [Open source @ IBM](#open-source--ibm) - - [Contributing](#contributing) - - [License](#license) +- [Overview](#overview) +- [Prerequisites](#prerequisites) +- [Installation](#installation) +- [Using the SDK](#using-the-sdk) +- [Questions](#questions) +- [Issues](#issues) +- [Open source @ IBM](#open-source--ibm) +- [Contributing](#contributing) +- [License](#license) @@ -41,8 +39,8 @@ IBM Cloud services: Service Name | Imported Class Name --- | --- -[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.0.0) | CodeEngineV2 -[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.0.0) | IbmCloudCodeEngineV1 +[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.1.1) | CodeEngineV2 +[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.1.1) | IbmCloudCodeEngineV1 ## Prerequisites @@ -57,13 +55,13 @@ Service Name | Imported Class Name To install, use `pip` or `easy_install`: ```bash -pip install --upgrade "ibm_code_engine_sdk>=4.0.0" +pip install --upgrade "ibm_code_engine_sdk>=4.1.1" ``` or ```bash -easy_install --upgrade "ibm_code_engine_sdk>=4.0.0" +easy_install --upgrade "ibm_code_engine_sdk>=4.1.1" ``` ## Using the SDK diff --git a/examples/test_code_engine_v2_examples.py b/examples/test_code_engine_v2_examples.py index 60a20d0..47beebc 100644 --- a/examples/test_code_engine_v2_examples.py +++ b/examples/test_code_engine_v2_examples.py @@ -22,7 +22,7 @@ import pytest from ibm_code_engine_sdk.code_engine_v2 import * -version = '2024-09-24' +version = '2024-09-27' # # This file provides an example of how to use the Code Engine service. diff --git a/ibm_code_engine_sdk/code_engine_v2.py b/ibm_code_engine_sdk/code_engine_v2.py index 126f367..dbf3d93 100644 --- a/ibm_code_engine_sdk/code_engine_v2.py +++ b/ibm_code_engine_sdk/code_engine_v2.py @@ -56,7 +56,7 @@ def new_instance( :param str version: (optional) The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2021-03-31` and - `2024-09-24`. + `2024-09-27`. """ authenticator = get_authenticator_from_environment(service_name) service = cls( @@ -80,7 +80,7 @@ def __init__( :param str version: (optional) The API version, in format `YYYY-MM-DD`. For the API behavior documented here, specify any date between `2021-03-31` and - `2024-09-24`. + `2024-09-27`. """ BaseService.__init__(self, service_url=self.DEFAULT_SERVICE_URL, authenticator=authenticator) self.version = version @@ -7391,9 +7391,14 @@ class BuildRunStatus: Current status condition of a build run. :param str completion_time: (optional) Time the build run completed. + :param str git_branch_name: (optional) The default branch name of the git + source. + :param str git_commit_author: (optional) The commit author of a git source. + :param str git_commit_sha: (optional) The commit sha of the git source. :param str output_digest: (optional) Describes the time the build run completed. :param str reason: (optional) Optional information to provide more context in case of a 'failed' or 'warning' status. + :param str source_timestamp: (optional) The timestamp of the source. :param str start_time: (optional) Time the build run started. """ @@ -7401,8 +7406,12 @@ def __init__( self, *, completion_time: Optional[str] = None, + git_branch_name: Optional[str] = None, + git_commit_author: Optional[str] = None, + git_commit_sha: Optional[str] = None, output_digest: Optional[str] = None, reason: Optional[str] = None, + source_timestamp: Optional[str] = None, start_time: Optional[str] = None, ) -> None: """ @@ -7410,8 +7419,12 @@ def __init__( """ self.completion_time = completion_time + self.git_branch_name = git_branch_name + self.git_commit_author = git_commit_author + self.git_commit_sha = git_commit_sha self.output_digest = output_digest self.reason = reason + self.source_timestamp = source_timestamp self.start_time = start_time @classmethod @@ -7420,10 +7433,18 @@ def from_dict(cls, _dict: Dict) -> 'BuildRunStatus': args = {} if (completion_time := _dict.get('completion_time')) is not None: args['completion_time'] = completion_time + if (git_branch_name := _dict.get('git_branch_name')) is not None: + args['git_branch_name'] = git_branch_name + if (git_commit_author := _dict.get('git_commit_author')) is not None: + args['git_commit_author'] = git_commit_author + if (git_commit_sha := _dict.get('git_commit_sha')) is not None: + args['git_commit_sha'] = git_commit_sha if (output_digest := _dict.get('output_digest')) is not None: args['output_digest'] = output_digest if (reason := _dict.get('reason')) is not None: args['reason'] = reason + if (source_timestamp := _dict.get('source_timestamp')) is not None: + args['source_timestamp'] = source_timestamp if (start_time := _dict.get('start_time')) is not None: args['start_time'] = start_time return cls(**args) @@ -7438,10 +7459,18 @@ def to_dict(self) -> Dict: _dict = {} if hasattr(self, 'completion_time') and getattr(self, 'completion_time') is not None: _dict['completion_time'] = getattr(self, 'completion_time') + if hasattr(self, 'git_branch_name') and getattr(self, 'git_branch_name') is not None: + _dict['git_branch_name'] = getattr(self, 'git_branch_name') + if hasattr(self, 'git_commit_author') and getattr(self, 'git_commit_author') is not None: + _dict['git_commit_author'] = getattr(self, 'git_commit_author') + if hasattr(self, 'git_commit_sha') and getattr(self, 'git_commit_sha') is not None: + _dict['git_commit_sha'] = getattr(self, 'git_commit_sha') if hasattr(self, 'output_digest') and getattr(self, 'output_digest') is not None: _dict['output_digest'] = getattr(self, 'output_digest') if hasattr(self, 'reason') and getattr(self, 'reason') is not None: _dict['reason'] = getattr(self, 'reason') + if hasattr(self, 'source_timestamp') and getattr(self, 'source_timestamp') is not None: + _dict['source_timestamp'] = getattr(self, 'source_timestamp') if hasattr(self, 'start_time') and getattr(self, 'start_time') is not None: _dict['start_time'] = getattr(self, 'start_time') return _dict diff --git a/ibm_code_engine_sdk/version.py b/ibm_code_engine_sdk/version.py index 369f1df..8ccfc91 100644 --- a/ibm_code_engine_sdk/version.py +++ b/ibm_code_engine_sdk/version.py @@ -17,4 +17,4 @@ """ Version of ibm_code_engine_sdk """ -__version__ = '4.0.0' +__version__ = '4.1.1' diff --git a/pyproject.toml b/pyproject.toml index 6ae249d..18dd85c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + [tool.black] line-length = 120 skip-string-normalization = true diff --git a/requirements-dev.txt b/requirements-dev.txt index 68738a1..f7d0b75 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ # test dependencies coverage>=4.5.4 -pylint>=3.3.1,<3.4.0 +pylint>=3.2.1,<3.3.0 pytest>=8.3.2,<8.4.0 pytest-cov>=5.0.0,<5.1.0 pytest-rerunfailures>=3.1 diff --git a/requirements.txt b/requirements.txt index 5159c28..8e192bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -requests>=2.26.0,<3.0.0 +requests>=2.31.0,<3.0.0 urllib3>=2.2.1,<2.3.0 python_dateutil>=2.5.3,<3.0.0 ibm_cloud_sdk_core>=3.16.0,<4.0.0 diff --git a/setup.py b/setup.py index 632ce0e..749e29b 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import sys import pkg_resources -__version__ = '4.0.0' +__version__ = '4.1.1' PACKAGE_NAME = 'ibm_code_engine_sdk' PACKAGE_DESC = 'Python SDK for IBM Cloud Code Engine' @@ -59,11 +59,10 @@ classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License',