{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "๐Ÿงฝ Ruff Formatter", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "ruff", "format", ], "options": { "cwd": "${workspaceFolder}", "statusbar": { "hide": true, }, }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "๐Ÿ”ฆ Ruff Linter", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "ruff", "check", "--fix", ], "options": { "cwd": "${workspaceFolder}", "statusbar": { "hide": true, }, }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "๐Ÿงฝ๐Ÿ”ฆ Ruff", "dependsOrder": "sequence", "dependsOn": [ "๐Ÿงฝ Ruff Formatter", "๐Ÿ”ฆ Ruff Linter", ], "group": { "kind": "build", "isDefault": false, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "๐Ÿ”ฆ Pylint", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "pylint", "plotpy", "--disable=duplicate-code", "--disable=fixme", "--disable=too-many-arguments", "--disable=too-many-branches", "--disable=too-many-instance-attributes", "--disable=too-many-lines", "--disable=too-many-locals", "--disable=too-many-public-methods", "--disable=too-many-statements", ], "options": { "cwd": "${workspaceFolder}", }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "๐Ÿš€ Pytest", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "pytest", "--ff", ], "options": { "cwd": "${workspaceFolder}", "env": { "UNATTENDED": "1", }, }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "dedicated", "showReuseMessage": true, "clear": true, }, "type": "shell", }, { "label": "๐Ÿ”Ž Scan translations", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "guidata.utils.translations", "scan", "--name", "plotpy", "--directory", ".", "--copyright-holder", "CEA, Codra, Pierre Raybaut", ], "group": { "kind": "build", "isDefault": false, }, "options": { "cwd": "${workspaceFolder}", }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "๐Ÿ“š Compile translations", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "guidata.utils.translations", "compile", "--name", "plotpy", "--directory", ".", ], "group": { "kind": "build", "isDefault": false, }, "options": { "cwd": "${workspaceFolder}", }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "Generate requirements", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "guidata.utils.genreqs", "all", ], "options": { "cwd": "${workspaceFolder}", "env": { "PYTHONPATH": "C:/Dev/Projets/guidata", }, "statusbar": { "hide": true, }, }, "group": { "kind": "build", "isDefault": false, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, { "label": "๐Ÿ” Reinstall guidata dev", "type": "shell", "command": "${config:python.defaultInterpreterPath}", "args": [ "scripts/run_with_env.py", "${config:python.defaultInterpreterPath}", "${workspaceFolder}/scripts/reinstall_dev.py", ], "options": { "cwd": "${workspaceFolder}", "statusbar": { "hide": true, }, }, "presentation": { "panel": "dedicated", "reveal": "always", }, "problemMatcher": [], }, { "label": "๐Ÿงน Clean Up", "type": "shell", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "guidata.utils.cleanup" ], "options": { "cwd": "${workspaceFolder}" }, "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": false, }, }, { "label": "Upgrade PythonQwt/guidata", "type": "shell", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "pip", "install", "--upgrade", "pip", "PythonQwt", "guidata", ], "options": { "cwd": "scripts", "env": { "PYTHON": "${command:python.interpreterPath}", "UNATTENDED": "1", }, "statusbar": { "hide": true, }, }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": false, }, }, { "label": "๐Ÿ“š Build documentation", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "sphinx", "build", "doc", "${workspaceFolder}/build/doc", "-b", "html", // "-W", ], "options": { "cwd": "${workspaceFolder}", }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", "dependsOrder": "sequence", "dependsOn": [ "Generate requirements", ], }, { "label": "๐ŸŒ Open HTML doc", "type": "shell", "windows": { "command": "start build/doc/index.html", }, "linux": { "command": "xdg-open build/doc/index.html", }, "osx": { "command": "open build/doc/index.html", }, "options": { "cwd": "${workspaceFolder}", }, "problemMatcher": [], }, { "label": "๐Ÿ“ฆ Build package", "type": "shell", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "guidata.utils.securebuild", ], "options": { "cwd": "${workspaceFolder}", }, "group": { "kind": "build", "isDefault": false, }, "presentation": { "clear": true, "panel": "dedicated", }, "problemMatcher": [], "dependsOrder": "sequence", "dependsOn": [ "๐Ÿงน Clean Up", ], }, { "label": "Build all wheels", "type": "shell", "command": "cmd", "options": { "cwd": "scripts", "env": { "PYTHON": "${command:python.interpreterPath}", "UNATTENDED": "1", }, "statusbar": { "hide": true, }, }, "args": [ "/c", "build_wheels.bat", ], "problemMatcher": [], "group": { "kind": "build", "isDefault": false, }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": true, }, "dependsOrder": "sequence", "dependsOn": [ "๐Ÿงน Clean Up", ], }, { "label": "โ›๏ธ Build in place", "type": "shell", "command": "cmd", "options": { "cwd": "scripts", "env": { "PYTHON": "${command:python.interpreterPath}", "UNATTENDED": "1", }, }, "args": [ "/c", "build_inplace.bat", ], "problemMatcher": [], "group": { "kind": "build", "isDefault": true, }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": true, "clear": true, }, "dependsOrder": "sequence", "dependsOn": [ "๐Ÿงน Clean Up", ], }, { "label": "๐Ÿงช Coverage tests", "type": "shell", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "coverage", "run", "-m", "pytest", "plotpy", ], "options": { "cwd": "${workspaceFolder}", "env": { "COVERAGE_PROCESS_START": "${workspaceFolder}/.coveragerc", }, "statusbar": { "hide": true, }, }, "group": { "kind": "test", "isDefault": true, }, "presentation": { "panel": "dedicated", }, "problemMatcher": [], }, { "label": "๐Ÿ“Š Coverage full", "type": "shell", "windows": { "command": "${command:python.interpreterPath} -m coverage combine; if ($?) { ${command:python.interpreterPath} -m coverage html; if ($?) { start htmlcov\\index.html } }", }, "linux": { "command": "${command:python.interpreterPath} -m coverage combine && ${command:python.interpreterPath} -m coverage html && xdg-open htmlcov/index.html", }, "osx": { "command": "${command:python.interpreterPath} -m coverage combine && ${command:python.interpreterPath} -m coverage html && open htmlcov/index.html", }, "options": { "cwd": "${workspaceFolder}", "env": { "COVERAGE_PROCESS_START": "${workspaceFolder}/.coveragerc", }, }, "presentation": { "panel": "dedicated", }, "problemMatcher": [], "dependsOrder": "sequence", "dependsOn": [ "๐Ÿงช Coverage tests", ], }, { "label": "๐Ÿ–ผ๏ธ Icon Browser", "command": "${command:python.interpreterPath}", "args": [ "scripts/run_with_env.py", "${command:python.interpreterPath}", "-m", "guidata.widgets.iconbrowser", "${workspaceFolder}/plotpy/data/icons", ], "options": { "cwd": "${workspaceFolder}", }, "group": { "kind": "build", "isDefault": true, }, "presentation": { "clear": true, "echo": true, "focus": false, "panel": "dedicated", "reveal": "always", "showReuseMessage": true, }, "type": "shell", }, ], }