Home ⌂Doc Index ◂Up ▴

Contributing to OpenEXR

Thank you for your interest in contributing to OpenEXR. This document explains our contribution process and procedures:

For a description of the roles and responsibilities of the various members of the OpenEXR community, see GOVERNANCE, and for further details, see the project's Technical Charter. Briefly, Contributors are anyone who submits content to the project, Committers review and approve such submissions, and the Technical Steering Committee provides general project oversight.

Getting Information

There are two primary ways to connect with the OpenEXR project:

How to Ask for Help

If you have trouble installing, building, or using the library, but there's not yet reason to suspect you've encountered a genuine bug, start by posting a question to the openexr-dev mailing list. This is the place for question such has "How do I...".

How to Report a Bug

OpenEXR use GitHub's issue tracking system for bugs and enhancements: https://github.com/AcademySoftwareFoundation/openexr/issues

If you are submitting a bug report, please be sure to note which version of OpenEXR you are using, on what platform (OS/version, which compiler you used, and any special build flags or other unusual environmental issues). Please give a specific account of

with enough detail that others can reproduce the problem.

How to Request a Change

Open a GitHub issue: https://github.com/AcademySoftwareFoundation/openexr/issues.

Describe the situation and the objective in as much detail as possible. Feature requests will almost certainly spawn a discussion among the project community.

How to Report a Security Vulnerability

If you think you've found a potential vulnerability in OpenEXR, please refer to [SECURITY.md] to responsibly disclose it.

How to Contribute a Bug Fix or Change

To contribute code to the project, first read over the GOVERNANCE page to understand the roles involved. You'll need:

Legal Requirements

OpenEXR is a project of the Academy Software Foundation and follows the open source software best practice policies of the Linux Foundation.

License

OpenEXR is licensed under the BSD-3-Clause license. Contributions to the library should abide by that standard license.

Contributor License Agreements

Developers who wish to contribute code to be considered for inclusion in the OpenEXR distribution must first complete a Contributor License Agreement.

OpenEXR uses EasyCLA for managing CLAs, which automatically checks to ensure CLAs are signed by a contributor before a commit can be merged.

The OpenEXR CLAs are the standard forms used by Linux Foundation projects and recommended by the ASWF TAC.

Commit Sign-Off

Every commit must be signed off. That is, every commit log message must include a “Signed-off-by” line (generated, for example, with “git commit --signoff”), indicating that the committer wrote the code and has the right to release it under the BSD-3-Clause license. See https://github.com/AcademySoftwareFoundation/tac/blob/master/process/contributing.md#contribution-sign-off for more information on this requirement.

Development Workflow

Git Basics

Working with OpenEXR requires understanding a significant amount of Git and GitHub based terminology. If you’re unfamiliar with these tools or their lingo, please look at the GitHub Glossary or browse GitHub Help.

To contribute, you need a GitHub account. This is needed in order to push changes to the upstream repository, via a pull request.

You will also need Git installed on your local development machine. If you need setup assistance, please see the official Git Documentation.

Repository Structure and Commit Policy

The OpenEXR repository uses a simple branching and merging strategy.

All development work is done directly on the master branch. The master branch represents the bleeding-edge of the project and most contributions should be done on top of it.

After sufficient work is done on the master branch and the OpenEXR leadership determines that a release is due, we will bump the relevant internal versioning and tag a commit with the corresponding version number, e.g. v2.0.1. Each Minor version also has its own “Release Branch”, e.g. RB-1.1. This marks a branch of code dedicated to that Major.Minor version, which allows upstream bug fixes to be cherry-picked to a given version while still allowing the master branch to continue forward onto higher versions. This basic repository structure keeps maintenance low, while remaining simple to understand.

To reiterate, the master branch represents the latest development version, so beware that it may include untested features and is not generally stable enough for release. To retrieve a stable version of the source code, use one of the release branches.

The Git Workflow

This development workflow is sometimes referred to as OneFlow. It leads to a simple, clean, linear edit history in the repo.

The OpenEXR GitHub repo allows rebase merging and disallows merge commits and squash merging. This ensures that the repo edit history remains linear, avoiding the "bubbles" characteristic of the GitFlow workflow.

Use the Fork, Luke.

In a typical workflow, you should fork the OpenEXR repository to your account. This creates a copy of the repository under your user namespace and serves as the “home base” for your development branches, from which you will submit pull requests to the upstream repository to be merged.

Once your Git environment is operational, the next step is to locally clone your forked OpenEXR repository, and add a remote pointing to the upstream OpenEXR repository. These topics are covered in the GitHub documentation Cloning a repository and Configuring a remote for a fork, but again, if you need assistance feel free to reach out on the openexr-dev@lists.aswf.io mail list.

