IMP logo
IMP Manual  for IMP version 2.20.0
README.md
1 Tools for developers {#dev_tools}
2 ====================
3 
4 %IMP provides a variety of scripts to aid the lives of developers.
5 
6 # Making a module # {#dev_tools_make_module}
7 
8 Creating a module is the easiest way to get started developing
9 code for %IMP. First, choose a name for the module. The name should
10 only contain letters, numbers and underscores as it needs to be a
11 valid file name as well as an identifier in Python and C++.
12 
13 To create the module run `tools/make-module.py my_module` from the top-level
14 %IMP directory. The new module includes a number of examples and comments
15 to help you add code to the module. The directory structure of the new module
16 is identical to [that of existing modules](@ref directories).
17 
18 If you feel your module is of interest to other %IMP users and
19 developers, see the [contributing code to IMP](#devguide_contributing) section.
20 
21 # Formatting your code # {#dev_tools_cleanup_code}
22 
23 The `tools/dev_tools/cleanup_code.py` script uses the external
24 `clang-format` and `autopep8` programs to reformat C++ and Python code
25 respectively to conform to our [preferred indentation](@ref codeconv_indentation), working around some eccentricities of %IMP code. `clang-format`
26 is part of [llvm](http://llvm.org) >= 3.4. You should always inspect the
27 changes made by `clang-format` before submitting.
28 
29 # Checking standards # {#dev_tools_check_standards}
30 
31 The `tools/dev_tools/check_standards.py` runs a number of
32 %IMP-specific standards checks on C++ and Python files.
33 It is also run as part of `git` commits. This can help you conform to %IMP's
34 [code conventions](@ref code_conventions).
35 
36 The `tools/codespell.sh` script can be run in any %IMP directory to check
37 for common spelling mistakes in source code. It uses the
38 [codespell](https://github.com/codespell-project/codespell) library.