developers_guide.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .. _developers_guide:
  2. =================
  3. Developers' Guide
  4. =================
  5. .. note:: The documentation guide (how to write a good documentation, naming
  6. conventions, docstring examples) is in :ref:`documentation_guide`.
  7. 1. Follow the instructions in :ref:`prerequisites` to setup a clean conda
  8. environment. To be safe, run::
  9. $ pip uninstall elephant
  10. to uninstall ``elephant`` in case you've installed it previously as a pip
  11. package.
  12. 2. Fork `Elephant <https://github.com/NeuralEnsemble/elephant>`_ as described
  13. in `Fork a repo <https://help.github.com/en/github/getting-started-with-github/fork-a-repo>`_.
  14. Download Elephant source code from your forked repo::
  15. $ git clone git://github.com/<your-github-profile>/elephant.git
  16. $ cd elephant
  17. 3. Install requirements.txt, (optionally) requirements-extras.txt, and
  18. requirements-tests.txt::
  19. $ pip install -r requirements/requirements.txt
  20. $ pip install -r requirements/requirements-extras.txt # optional
  21. $ pip install -r requirements/requirements-tests.txt
  22. 4. Before you make any changes, run the test suite to make sure all the tests
  23. pass on your system::
  24. $ nosetests .
  25. You can specify a particular module to test, for example
  26. ``test_statistics.py``::
  27. $ nosetests elephant/test/test_statistics.py
  28. At the end, if you see "OK", then all the tests passed (or were skipped
  29. because certain dependencies are not installed), otherwise it will report
  30. on tests that failed or produced errors.
  31. 5. **Implement the functional you want to add in Elephant**. This includes
  32. (either of them):
  33. * fixing a bug;
  34. * improving the documentation;
  35. * adding a new functional.
  36. 6. If it was a new functional, please write:
  37. - documentation (refer to :ref:`documentation_guide`);
  38. - tests to cover your new functions as much as possible.
  39. 7. Run the tests again as described in step 4.
  40. 8. Commit your changes::
  41. $ git add .
  42. $ git commit -m "informative commit message"
  43. $ git push
  44. If this is your first commit to the project, please add your name and
  45. affiliation/employer to :file:`doc/authors.rst`
  46. 9. Open a `pull request <https://github.com/NeuralEnsemble/elephant/pulls>`_.
  47. Then we'll merge your code in Elephant.
  48. .. note:: If you experience a problem during one of the steps above, please
  49. contact us by :ref:`get_in_touch`.