Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 2.94 KB

CONTRIBUTING.md

File metadata and controls

73 lines (49 loc) · 2.94 KB

Contribution Guidelines

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.

What We're Looking For

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.

Steps for Contributing

  1. 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.

  2. Open an issue on the dwave-examples/template repository with a link to your example.

  3. 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.

Guidelines

Files

Please make sure that your example includes the following:

  • README.md:

    • We prefer .md over .rst.
    • See this repository's README.
  • 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.
  • 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.

Code

We use the PEP 8 style guide as a baseline.

If your example is lengthy, we encourage modularity for ease of testing.

Documentation

We use the Google docstrings convention.

Take a look at our How to Contribute guide for more details.