Skip to content

Update Event Streams python SDK v1.3.1 at 1739447427 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
37 changes: 19 additions & 18 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,29 @@ confidence=HIGH
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=too-many-arguments,
too-many-public-methods,
too-few-public-methods,
too-many-instance-attributes,
too-many-locals,
too-many-branches,
too-many-lines,
line-too-long,
similarities,
disable=bad-inline-option,
deprecated-pragma,
disallowed-name,
file-ignored,
global-statement,
import-error,
raw-checker-failed,
bad-inline-option,
invalid-name,
line-too-long,
locally-disabled,
file-ignored,
raw-checker-failed,
similarities,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
invalid-name,
global-statement,
too-few-public-methods,
too-many-arguments,
too-many-branches,
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-positional-arguments,
too-many-public-methods,
use-implicit-booleaness-not-comparison,
disallowed-name
use-symbolic-message-instead,
useless-suppression

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ script:
jobs:
include:
- stage: Build-Test
python: '3.8'
- python: '3.9'
- python: '3.10'
- python: '3.11'
- python: '3.12'
- python: '3.13'

# Uncomment this stage to use semantic-release to automatically create new releases.
# - stage: Semantic-Release
Expand All @@ -37,7 +38,7 @@ jobs:

# Uncomment this stage to automatically publish your package to pypi.org.
# - stage: Publish-Release
# python: "3.8"
# python: "3.9"
# name: Publish-To-PyPi
# script:
# - make ci
Expand Down
53 changes: 34 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,55 @@
# to be ready for development work in the local sandbox.
# example: "make setup"

LINT_DIRS=eventstreams_sdk test/unit examples
PYTHON=python3
LINT=black
LINT_DIRS=eventstreams_sdk test/unit test/integration examples

setup: deps dev_deps install_project
setup: deps dev-deps install-project

all: upgrade_pip setup test-unit lint
all: upgrade-pip setup test-unit lint

ci: all

upgrade_pip:
python -m pip install --upgrade pip
publish-release: build-dist publish-dist

upgrade-pip:
${PYTHON} -m pip install --upgrade pip

deps:
pip install -r requirements.txt
${PYTHON} -m pip install .

dev-deps:
${PYTHON} -m pip install .[dev]

dev_deps:
pip install -r requirements-dev.txt
publish-deps:
${PYTHON} -m pip install .[publish]

install_project:
pip install -e .
install-project:
${PYTHON} -m pip install .

test: test-unit
test: test-unit # test-int

test-unit:
python -m pytest test/unit
${PYTHON} -m pytest test/unit

# test-int:
# ${PYTHON} -m pytest test/integration

test-examples:
pytest examples
${PYTHON} -m pytest examples

lint: lint-fix
pylint ${LINT_DIRS} --exit-zero
black --check ${LINT_DIRS}
lint:
${PYTHON} -m pylint ${LINT_DIRS} --exit-zero
${LINT} --check ${LINT_DIRS}

lint-fix:
black ${LINT_DIRS}
${LINT} ${LINT_DIRS}

build-dist:
rm -fr dist
${PYTHON} -m build

example:
python examples/example.py
# This target requires the TWINE_PASSWORD env variable to be set to the user's pypi.org API token.
publish-dist:
TWINE_USERNAME=__token__ ${PYTHON} -m twine upload --non-interactive --verbose dist/*
2 changes: 1 addition & 1 deletion eventstreams_sdk/adminrest_v1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

# (C) Copyright IBM Corp. 2024.
# (C) Copyright IBM Corp. 2025.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion eventstreams_sdk/schemaregistry_v1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

# (C) Copyright IBM Corp. 2024.
# (C) Copyright IBM Corp. 2025.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[build-system]
requires = [
"setuptools>=67.7.2",
"wheel"
]
build-backend = "setuptools.build_meta"

[project]
name = "eventstreams_sdk"
dynamic = ["version"]
description = "Event Streams Python SDK"
license = {file = "LICENSE"}
authors = [
{name = "IBM", email = "[email protected]"},
]
readme = "README.md"
requires-python = ">= 3.8"
dependencies = [
"ibm_cloud_sdk_core>=3.20.6,<4.0.0"
]
keywords = ["eventstreams_sdk","ibm", "cloud", "ibm cloud services"]
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]

[project.urls]
Homepage = "https://github.com/IBM/eventstreams-python-sdk"
Documentation = "https://github.com/IBM/eventstreams-python-sdk/blob/main/README.md"
Issues = "https://github.com/IBM/eventstreams-python-sdk/issues"
Contributing = "https://github.com/IBM/eventstreams-python-sdk/blob/main/CONTRIBUTING.md"
License = "https://github.com/IBM/eventstreams-python-sdk/blob/main/LICENSE"

[project.optional-dependencies]
dev = [
"coverage>=7.3.2,<8.0.0",
"pylint>=3.0.0,<4.0.0",
"pytest>=7.4.2,<8.0.0",
"pytest-cov>=4.1.0,<5.0.0",
"responses>=0.23.3,<1.0.0",
"black>=24.0.0,<25.0.0",
]
publish = [
"build",
"twine"
]

[tool.setuptools]
packages = ["eventstreams_sdk"]

[tool.black]
line-length = 120
skip-string-normalization = true
2 changes: 1 addition & 1 deletion test/unit/test_adminrest_v1.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2024.
# (C) Copyright IBM Corp. 2025.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_schemaregistry_v1.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# (C) Copyright IBM Corp. 2024.
# (C) Copyright IBM Corp. 2025.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down