If you are having difficulties using the APIs or have a question about the IBM Cloud and Services, please ask a question on dW Answers or Stack Overflow.
If you encounter an issue with the Python Core SDK, you are welcome to submit a bug report. Before that, please search for similar issues. It's possible somebody has encountered this issue already.
Commit messages should follow the Angular Commit Message Guidelines. This is because our release tool - semantic-release - uses this format for determining release versions and generating changelogs. Tools such as commitizen or commitlint can be used to help contributors and enforce commit messages. Here are some examples of acceptable commit messages, along with the release type that would be done based on the commit message:
Commit message | Release type |
---|---|
fix(IAM Authentication) propagate token request errors back to request invocation thread |
Patch Release |
feat(JSON Serialization): add custom deserializer for dynamic models |
|
feat(BaseService): added baseURL as param to BaseService ctor BREAKING CHANGE: The global-search service has been updated to reflect version 3 of the API. |
If you want to contribute to the repository, here's a quick guide:
- Fork the repository
- Install
virtualenv
andtox
- Develop and test your code changes with pytest.
- Respect the original code style guide.
- Only use spaces for indentation.
- Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
- Check for unnecessary whitespace with
git diff --check
before committing. - Make sure your code tests clean on the project's supported versions of Python. You can use the
venv
module to create virtual environments for this.
- Make the test pass
- Linting errors can be fixed by running
make lint-fix
in most cases
- Linting errors can be fixed by running
- Check code coverage. Add tests for all new functionality and ensure overall coverage does not decrease.
- Commit your changes
- Commits should follow the Angular commit message guidelines. This is because our release tool uses this format for determining release versions and generating changelogs. To make this easier, we recommend using the Commitizen CLI with the
cz-conventional-changelog
adapter.
- Push to your fork and submit a pull request to the
dev
branch
It is STRONGLY recommended that you set up and use a virtualenv.
- Clone this repository:
git clone git@github.com:IBM/python-sdk-core.git
- Create a virtual environment:
python -m venv ./venv3 # create venv in directory './venv3' using "python" command . venv3/bin/activate # establish venv's environment python -V # check version of "python" command in venv
- Install the project dependencies and install the project as an editable package using the current source:
make setup
- Run the unit tests:
make test-unit
- Run the lint checks on the source code:
make lint
- Run the code formatter on the source code to ensure compliance with the linter:
make lint-fix
- Run the entire build (install dependencies, run unit tests and perform lint checks):
make all
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.