Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
-->
# 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).

Expand All @@ -20,17 +20,15 @@ Python client library to interact with the [IBM Cloud Code Engine API](https://c

<!-- toc -->

- [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)

<!-- tocstop -->

Expand All @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/test_code_engine_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
33 changes: 31 additions & 2 deletions ibm_code_engine_sdk/code_engine_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -7391,27 +7391,40 @@ 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.
"""

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:
"""
Initialize a BuildRunStatus object.

"""
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
Expand All @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ibm_code_engine_sdk/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"""
Version of ibm_code_engine_sdk
"""
__version__ = '4.0.0'
__version__ = '4.1.1'
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 120
skip-string-normalization = true
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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',
Expand Down