This document contains information and guidelines about contributing to this project. Please read it before you start participating.
We don't use GitHub as a support forum. If you have issues with the APIs or have a question about the Watson services, see Stack Overflow.
See the issue template.
Contributions should follow the established coding style and conventions for this project, which are loosely based on The Official raywenderlich.com Swift Style Guide and Swift API Design Guidelines. The project is set up so that developers can use SwiftLint to check conformance to the coding style guidelines.
If you want to contribute to the repository, here's a quick guide:
- Fork the repository.
- Copy
Source/SupportingFiles/WatsonCredentialsExample.swift
toSource/SupportingFiles/WatsonCredentials.swift
. - Add credentials to
WatsonCredentials.swift
for the services you plan to test. - Develop and test your code changes.
- Please respect the original code style guide.
- 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. - Use commitizen to make commits (i.e.
git cz
instead ofgit commit
).
npm install -g commitizen cz-conventional-changelog echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
- Verify that tests pass successfully on both macOS and Linux. To run tests in Xcode, select the service's scheme and press
cmd-u
. Instructions on running the Swift tests on Linux while on a Mac can be found here. - Push to your fork and submit a pull request to the develop branch.
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.
Some of the ideas and wording for the statements above were based on work by the Alamofire, Docker, and Linux communities. We commend them for their efforts to facilitate collaboration in their projects.