Skip to content

Introduction to Stan for New Developers

Michael Betancourt edited this page Dec 16, 2016 · 22 revisions

Welcome to Stan! We're excited that you are interested in contributing to the project. Before you can contribute you will have to familiarize yourself with the particular processes for new contributions that we have incorporated to facilitate the growth of the project.

Firstly, the Stan project is hosted on GitHub so you will have to create a GitHub account if you do not yet already have one. Secondly, developer discussions are hosted on Discourse so you will have to create an account there in order to ask questions or participate in discussions.

Every developer has their own local development setup, but we have compiled various helpful that you might find useful.

Style

In order to ensure that we can quickly read and understand contributions, consistent style is incredibly important. We have adopted conventions for code quality and code style to which all contributions must conform.

Testing

The robustness of Stan is only as good as our test coverage, and we require that all new contributions are adequately tested. We use the GoogleTest framework for writing tests and GnuMake and Python for running those tests.

Contributing to Stan

We have adopted the GitFlow process for incorporating new contributions into Stan. If you are not yet familiar with Git we recommend that you check out many of the great Git tutorials freely available online. Once you are comfortable with Git itself you can read about are particular implementation of GitFlow here and here.

All new contributions are also tested with out continuous integration framework.

Contributing Core Code

The core code in Stan is written in heavily-templated C++ to ensure high-performance. There are many great C++ tutorials available online, for example cplusplus.org, and once you are familiar with the basics of the language you can tackle the subtleties of templates. We highly recommend Vandevoorde and Josuttis and Alexandrescu.

There are many additional resources available for learning how to optimize C++ code, including Agner Fog's manuscript and the many books of, amongst others, Scott Meyers and Herb Sutter.

Contributing to the Interfaces

  • May need core code knowledge

  • Adding auxiliary functions, etc.

  • Now go checkout issues trackers on GitHub!