1+ # Tools
2+
13<!-- [](https://github.com/psf/black) -->
24[ ![ pre-commit] ( https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white )] ( https://github.com/pre-commit/pre-commit )
35
4- # Tools
56Yet another small C++ generic library, extending the standard library for ease
67of use.
78
89## Content
10+
911- DataBase: a singleton used to parse specifically formatted files and present
1012 the content as key/values.
1113 Written before I heard of YAML... so considered as deprecated.
@@ -29,7 +31,9 @@ of use.
2931- Vector3: yet another implementation of the 3-dimensional mathematical vector.
3032
3133## Build
34+
3235### Layout
36+
3337The library is built with ` cmake ` and has been tested with ` g++ ` and ` clang ` .
3438
3539The build layout is included in the repository, with the ` source ` , ` build ` and
@@ -45,6 +49,7 @@ at the compilation if the optional prerequisites are installed and the Python
4549virtual environment activated (with ` poetry shell ` ).
4650
4751### Prerequisites
52+
4853Required:
4954
5055- ` make `
@@ -61,6 +66,7 @@ Optional:
6166then run ` poetry install ` to install the optional Python packages
6267
6368### Option
69+
6470A Makefile is provided at the root to run ` cmake ` then ` make ` in a single step,
6571with the following options:
6672
@@ -77,7 +83,9 @@ with the following options:
7783- ` clean_lib_bin ` : remove the ` install ` directory
7884
7985## Contribute
86+
8087### Tooling set
88+
8189A set of formatters and static analysis tools is used to guarantee the homogeneity
8290of the code and catch mistakes:
8391
@@ -102,17 +110,18 @@ An other solution is to use `poetry run git commit ...` (for configuration of an
102110for instance.
103111
104112### Tooling installation
113+
105114- ` pre-commit ` , as a Python tool, can be installed with:
106115
107- + `pipx`
116+ - ` pipx `
108117
109118 pipx install pre-commit
110119
111- + ` pip ` (or ` pip3 ` on Debian-like distribution)
120+ - ` pip ` (or ` pip3 ` on Debian-like distribution)
112121
113122 pip install -U pre-commit
114123
115- + ` snap ` (system-wide)
124+ - ` snap ` (system-wide)
116125
117126 sudo snap install pre-commit
118127
@@ -125,12 +134,16 @@ for instance.
125134 [ documentation] ( https://python-poetry.org/docs/#installation ) , it is best
126135 installed with its own installer:
127136
128- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
137+ curl -sSL \
138+ https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py \
139+ | python -
129140
130141 or on Debian-like distribution (using ` python3 ` instead of ` python ` which is
131142 ` python2 ` ):
132143
133- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
144+ curl -sSL \
145+ https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py \
146+ | python3 -
134147
135148 Once ` poetry ` is installed, run ` poetry install --dev ` to install all the project
136149 packages and the development tooling.
@@ -158,7 +171,8 @@ for instance.
158171 On Debian-like distribution, use:
159172
160173 sudo apt install clang-format-11
161- sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 50
174+ sudo update-alternatives --install /usr/bin/clang-format clang-format \
175+ /usr/bin/clang-format-11 50
162176
163177- ` cpplint ` , a Python tool, is either installed through ` poetry ` , either installed
164178 at a higher level with ` pip ` , ` pipx ` or a package manager.
@@ -169,7 +183,9 @@ All together, on Ubuntu 20.04 or higher, run:
169183 libclang-11-dev python3 python3-pip
170184 sudo apt remove --purge python3-virtualenv virtualenv
171185 pip3 install virtualenv pre-commit
172- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
186+ curl -sSL \
187+ https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py \
188+ | python3 -
173189 # cd path/to/repository/
174190 poetry install --dev
175191 poetry shell
0 commit comments