You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,16 +13,20 @@ List of steps to follow to adapt the template to your project.
13
13
2. Clone the new repo
14
14
3.[Recommended] Make a virtual environment
15
15
4.[Optional] Set up [git lfs](#git) and *.gitattributes*
16
-
4. Activate pre-commit hook
16
+
5. Activate [pre-commit hook](#git)
17
17
```console
18
-
mv scripts/git_hooks/pre-commit .git/hooks/
18
+
./scripts/setup_git_hooks.sh
19
19
```
20
-
5. Install dev tools
20
+
6.[Configure](#ide---linting) visual studio
21
+
```console
22
+
./scripts/setup_vscode_extensions.sh
23
+
./scripts/setup_vscode_config.sh
24
+
```
25
+
7. Install dev tools
21
26
```console
22
27
pip install -e .[dev]
23
28
```
24
-
6.[Configure](#ide---linting) Visual Code with the linters
25
-
7.[Adapt](#unit-tests-and-test-coverage) workflow and bagdes links to this repo
29
+
8.[Adapt](#unit-tests-and-test-coverage) workflow and bagdes links to this repo
26
30
27
31
28
32
## Configuration
@@ -59,11 +63,13 @@ A *.gitignore* file ensures that the Python temporary files are not committed. I
59
63
60
64
[git LFS](https://git-lfs.com/) can be configured to manage all non-script files (3D models, deep learning models, images, etc.). The list of files is defined in *gitattributes_example*. If you wish to utilize LFS, rename this file to *.gitattributes* and then run ```git lfs install```. It's also a good practice to maintain another repository as a submodule containing all the data.
61
65
62
-
A git hook can be set up to automatically check for PEP8 compliance before committing. Refer to *scripts/git_hooks*. Installing this is recommended as the GitHub workflows will perform the same checks.
66
+
A git hook can be set up to automatically check for PEP8 compliance before committing. Refer to *scripts/git_hooks*. Installing this is recommended as the GitHub workflows will perform the same checks. The script *./scripts/setup_git_hooks.sh* will do this for you.
63
67
64
68
65
69
### IDE - Linting
66
70
71
+
TL;DR Use *./scripts/setup_vscode_extensions.sh* and *./scripts/setup_vscode_config.sh*
72
+
67
73
Visual Studio Code is the recommended IDE. Ensure you have the Python extension installed and [configure](https://dev.to/adamlombard/how-to-use-the-black-python-code-formatter-in-vscode-3lo0) VS Code to auto-format your code using [black](https://black.readthedocs.io).
68
74
69
75
[isort](https://pycqa.github.io/isort/) verifies the order of Python imports. [Set up](https://github.com/microsoft/vscode-isort#import-sorting-on-save) VS Code to handle this automatically.
@@ -72,7 +78,7 @@ Visual Studio Code is the recommended IDE. Ensure you have the Python extension
72
78
73
79
Lastly, [mypy](https://mypy.readthedocs.io/en/stable/index.html) will perform static type checking. In this guide, it's set to run in **strict** mode. Feel free to [adjust the constraints](https://mypy.readthedocs.io/en/stable/getting_started.html?highlight=strict#strict-mode-and-configuration) if they don't align with your project's needs.
74
80
75
-
These tools are configured in the **setup.cfg**file. Their versions are predefined to prevent discrepancies between local and remote checks. It's advisable to keep them updated.
81
+
These tools are configured in the **setup.cfg**and **pyproject.toml** files. Their versions are predefined to prevent discrepancies between local and remote checks. It's advisable to keep them updated.
76
82
77
83
78
84
**A code not compliant with PEP8 guidelines will not be merged.**
0 commit comments