From all of the available VS Code extensions you should install at the very least
flake8
extension (ms-python.flake8)autopep8
extension (ms-python.autopep8)The following files/symbolic links are available in the build directory
env.txt
: a file containing full PYTHONPATH
of the build environmentide_python
: a symbolic link to the python
executable used by Athenaide_flake8
: an executable flake8
wrapper using Athena build environmentide_autopep8
: an executable autopep8
wrapper using Athena build environmentAll provided executables can be used outside of Athena setup on a compatible machine (i.e. AlmaLinux 9 if you use a AlmaLinux 9 build of Athena).
The following settings are configured in the Athena repository by default:
{
"python.defaultInterpreterPath": "${workspaceFolder}/../build/ide_python",
"python.envFile": "${workspaceFolder}/../build/env.txt",
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
},
"autopep8.path": [
"${workspaceFolder}/../build/ide_autopep8"
],
"flake8.path": [
"${workspaceFolder}/../build/ide_flake8"
],
"flake8.args": [
"--isolated",
"--select=ATL,B,F,E101,E7,E9,W6", // note that equals sign is required by VS Code
"--ignore=B006,B007,B019,E701,E702,E704,E741",
"--enable-extensions=ATL902"
],
}
No extra action is needed from your side to use the integrations as long as
your build directory is at the same level as the source directory and named build
.
flake8
checks that run with the Athena build also run automatically in the editor as you code
(including ATLAS-specific checks).autopep8
-based formatting without installing any additional software.