|Version 15 (modified by dmartinc, 3 years ago) (diff)|
A. Development Process =
- Think before coding.
- Develop your module.
- Write tests using Indicop.
- Update the user documentation Dev/Doc.
- Write technical information in this wiki if needed.
B. Development Practices =
1. Basics =
- Common Principles
- First, learn Indico development style and workflow, then develop your module.
- Follow and keep Indico layers: Main core, rh, pages, wcomponents, services.
- As usual, no need to reinvent the wheel;
- There's a library that does it? Use it (unless the cost of using it is higher than that of doing it yourself);
- Use known design patterns as much as possible - patterns are a common language that allow us to better communicate ideas, and programming languages and libraries tend to follow them as well;
- If it's not obvious, add a comment;
- Use UTF-8 as encoding by default for every single file.
- Please, don't commit any trailing white spaces (see Dev/GitWorkflow)! If using Eclipse, AnyEditTools can help to remove trailing white spaces in all kind of test files. See Tools for additional formatting help.
- Use always 4 white spaces instead of TABs!
- Use consistent names for variables.
- Comment always your classes and methods, even if they look trivial for you.
- Use comments whenever you feel that people will not find out what a particular segment of code does just by reading it.
- Try to follow the PEP08 when formatting your Python code.
- Exception: historically variable names in Indico's Python are camelCase instead of using lower_case_with_underscores. The current development team still likes camelCase.
- Speak Python language
- Got new code? Pylint it before adding it to the repo.
- There are several tools for Eclipse than can help you to properly format your code and use Pylint, see Tools for additional formatting help.
Check the Git Workflow page.
- Do not commit without writing any comment.
- Comments should have the following format: [Commit type] message
- Commit types:
- [FIX] --> Bug FIXing...
- [FTR] --> A new FeaTuRe?/functionality has been developed.
- [IMP] --> Any kind of IMProvement: performance, usability, method, class, etc
- [MIN] --> MINor modifications (nor features nor improvements) that are not needed to write on the release notes.
- [REF] --> When there is some REFactoring in the code.
- [DOC] --> any modification in the DOCumentation.
- [ADD] --> when ADDing a new file (not code ones)
- [DEL] --> when DELeting a file (not code ones)
- [VER] --> Related with VERsion control/repository maintenance (branch creation, tags, rename, merge, etc)
- If it is possible, use one type for each commit (not several types in one commit). So, it will be needed to commit each modification separately.
- Do not remove the repository ;)
HTML Specific Rules
- Have Indico 100% HTML4.01 compliant (so far, this is an utopia for Indico...)