summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-02-11 17:50:50 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-02-11 17:50:50 +0100
commitb3bd147a06b013efca688ef5dafdfa732a036346 (patch)
tree52d0beb1c450813a7f97a3997f1131047d60d853
parentacdd28ebf3103c133c5a985219972bec2c7a3460 (diff)
Add code style tools and modify python copyright with 120 characters [skip ci]
-rw-r--r--for_dev/code_conventions.md17
-rw-r--r--for_dev/copyright_template.py6
2 files changed, 18 insertions, 5 deletions
diff --git a/for_dev/code_conventions.md b/for_dev/code_conventions.md
index 5882f78e..7f9f7471 100644
--- a/for_dev/code_conventions.md
+++ b/for_dev/code_conventions.md
@@ -21,6 +21,21 @@
* The name of the "project" should be in this form: `Package_[tests|examples|…]`. E.g. `project(Simplex_tree_examples)`.
* The name if each "target" (first parameter of add_executable) should be in this form: `Package_{name of the cpp file without extension}`. E.g `add_executable(Subsampling_test_sparsify_point_set test_sparsify_point_set.cpp)`.
+### Code style
+We are using [google c++ style guide](https://google.github.io/styleguide/cppguide.html) recommendations with 120 characters per line of code.
+[clang-format](https://clang.llvm.org/docs/ClangFormat.html) can be used to format automatically your code:
+```bash
+cd src # there is a .clang-format file with these specifications
+clang-format -style=file -i Simplex_tree/include/gudhi/Simplex_tree.h # -i means in place, your file will be modified
+```
+
## Python
-In progress... \ No newline at end of file
+In progress...
+
+### Code style
+We are using [PEP8 Python style guide](https://www.python.org/dev/peps/pep-0008/) recommendations with 120 characters per line of code.
+[black](https://black.readthedocs.io/en/stable/) can be used to format automatically your code:
+```bash
+black -l 120 src/python/example/bottleneck_basic_example.py
+```
diff --git a/for_dev/copyright_template.py b/for_dev/copyright_template.py
index 19de05e2..667f985d 100644
--- a/for_dev/copyright_template.py
+++ b/for_dev/copyright_template.py
@@ -1,7 +1,5 @@
-# This file is part of the Gudhi Library - https://gudhi.inria.fr/ -
-# which is released under MIT.
-# See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license
-# details.
+# This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
+# See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
# Author(s): [AUTHOR NAME]
#
# Copyright (C) [YEAR] [COPYRIGHT]