Thanks for your interest in contributing to dwave-examples! Before getting started, we encourage you to take a look at this document for some guidelines.
While we have a preference for application oriented examples, we welcome all examples that demonstrate use of Ocean tools.
To see our categorized collection of examples, create a free acount on Leap and take a look here. You can also find our existing examples by going through the repositories in dwave-examples.
-
Follow GitHub's instructions to create a repository from a template. Alternatively, clone this repository (or one of our existing examples) as a starting point from which to implement your example.
-
Open an issue on the dwave-examples/template repository with a link to your example.
-
To add your example, D-Wave will fork your repository. We may make a pull request if we would like your approval for certain code changes.
Please make sure that your example includes the following:
-
README.md
:- We prefer
.md
over.rst
. - See this repository's README.
- We prefer
-
requirements.txt
:dwave-ocean-sdk
should be unpinned and lower bounded.
-
LICENSE
:- Examples should comply with the Apache 2.0 License. Please make sure that:
- All source and test files include a license header (as shown in
demo_name.py
) - The
LICENSE
file is included in your root directory.
- All source and test files include a license header (as shown in
- Examples should comply with the Apache 2.0 License. Please make sure that:
-
Tests that are discoverable through
python -m unittest discover
.
Our examples are tested using CircleCI. For a list of operating systems and Python versions we currently test our examples with, please take a look at our documentation here.
Feel free to copy the .circleci/
directory into your example's root directory.
Once approved, we will make sure that your example is set up on our CircleCI
account.
To ensure your example runs in GitHub Codespaces,
copy the .devcontainer/
directory into your example's root directory.
We use the PEP 8 style guide as a baseline.
If your example is lengthy, we encourage modularity for ease of testing.
We use the Google docstrings convention.
Take a look at our How to Contribute guide for more details.