Pull Requests

Contributions should be submitted as Github pull requests. See Creating a pull request if you're unfamiliar with this concept.

The development cycle for a code change should follow this protocol:

  1. Create a topic branch in your local repository, following the naming format "feature/" or "bugfix/".

  2. Make changes, compile, and test thoroughly. Code style should match existing style and conventions, and changes should be focused on the topic the pull request will be addressing. Make unrelated changes in a separate topic branch with a separate pull request.

  3. Push commits to your fork.

  4. Create a Github pull request from your topic branch.

  5. Pull requests will be reviewed by project Committers and Contributors, who may discuss, offer constructive feedback, request changes, or approve the work.

  6. Upon receiving the required number of Committer approvals (as outlined in Required Approvals), a Committer other than the PR contributor may merge changes into the master branch.

Code Review and Required Approvals

Modifications of the contents of the OpenEXR repository are made on a collaborative basis. Anyone with a GitHub account may propose a modification via pull request and it will be considered by the project Committers.

Pull requests must meet a minimum number of Committer approvals prior to being merged. Rather than having a hard rule for all PRs, the requirement is based on the complexity and risk of the proposed changes, factoring in the length of time the PR has been open to discussion. The following guidelines outline the project's established approval rules for merging:

Approval must be from Committers who are not authors of the change. If one or more Committers oppose a proposed change, then the change cannot be accepted unless:

Committers may opt to elevate significant or controversial modifications to the TSC by assigning the tsc-review label to a pull request or issue. The TSC should serve as the final arbiter where required.

Test Policy

All functionality in the library must be covered by an automated test. Each library has a companion Test project - ImathTest, HalfTest, `IlmImfTest, etc. This test suite is collectively expected to validate the behavior of very part of the library.

The test should should be run, via make check, before submitting a pull request.

In addition, the IlmImfFuzzTest project validates the library by feeding it corrupted input data. This test is time-consuming (possible over 24 hours), so it will only be run occasionally, but it must succeed before a release is made.

Project Issue Handling Process

Incoming new issues are labeled promptly by the TSC using GitHub labels.

The labels include:

Coding Style

Formatting

When modifying existing code, follow the surrounding formatting conventions so that new or modified code blends in with the current code.

Naming Conventions

File conventions

C++ implementation should be named *.cpp. Headers should be named .h.

All headers should contain:

#pragma once

Type Conventions

Because OpenEXR must deal properly with large images, whose width and/or height approach the maximum allowable in 32-bit signed integers, take special care that integer arithmatic doesn't overlow, and make it as clear as possible exactly what the code is doing, especially in the edge cases.

To clarify the intention, prefer to cast between types using static_cast<>() rather than the basic C-style () notation:

// good:
size_t x = static_cast <size_t> (y);

// bad:
x = (size_t) y;
x = size_t (y);

Prefer to use std::numeric_limits<> instead of preprocesser define's such as INT_MAX:

// good:
if (x > std::numeric_limits<int>::max())
    std::cout << "That's too freakin' high.\n";

// bad:
if (x > INT_MAX)

Copyright Notices

All new source files should begin with a copyright and license stating:

// Copyright (c) Contributors to the OpenEXR Project. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause

Third-party libraries

Prefer C++11 std over boost where possible. Use boost classes you already see in the code base, but check with the project leadership before adding new boost usage.

Comments and Doxygen

Comment philosophy: try to be clear, try to help teach the reader what's going on in your code.

Prefer C++ comments (starting line with //) rather than C comments (/* ... */).

For public APIs, use Doxygen-style comments (start with ///), such as:

/// Explanation of a class.  Note THREE slashes!
/// Also, you need at least two lines like this.  If you don't have enough
/// for two lines, make one line blank like this:
///
class myclass {
    ....
    float foo;  ///< Doxygen comments on same line look like this
}

Versioning Policy

OpenEXR uses semantic versioning, which labels each version with three numbers: Major.Minor.Patch, where:

Creating a Release

To create a new release from the master branch:

  1. Update the release notes in CHANGES.md.

    Write a high-level summary of the features and improvements. Include the summary in CHANGES.md and also in the Release comments.

    Include the log of all changes since the last release, via:

    git log v2.2.1...v2.3.0 --date=short --pretty=format:"[%s](https://github.com/AcademySoftwareFoundation/openexr/commit/%H) ([%an](@%ae) %ad)"
    

    Include diff status via:

    git diff --stat v2.2.1
    
  2. Create a new release on the GitHub Releases page.

  3. Tag the release with name beginning with 'v', e.g. 'v2.3.0'.

  4. Download and sign the release tarball, as described here,

  5. Attach the detached .asc signature file to the GitHub release as a binary file.



Home ⌂Doc Index ◂Up ▴