From 910f936d7147ae90a1917f53d8254c71d627d2b1 Mon Sep 17 00:00:00 2001 From: "Wraithan (Chris McDonald)" Date: Sat, 30 Jun 2012 17:26:47 -0700 Subject: [PATCH] Improve hacking docs --- HACKING | 26 -------------- HACKING.rst | 76 ++++++++++++++++++++++++++++++++++++++++ doc/topics/community.rst | 34 +----------------- doc/topics/hacking.rst | 1 + 4 files changed, 78 insertions(+), 59 deletions(-) delete mode 100644 HACKING create mode 100644 HACKING.rst create mode 120000 doc/topics/hacking.rst diff --git a/HACKING b/HACKING deleted file mode 100644 index bc70d8d5ce..0000000000 --- a/HACKING +++ /dev/null @@ -1,26 +0,0 @@ -Hacking on Salt -=============== - -Contributing ------------- - -TODO - - -Running Tests -------------- - -To run the full suite, you'll need mock: - -`pip install mock` - -On Python < 2.7, unittest compatibility is provided by unittest2 - -`pip install unittest2` - - -Community ---------- - -The #salt irc channel is on irc.freenode.net - diff --git a/HACKING.rst b/HACKING.rst new file mode 100644 index 0000000000..beceefb7a7 --- /dev/null +++ b/HACKING.rst @@ -0,0 +1,76 @@ +Developing Salt +=============== + +If you want to help develop Salt there is a great need and your patches are +welcome! + +To assist in Salt development, you can help in a number of ways. + +Posting patches to the mailing list +----------------------------------- + +If you have a patch for Salt, please format it via :command:`git format-patch` and +send it to the Salt users mailing list. This allows the patch to give you the +contributor the credit for your patch, and gives the Salt community an archive +of the patch and a place for discussion. + +Setting a Github pull request +----------------------------- + +This is probably the preferred method for contributions, simply create a Github +fork, commit your changes to the fork, and then open up a pull request. + +Contributions Welcome! +---------------------- + +The goal here it to make contributions clear, make sure there is a trail for +where the code has come from, but most importantly, to give credit where credit +is due! + +The `Open Comparison Contributing Docs`__ has some good suggestions and tips for +those who are looking forward to contribute. + +.. __: http://opencomparison.readthedocs.org/en/latest/contributing.html + +Getting the tests running +------------------------- + +Clone the repository using:: + + git clone https://github.com/saltstack/salt + +File descriptor limit +~~~~~~~~~~~~~~~~~~~~~ + +Check your file descriptor limit with:: + + ulimit -n + +If it is less than 1024, you should increase it with:: + + ulimit -n 1024 + +Requirements +~~~~~~~~~~~~ + +First you'll want to create a `virtualenv`_. Once you've done that +install the requirements like so:: + + pip install -r requirements.txt + +You'll also need ``mock`` to run the tests:: + + pip install mock + +If you are on Python < 2.7 then you'll also need:: + + pip install unittest2 + +.. _`virtualenv`: http://pypi.python.org/pypi/virtualenv + +Run them +~~~~~~~~ + +Finally you use setup.py to run the tests with the following command:: + + ./setup.py test diff --git a/doc/topics/community.rst b/doc/topics/community.rst index 66cfc85a07..71521f06e3 100644 --- a/doc/topics/community.rst +++ b/doc/topics/community.rst @@ -75,36 +75,4 @@ Follow on ohloh https://www.ohloh.net/p/salt -Developing Salt -=============== - -If you want to help develop Salt there is a great need and your patches are -welcome! - -To assist in Salt development, you can help in a number of ways. - -Posting patches to the mailing list ------------------------------------ - -If you have a patch for Salt, please format it via :command:`git format-patch` and -send it to the Salt users mailing list. This allows the patch to give you the -contributor the credit for your patch, and gives the Salt community an archive -of the patch and a place for discussion. - -Setting a Github pull request ------------------------------ - -This is probably the preferred method for contributions, simply create a Github -fork, commit your changes to the fork, and then open up a pull request. - -Contributions Welcome! ----------------------- - -The goal here it to make contributions clear, make sure there is a trail for -where the code has come from, but most importantly, to give credit where credit -is due! - -The `Open Comparison Contributing Docs`__ has some good suggestions and tips for -those who are looking forward to contribute. - -.. __: http://opencomparison.readthedocs.org/en/latest/contributing.html +.. include:: hacking.rst diff --git a/doc/topics/hacking.rst b/doc/topics/hacking.rst new file mode 120000 index 0000000000..fb50ac9148 --- /dev/null +++ b/doc/topics/hacking.rst @@ -0,0 +1 @@ +../../HACKING \ No newline at end of file