feat: add some toolings

This commit is contained in:
Laurent FAINSIN 2023-04-11 11:12:47 +02:00
parent fe21e43591
commit d887d74852
4 changed files with 72 additions and 0 deletions

15
.editorconfig Normal file
View file

@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{json,toml,yaml,yml}]
indent_size = 2

29
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,29 @@
{
"python.defaultInterpreterPath": "/local_scratch/lfainsin/.conda/envs/pyg/bin/python", // required for python ide tools
"python.terminal.activateEnvironment": false, // or else terminal gets bugged
"python.analysis.typeCheckingMode": "basic", // get ready to be annoyed
"python.formatting.provider": "black", // opinionated, fuck off
"editor.formatOnSave": true, // not based if set to false
"python.linting.enabled": true, // not based if set to false
"python.linting.lintOnSave": true, // not based if set to false
"python.linting.flake8Enabled": false, // in case you want to use flake8 instead of ruff
"python.linting.mypyEnabled": true, // who though dynamic typing was a good idea ?
"python.linting.banditEnabled": true, // just in case
"jupyter.debugJustMyCode": false, // may be useful to set to true !
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true // isort
}
},
"files.insertFinalNewline": true,
"files.exclude": {
"**/.git": true, // defaults
"**/.svn": true, // defaults
"**/.hg": true, // defaults
"**/CVS": true, // defaults
"**/.DS_Store": true, // defaults
"**/Thumbs.db": true, // defaults
"**/__pycache__": true, // annoying
"**/.mypy_cache": true, // annoying
}
}

View file

@ -18,3 +18,8 @@ dependencies:
- trimesh
- scipy
- scikit-learn
#---# tooling (linting, typing...)
- ruff
- mypy
- black
- isort

23
pyproject.toml Normal file
View file

@ -0,0 +1,23 @@
[tool.ruff]
select = ["E", "F", "I"]
line-length = 120
[tool.black]
exclude = '''
/(
\.git
\.venv
)/
'''
include = '\.pyi?$'
line-length = 120
target-version = ["py39"]
[tool.isort]
multi_line_output = 3
profile = "black"
[tool.mypy]
python_version = "3.9"
warn_return_any = true
warn_unused_configs = true