Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.28 KB

CONTRIBUTING.md

File metadata and controls

72 lines (50 loc) · 2.28 KB

Contributing

Semantic Versioning

This project uses Semantic Versioning through PBR. This means when you make a commit you can add a message like:

Sem-Ver: feature - Added this functionality that does blah.

Then the version will automatically get bumped in the right way when releasing the package.

More info about how to use the Semantic Versioning through PBR: http://docs.openstack.org/developer/pbr/#version

Test Coverage

We try to maintain 100% test coverage on every merged pull request. In addition, we maintain a full suite of integration tests that run against S3 and Swift (for now the Swift tests run within Counsyl's infrastructure, but we'd be open to running tests against a Swift All-in-One docker image or other test harness)

Style Guidelines for stor

tl;dr

Docstrings!

Every (important) function and class should have a good docstring that explains what it does in a single sentence and then gives some explanation of its arguments. We're using the Google docstring format because it's easier to read directly in code and still can be formatted nicely in automated output.

E.g., here's the docstring for open.

def open(self, mode='r', swift_upload_options=None):
    """Opens a `SwiftFile` that can be read or written to.

    For examples of reading and writing opened objects, view
    `SwiftFile`.

    Args:
        mode (str): The mode of object IO. Currently supports reading
            ("r" or "rb") and writing ("w", "wb")
        swift_upload_options (dict): DEPRECATED (use `stor.settings.use()`
            instead). A dictionary of arguments that will be
            passed as keyword args to `SwiftPath.upload` if any writes
            occur on the opened resource.

    Returns:
        SwiftFile: The swift object.

    Raises:
        SwiftError: A swift client error occurred.
    """