Skip to content

Latest commit

 

History

History
63 lines (36 loc) · 4.81 KB

CONTRIBUTING.md

File metadata and controls

63 lines (36 loc) · 4.81 KB

Contributing to SAM

You can contribute to SAM by letting us know about problems or suggesting new features, or by making your own changes or additions to the code. You may want to help us fix an issue someone else reported, fix an issue you discovered, or add a new feature to SAM.

Let us know about a problem or suggest a new feature

If you find a problem with SAM, or would like to request a new feature, let us know by submitting an issue.

If you have a question about using SAM, you can ask us on the SAM support forum.

Contribute code to the SAM project

If you are ready to contribute code to SAM, there are a couple of things you should know first:

I agree to contribute to SAM. I agree to the following terms and conditions for my contributions: First, I agree that I am licensing my contributions under the terms of the current SAM license. Second, I agree that, in order to conform to any future open source software license(s) under which SAM may be provided, the terms of my license may be modified without any notice to me and without my consent. Third, I represent and warrant that I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes my contributions, I represent and warrant that I have received permission to make contributions and grant the required license on behalf of my employer.

  • SAM consists of several code repositories, so you will need to determine where to make your contribution. For example, if you are making a change to the way SAM's detailed photovoltaic model makes a calculation, you would work with the SSC repository. If you are adding a new feature that changes both calculations and the user interface, like adding a new photovoltaic module model, then you would work with both the SSC repository and the SAM repository. If you need help figuring out where your contribution should go, please let us know.

  • We use GitHub to manage the open source project, so you will need to learn how to use it to fork, clone, branch, check out, pull, add, commit, and push your work.

Instructions

Here are the steps we would like you to follow when you contribute code to SAM:

  1. Install GitHub on your computer.
  2. Follow the instructions on the SAM wiki to clone the SAM repositories and build SAM.
  3. Create a fork on github.com for the repository (SAM, SSC, LK, or WEX) you are contributing to.
  4. Clone your fork to create a local copy on your computer.
  5. Create a branch for your changes.
  6. Make your changes to the code.
  7. Build SAM and test it to make sure your code works as expected (see below).
  8. Commit and push the changes to the branch.
  9. Create a pull request for us to review the branch. If the changes meet our requirements, we will merge the branch into the main repository.

Resources for Learning GitHub

If you are new to GitHub, you can find helpful articles to help you learn how it works on the web. Some examples are:

Test Protocol

We are in the process of setting up a Google Test framework for testing your contribution to ensure that it does not cause any problems with the software.

For now, you can help to ensure that your code works with the rest of SAM by:

  1. Compiling SAM with your contribution for Windows, Mac, and Linux.

  2. Fixing any compiler warning messages.

  3. Running simulations in the compiled program with several configurations.

For example, if you made changes to how the weather file processor works with solar resource data, you might want to run simulations with the photovoltaic, concentrating solar power, and solar hot water heating models to make sure those models all work with your new code.