orix
orix copied to clipboard
Adding Visual Studio Code settings file with suggested settings
I've become a fan of running code formatting on save in my editor (VS Code). We could add a .vscode/settings.json file with settings for the orix project to the repository. Only suggested to use, but strongly encouraged.
Settings I use:
{
"python.testing.pytestEnabled": true,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": false,
"editor.rulers": [
72,
88
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": "explicit"
},
"editor.formatOnSave": true,
},
"files.exclude": {
"**/.git": true,
".venv": true,
".pytest_cache": true,
"**/__pycache__": true
}
}
Thought of this when reading https://github.com/pyxem/orix/pull/552#issuecomment-2815983969.
In the above suggested settings, we should use Black instead of Ruff, since Ruff doesn't work well with the Spyder IDE, according to @argerlt: https://github.com/pyxem/orix/issues/568#issuecomment-3033113599