diff --git a/.pylintrc b/.pylintrc index cfeadb3..dd2e2b3 100644 --- a/.pylintrc +++ b/.pylintrc @@ -61,7 +61,9 @@ disable=too-many-arguments, useless-suppression, deprecated-pragma, use-symbolic-message-instead, - invalid-name + invalid-name, + global-statement, + use-implicit-booleaness-not-comparison # 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 @@ -191,14 +193,6 @@ attr-naming-style=snake_case # style. #attr-rgx= -# Bad variable names which should always be refused, separated by a comma. -bad-names=foo, - bar, - baz, - toto, - tutu, - tata - # Naming style matching correct class attribute names. class-attribute-naming-style=any diff --git a/Makefile b/Makefile index 41d9d32..ed7c0e6 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ # to be ready for development work in the local sandbox. # example: "make setup" +LINT_DIRS=iaesdk test/unit test/integration examples + setup: deps dev_deps install_project all: upgrade_pip setup test-unit lint @@ -32,7 +34,8 @@ test-examples: python -m pytest examples lint: - ./pylint.sh && black --check . + python -m pylint ${LINT_DIRS} --exit-zero + black --check ${LINT_DIRS} lint-fix: - black . \ No newline at end of file + black ${LINT_DIRS} \ No newline at end of file diff --git a/README.md b/README.md index d4fc47c..9df9105 100644 --- a/README.md +++ b/README.md @@ -40,20 +40,14 @@ IBM Analytics Engine v3 is for the Standard Serverless for Apache Spark plan * An [IBM Cloud][ibm-cloud-onboarding] account. * An IAM API key to allow the SDK to access your account. Create one [here](https://cloud.ibm.com/iam/apikeys). -* Python 3.7 or above. +* Python 3.8 or above. ## Installation -To install, use `pip` or `easy_install`: +To install, use `pip`: ```bash -pip install --upgrade "iaesdk>=3.2.0" -``` - -or - -```bash -easy_install --upgrade "iaesdk>=3.2.0" +python -m pip install --upgrade iaesdk ``` ## Using the SDK diff --git a/package.json b/package.json index 527b155..5be1cf5 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,14 @@ "description": "This package.json is being used to manage semantic-release and its dependencies", "license": "Apache-2.0", "devDependencies": { - "semantic-release": "19.0.5", - "@semantic-release/changelog": "6.0.2", + "semantic-release": "21.0.7", + "@semantic-release/changelog": "6.0.3", "@semantic-release/exec": "6.0.3", "@semantic-release/git": "10.0.1" }, + "overrides": { + "semver": "^7.5.3" + }, "scripts": { "semantic-release": "semantic-release" } diff --git a/requirements-dev.txt b/requirements-dev.txt index 87bcdc9..0cb3c95 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,6 @@ -# test dependencies -coverage>=4.5.4 -pylint>=2.6.0,<3.0.0 -pytest>=7.0.1,<8.0.0 -pytest-cov>=2.2.1,<3.0.0 -pytest-rerunfailures>=3.1 -responses>=0.12.1,<1.0.0 -black>=22.10 \ No newline at end of file +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>=23.9.1 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index ac10b3e..5026cba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1 @@ -requests>=2.26.0,<3.0.0 -urllib3>=1.26.0,<2.0.0 -python_dateutil>=2.5.3,<3.0.0 -ibm_cloud_sdk_core>=3.16.0,<4.0.0 +ibm_cloud_sdk_core>=3.18.2,<4.0.0 diff --git a/setup.py b/setup.py index 766358c..dd50d0b 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright 2016,2022 IBM All Rights Reserved. +# Copyright 2016,2024 IBM All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -59,10 +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", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", diff --git a/test/unit/test_ibm_analytics_engine_api_v2.py b/test/unit/test_ibm_analytics_engine_api_v2.py index 005c1de..b599755 100644 --- a/test/unit/test_ibm_analytics_engine_api_v2.py +++ b/test/unit/test_ibm_analytics_engine_api_v2.py @@ -58,8 +58,8 @@ def preprocess_url(operation_path: str): # Otherwise, return a regular expression that matches one or more trailing /. if re.fullmatch(".*/+", request_url) is None: return request_url - else: - return re.compile(request_url.rstrip("/") + "/+") + + return re.compile(request_url.rstrip("/") + "/+") ############################################################################## diff --git a/test/unit/test_ibm_analytics_engine_api_v3.py b/test/unit/test_ibm_analytics_engine_api_v3.py index 53c7fef..cbb2510 100644 --- a/test/unit/test_ibm_analytics_engine_api_v3.py +++ b/test/unit/test_ibm_analytics_engine_api_v3.py @@ -59,8 +59,8 @@ def preprocess_url(operation_path: str): # Otherwise, return a regular expression that matches one or more trailing /. if re.fullmatch('.*/+', request_url) is None: return request_url - else: - return re.compile(request_url.rstrip('/') + '/+') + + return re.compile(request_url.rstrip('/') + '/+') def test_get_service_url_for_region():