Reporting a bug¶
You can report a bug on deap Github issues page.
Retrieving the latest code¶
You can check the latest sources with the command:
git clone https://github.com/DEAP/deap.git
The preferred way to contribute to deap is to fork the main repository on GitHub, then submit a “pull request” (PR):
Fork the project repository: click on the ‘Fork’ button near the top of the page. This creates a copy of the code under your account on the GitHub server.
Clone your fork locally:$ git clone email@example.com:YourLogin/deap.git
Create a branch to hold your changes:$ git checkout -b my-feature
and start making changes. Never work in the
When you’re done editing, do:$ git add modified_files $ git commit
to record your changes in Git, then push them to GitHub with:$ git push -u origin my-feature
Finally, go to the web page of your fork of the deap repository, and click ‘Pull request’ to send your changes for review.
You can also contact us on the deap users list at http://groups.google.com/group/deap-users.
Most of those conventions are base on Python PEP8.
A style guide is about consistency. Consistency with this style guide is important. Consistency within a project is more important. Consistency within one module or function is most important.
Same as PEP8.
First imports in a file are the standard library module, then come the imports of eap module, and finally the custom module for a problem. Each block of imports should be separated by a new line.
import system from deap import base import mymodule
Whitespace in Expressions and Statements¶
Same as PEP8.
Same as PEP8
- Module : use the lowercase convention.
- Class : class names use the CapWords? convention.
- Function / Procedure : use the mixedCase convention. First word should be an action verb.
- Variable : use the lower_case_with_underscores convention.