diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 80a4317..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,17 +0,0 @@ -[bumpversion] -current_version = 0.1.0 -commit = True -message = Update version {current_version} -> {new_version} - -[bumpversion:file:ibm_code_engine_sdk/version.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' - -[bumpversion:file:setup.py] -search = __version__ = '{current_version}' -replace = __version__ = '{new_version}' - -[bumpversion:file:README.md] -search = {current_version} -replace = {new_version} - diff --git a/.gitignore b/.gitignore index 23a8eb8..8c833cb 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,10 @@ swagger.json /.pydevproject /.settings/ + +# files produced by "npm install" commands during build +package-lock.json +node_modules/ + +# ignore the generated integration test files, as they cannot be used without manual editing +integration/test_code_engine_v2.py \ No newline at end of file diff --git a/.releaserc b/.releaserc deleted file mode 100644 index f441c3f..0000000 --- a/.releaserc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "debug": true, - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", - "@semantic-release/changelog", - [ - "@semantic-release/exec", - { - "prepareCmd": "bump2version --allow-dirty --current-version ${lastRelease.version} --new-version ${nextRelease.version} patch" - } - ], - [ - "@semantic-release/git", - { - "message": "chore(release): ${nextRelease.version} release notes\n\n${nextRelease.notes}" - } - ], - "@semantic-release/github" - ], - "branches": [ - {name: "main"} - ] -} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 74becbf..2ab02dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ -os: linux +dist: bionic + language: python -dist: xenial + cache: pip # Only run on main (still tests PRs) @@ -13,49 +14,28 @@ notifications: matrix: include: - - python: 3.6 - - python: 3.7 - - python: 3.8 + - python: '3.7' + - python: '3.8' + - python: '3.9' + - python: '3.10' -before_install: -- npm install npm@latest -g +install: - sudo apt-get update - sudo apt-get install pandoc - pip install pypandoc -# - '[ "${TRAVIS_PULL_REQUEST}" == "false" ] && openssl aes-256-cbc -K $my_key -iv $my_iv -in myservice.env.enc -out myservice.env -d || true' - -install: -- pip install tox-travis -- pip install -r requirements.txt -- pip install -r requirements-dev.txt -- pip install . -- python setup.py build +- echo -e "machine github.ibm.com\n login $GITHUB_OAUTH_TOKEN" > ~/.netrc +- pip install setuptools=="60.8.2" script: -- tox -- pytest test -- ./test-integration.sh - -before_deploy: -- pip install bump2version -- nvm install 12 -- npm install @semantic-release/changelog -- npm install @semantic-release/exec -- npm install @semantic-release/git -- npm install @semantic-release/github +- make ci deploy: -- provider: script - script: npx semantic-release - skip_cleanup: true - on: - python: '3.6' - branch: main - provider: pypi user: __token__ - password: $PYPI_TOKEN + password: + secure: lUZvqL7OY4b6JsZ3w8lbRzx3e1xPGdCaV2eXTZ/fTy+soRWSe8PayK8YkC9oNa9SuNDpJ1n2w24sq24O2KMsjhw7mpJHLPOR9Yj2hVlWL1GSvAT3huI0j4PnBc6LAGXqtFBF2YYr4mIFNV5Zx8WJ0GOT4JNZIaH7M1HrnK224aOkUFNaZXP/a0bwBI9uWFKPLbRoggoYtKU1z7SM18+OINSZOSPzHIyl6ng41pdEWLsdkP+3zt29+LbARMIsocOJ6tLXeM6Dn8G5IxZ9pvJk+royo4MTIKJ1k7QN5s2x19mZoM6SrC/loxSfAFjgypxRDlXK43OWOMRrKnfj7RVl5fW3TIi1RoAq6T6ciC8Yv80ZUr6tIMcBWGkpi7Pbfsc1Z9toYeoGwdc8VSgnl97+Oj8M4WsT03Wc9/Gnlr0MGG1jzUoCH58HjK0ATIP1r5g+KBSHWyJtksonnPXk/JepQQPxDCa6zB2vZz7MnAXTc3hg+6rWpxjy+RpIkmLq2pt5gJZhUnOafLaTsLiCvrD7K6/8wa2FfViK4105y7mVGy6k9Dgnb6HqhWQPdHGkbDiBZMi6NkNYMe3LuJ6Qkd0mKt3VHpJDLU5RRxF1WO9FaX832ER37u9+JCoJnbu4BevMWlkdVNJxqC+vN5yxgNU73/txYMwr52kRJXtcMt1PKMw= repository: https://upload.pypi.org/legacy skip_cleanup: true on: - python: '3.6' - tags: true + python: '3.10' + tags: true \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7303c87..01ca05c 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at phil_adams@us.ibm.com. All +reported by contacting the project team at devxsdk@us.ibm.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. diff --git a/Makefile b/Makefile index f881382..45ca62d 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,35 @@ setup: deps dev_deps install_project +all: upgrade_pip setup test-unit lint + +ci: setup test-unit lint + +upgrade_pip: + python -m pip install --upgrade pip + deps: - pip install -r requirements.txt + python -m pip install -r requirements.txt dev_deps: - pip install -r requirements-dev.txt + python -m pip install -r requirements-dev.txt install_project: - pip install -e . + python -m pip install -e . + +test: test-unit test-int + +test-unit: + python -m pytest --cov=ibm_code_engine_sdk test/unit + +test-int: + python -m pytest test/integration + +test-examples: + python -m pytest example + +lint: + ./pylint.sh && black --check . + +lint-fix: + black . diff --git a/README.md b/README.md index 40d1989..1ab9d4d 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,10 @@ -# Python SDK for IBM Cloud Code Engine 0.1.0 +# Python SDK for IBM Cloud Code Engine 2.0.1 Python client library to interact with the [IBM Cloud Code Engine API](https://cloud.ibm.com/apidocs/codeengine). -Disclaimer: this SDK is being released initially as a **pre-release** version. -Changes might occur which impact applications that use this SDK. - ## Table of Contents