Skip to content

Getting started with Py ART development

Jonathan J. Helmus edited this page Mar 6, 2014 · 1 revision

This guide outlines the recommended method for setting up an environment for developing Py-ART and the preferred method for contributing to the project. This guide is in no way the only method for contributing to Py-ART, but provides a 'best practices' method which has been tested.

  • Sign up for a GitHub account if you don't already have one. Once registered you will have a GitHub username, in the guide we will use github_username in the URLs and commands, replace this with your username.

  • Fork the ARM-DOE Py-ART repository. Login into your GitHub account, visit the Py-ART GitHub repository and click on the "Fork" button in the top right corner. After a short pause you should now have a personal Py-ART repository at https://github.com/github_username/pyart (replace git_username with your GitHub username). You can make changes to this repository without effecting the primary ARM-DOE repository.

  • Clone your Py-ART repository onto a directory on your machine. This can be done in any directory where you want work on Py-ART. Navigate to the directory and run git clone https://github.com/github_username/pyart.git If you don't have git installed you will need to do running this command (On Mac, brew and MacPorts both can install git, Windows has a installer available and most Linux package managers (apt-get, yum) can install git).

  • Build Py-ART in-place and make the module available in Oython. Change directories into the pyart directory, cd pyart and execute python setup.py build_ext -i. To make this version of Py-ART available to Python you can then either add this directory to your PYTHONPATH shell variable or make a file called pyart.pth in the Python site-packages directory with the full path of this directory.

  • Hack away at Py-ART in the development directory. Commit changes to the local git repository as needed. Make a feature branch if you want to keep you changes separate from the upstream repository. GitHub has a nice guide on the git workflow for beginners.

  • When you have changes that would be helpful to other Py-ART users, use git to push your changes back to your GitHub repository and Open a Pull Request. To open a pull request go to your GitHub Py-ART repository, https://github.com/github_username/pyart, click on the right side "Pull Requests" link, click the top right "New Pull Request" button and fill in the form.

  • Your Pull Request will be reviewed, some changes may be suggested and then finally the code will be merged. Now everyone can benefit from your hard work!

This setup is very similar to the suggested method for contributing to NumPy. For a more detailed version of many of these steps see Contributing to NumPy.