Follow the standard Style Guide for Python Code when writing code for MLCAT, as explained by PEP8
The following case convention is used in this project: module_name, package_name, ClassName, method_name, ExceptionName, function_name, GLOBAL_CONSTANT_NAME, global_var_name, instance_var_name, function_parameter_name, local_var_name, _private_var_name.
- Use 4 spaces for indentation levels.
- Use all lowercase function names with words separated by underscores. For example, you are encouraged to write Python functions using the naming convention
instead of the CamelCase convention.
- Use CamelCase for class names and major functions that create objects, e.g.
Note, however, that some functions do have uppercase letters where it makes sense. For example, for matrices they are
LUdecomposition or T (transposition) methods.
We use the following Google Style Python format for doctrings which is important for sphinx doc build:
def function_with_types_in_docstring(param1, param2): """Example function with types documented in the docstring. PEP 484_ type annotations are supported. If attribute, parameter, and return types are annotated according to PEP 484_, they do not need to be included in the docstring: Args: param1 (int): The first parameter. param2 (str): The second parameter. Returns: bool: The return value. True for success, False otherwise. """