Contribution standards

Matthew Taylor edited this page Aug 24, 2015 · 7 revisions
Clone this wiki locally

Style Guides

Code contributions must adhere to the following style guides.

Unit tests

You should always run the unit tests before making commits. If modifying C++ code, make sure you build the code after making the changes and run the relevant C++ tests.

Lint

Please use Pylint with the included configuration file in $NUPIC/py/pylintrc. This will be picked up by Pylint when you run Pylint in $NUPIC/py or any subdirectory. We do not currently have lint set up for the C++ code (feel free to add it!).

Git Hooks

There is a githooks directory that includes pre-commit and post-merge hooks. You should symlink this directory to $NUPIC/.git/hooks. The pre-commit will run the unit tests and check for Pylint errors. The post-merge hook will notify you if you need to rebuild based on the changes merged in.