add a bunch of configs
This commit is contained in:
parent
caca863e02
commit
cc00fa7215
9
.vscode/extensions.json
vendored
Normal file
9
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"editorconfig.editorconfig",
|
||||||
|
"eamodio.gitlens",
|
||||||
|
"ms-python.python",
|
||||||
|
"ms-python.black-formatter",
|
||||||
|
"charliermarsh.ruff",
|
||||||
|
]
|
||||||
|
}
|
17
.vscode/launch.json
vendored
Normal file
17
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Current File",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${file}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"justMyCode": false,
|
||||||
|
"env": {
|
||||||
|
"OMP_NUM_THREADS": "1",
|
||||||
|
"CUDA_VISIBLE_DEVICES": "1",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
67
.vscode/settings.json
vendored
Normal file
67
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
// nice editor settings
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.organizeImports": true,
|
||||||
|
"source.fixAll": false,
|
||||||
|
},
|
||||||
|
"editor.rulers": [
|
||||||
|
120
|
||||||
|
],
|
||||||
|
// editorconfig redundancy
|
||||||
|
"files.insertFinalNewline": true,
|
||||||
|
"files.trimTrailingWhitespace": true,
|
||||||
|
// hidde unimportant files/folders
|
||||||
|
"files.exclude": {
|
||||||
|
// defaults
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.svn": true,
|
||||||
|
"**/.hg": true,
|
||||||
|
"**/CVS": true,
|
||||||
|
"**/.DS_Store": true,
|
||||||
|
"**/Thumbs.db": true,
|
||||||
|
// annoying
|
||||||
|
"**/__pycache__": true,
|
||||||
|
"**/.mypy_cache": true,
|
||||||
|
"**/.ruff_cache": true,
|
||||||
|
"**/*.tmp": true,
|
||||||
|
},
|
||||||
|
// cpp /clang / cmake settings
|
||||||
|
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
|
||||||
|
"C_Cpp.intelliSenseEngine": "disabled",
|
||||||
|
"C_Cpp.intelliSenseEngineFallback": "enabled",
|
||||||
|
"C_Cpp.clang_format_path": "/softs/compiler/llvm/latest/bin/clang-format",
|
||||||
|
"C_Cpp.codeAnalysis.clangTidy.enabled": true,
|
||||||
|
"C_Cpp.codeAnalysis.clangTidy.path": "/softs/compiler/llvm/latest/bin/clang-tidy",
|
||||||
|
"clangd.path": "/softs/compiler/llvm/latest/bin/clangd",
|
||||||
|
"cmake.cmakePath": "/softs/cmake/latest/bin/cmake",
|
||||||
|
"cmake.preferredGenerators": [
|
||||||
|
"Ninja",
|
||||||
|
"Unix Makefiles"
|
||||||
|
],
|
||||||
|
"cmakeFormat.exePath": "/softs/conda/auto/envs/cmake-format/bin/cmake-format",
|
||||||
|
"cmake.languageSupport.dotnetPath": "/softs/conda/auto/envs/dotnet/lib/dotnet/dotnet",
|
||||||
|
// python settings
|
||||||
|
"python.analysis.typeCheckingMode": "basic", // get ready to be annoyed
|
||||||
|
"python.defaultInterpreterPath": "/local_scratch/lfainsin/.conda/envs/pointmlp/bin/python",
|
||||||
|
"python.linting.enabled": true,
|
||||||
|
"python.linting.lintOnSave": true,
|
||||||
|
"python.linting.mypyEnabled": true,
|
||||||
|
// fixes for broken auto-activation on rosetta
|
||||||
|
"python.terminal.activateEnvironment": false,
|
||||||
|
"terminal.integrated.profiles.linux": {
|
||||||
|
"python": {
|
||||||
|
"path": "bash",
|
||||||
|
"icon": "rocket",
|
||||||
|
"args": [
|
||||||
|
"--init-file",
|
||||||
|
".vscode/setup.sh"
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"terminal.integrated.env.linux": {
|
||||||
|
"PYTHONPATH": "${workspaceFolder}/src/",
|
||||||
|
"SLURM_JOB_ID": null, // unset or else lightning_logs v_num uses it
|
||||||
|
},
|
||||||
|
}
|
11
.vscode/setup.sh
vendored
Executable file
11
.vscode/setup.sh
vendored
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
conda_init
|
||||||
|
conda activate pointmlp
|
||||||
|
|
||||||
|
export PS1="(pointmlp)[\\u@\\h \\W]\\$ "
|
||||||
|
|
||||||
|
module load compilers
|
||||||
|
module load mpfr
|
|
@ -6,18 +6,28 @@ channels:
|
||||||
- conda-forge
|
- conda-forge
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
#---# basic python
|
||||||
|
- pytorch
|
||||||
|
- tqdm
|
||||||
|
- numpy
|
||||||
|
- scipy
|
||||||
|
- scikit-learn
|
||||||
|
#---# file readers
|
||||||
|
- h5py
|
||||||
|
- pyyaml
|
||||||
|
#---# tooling (linting, typing...)
|
||||||
|
- ruff
|
||||||
|
- mypy
|
||||||
|
- black
|
||||||
|
- isort
|
||||||
|
#---# visu
|
||||||
|
- matplotlib
|
||||||
|
#---# pytorch
|
||||||
- cudatoolkit
|
- cudatoolkit
|
||||||
- cycler
|
- cycler
|
||||||
- einops
|
- einops
|
||||||
- h5py
|
|
||||||
- matplotlib
|
|
||||||
- numpy
|
|
||||||
- pytorch
|
|
||||||
- pyyaml
|
|
||||||
- scikit-learn
|
|
||||||
- scipy
|
|
||||||
- torchvision
|
- torchvision
|
||||||
- tqdm
|
|
||||||
- pip
|
- pip
|
||||||
- pip:
|
- pip:
|
||||||
- pointnet2_ops_lib/.
|
- pointnet2_ops_lib/.
|
||||||
|
|
64
pyproject.toml
Normal file
64
pyproject.toml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 120
|
||||||
|
ignore-init-module-imports = true
|
||||||
|
ignore = [
|
||||||
|
"G004", # Logging statement uses f-string
|
||||||
|
"EM102", # Exception must not use an f-string literal, assign to variable first
|
||||||
|
"D100", # Missing docstring in public module
|
||||||
|
"D104", # Missing docstring in public package
|
||||||
|
"N812", # Lowercase imported as non lowercase
|
||||||
|
]
|
||||||
|
select = [
|
||||||
|
"A", # flake8-builtins
|
||||||
|
"B", # flake8-bugbear
|
||||||
|
"C90", # mccabe
|
||||||
|
"COM", # flake8-commas
|
||||||
|
"D", # pydocstyle
|
||||||
|
"EM", # flake8-errmsg
|
||||||
|
"E", # pycodestyle errors
|
||||||
|
"F", # Pyflakes
|
||||||
|
"G", # flake8-logging-format
|
||||||
|
"I", # isort
|
||||||
|
"N", # pep8-naming
|
||||||
|
"PIE", # flake8-pie
|
||||||
|
"PTH", # flake8-use-pathlib
|
||||||
|
"TD", # flake8-todo
|
||||||
|
"FIX", # flake8-fixme
|
||||||
|
"RET", # flake8-return
|
||||||
|
"RUF", # ruff
|
||||||
|
"S", # flake8-bandit
|
||||||
|
"TCH", # flake8-type-checking
|
||||||
|
"TID", # flake8-tidy-imports
|
||||||
|
"UP", # pyupgrade
|
||||||
|
"W", # pycodestyle warnings
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.ruff.pydocstyle]
|
||||||
|
convention = "google"
|
||||||
|
|
||||||
|
[tool.ruff.isort]
|
||||||
|
known-first-party = ["pointnet2_ops"]
|
||||||
|
|
||||||
|
[tool.ruff.per-file-ignores]
|
||||||
|
"__init__.py" = ["F401"]
|
||||||
|
"src/aube/main.py" = ["E402", "F401"]
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
exclude = '''
|
||||||
|
/(
|
||||||
|
\.git
|
||||||
|
\.venv
|
||||||
|
)/
|
||||||
|
'''
|
||||||
|
include = '\.pyi?$'
|
||||||
|
line-length = 120
|
||||||
|
target-version = ["py310"]
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
multi_line_output = 3
|
||||||
|
profile = "black"
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = "3.10"
|
||||||
|
warn_return_any = true
|
||||||
|
warn_unused_configs = true
|
Loading…
Reference in a new issue