Skip to content

Latest commit

 

History

History
111 lines (84 loc) · 4.22 KB

contributing.rst

File metadata and controls

111 lines (84 loc) · 4.22 KB

Contributing

Encouraging more people to help develop pvlib-python is essential to our success. Therefore, we want to make it easy and rewarding for you to contribute.

Easy ways to contribute

Here are a few ideas for you can contribute, even if you are new to pvlib-python, git, or Python:

How to contribute new code

Contributors to pvlib-python use GitHub's pull requests to add/modify its source code. The GitHub pull request process can be intimidating for new users, but you'll find that it becomes straightforward once you use it a few times. Please let us know if you get stuck at any point in the process. Here's an outline of the process:

  1. Create a GitHub issue and get initial feedback from users and maintainers. If the issue is a bug report, please include the code needed to reproduce the problem.
  2. Obtain the latest version of pvlib-python: Fork the pvlib-python project to your GitHub account, git clone your fork to your computer.
  3. Make some or all of your changes/additions and git commit them to your local repository.
  4. Share your changes with us via a pull request: git push your local changes to your GitHub fork, then go to GitHub make a pull request.

The Pandas project maintains an excellent contributing page that goes into detail on each of these steps. Also see GitHub's Set Up Git and Using Pull Requests.

Note that you do not need to make all of your changes before creating a pull request. Your pull requests will automatically be updated when you commit new changes and push them to GitHub. This gives everybody an easy way to comment on the code and can make the process more efficient.

We strongly recommend using virtual environments for development. Virtual environments make it trivial to switch between different versions of software. This astropy guide <http://astropy.readthedocs.org/en/latest/development/workflow/ virtual_pythons.html> is a good reference for virtual environments. If this is your first pull request, don't worry about using a virtual environment.

You must include documentation and unit tests for any new or improved code. We can provide help and advice on this after you start the pull request.

The maintainers will follow same procedures, rather than making direct commits to the main repo. Exceptions may be made for extremely minor changes, such as fixing documentation typos.

Testing

pvlib's unit tests can easily be run by executing py.test on the pvlib directory:

py.test pvlib

or, for a single module:

py.test pvlib/test/test_clearsky.py

While copy/paste coding should generally be avoided, it's a great way to learn how to write unit tests!

Unit test code should be placed in the corresponding test module in the pvlib/test directory.

Developers must include comprehensive tests for any additions or modifications to pvlib.

This documentation

If this documentation is unclear, help us improve it! Consider looking at the pandas documentation <http://pandas.pydata.org/pandas-docs/version/0.18.1/ contributing.html> for inspiration.