From 2c069d33e7caa3d3dff0a44d0a3c7d164fd02ba8 Mon Sep 17 00:00:00 2001 From: Luciana Abud Date: Fri, 21 Jul 2023 13:05:30 -0700 Subject: [PATCH 1/4] Remove deprecated Python settings --- src/python/devcontainer-feature.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/python/devcontainer-feature.json b/src/python/devcontainer-feature.json index b4aa21e25..3580042e8 100644 --- a/src/python/devcontainer-feature.json +++ b/src/python/devcontainer-feature.json @@ -65,15 +65,7 @@ "ms-python.vscode-pylance" ], "settings": { - "python.defaultInterpreterPath": "/usr/local/python/current/bin/python", - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.flake8Enabled": false, - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.mypyEnabled": false, - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", - "python.linting.pylintEnabled": false + "python.defaultInterpreterPath": "/usr/local/python/current/bin/python" } } }, From 57c7bec14dca54fde4b4df2580ed429484180882 Mon Sep 17 00:00:00 2001 From: Luciana Abud Date: Mon, 24 Jul 2023 14:55:09 -0700 Subject: [PATCH 2/4] No longer install Python linters and formatters --- src/python/install.sh | 2 +- test/python/install_additional_python.sh | 18 ------------------ test/python/install_os_provided_python.sh | 18 ------------------ test/python/install_via_oryx.sh | 18 ------------------ test/python/test.sh | 18 ------------------ 5 files changed, 1 insertion(+), 73 deletions(-) diff --git a/src/python/install.sh b/src/python/install.sh index 0e2b1253c..cf365933c 100755 --- a/src/python/install.sh +++ b/src/python/install.sh @@ -26,7 +26,7 @@ CONFIGURE_JUPYTERLAB_ALLOW_ORIGIN="${CONFIGUREJUPYTERLABALLOWORIGIN:-""}" # alongside PYTHON_VERSION, but not set as default. ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}" -DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv" "pytest") +DEFAULT_UTILS=("pipenv" "virtualenv" "pytest") PYTHON_SOURCE_GPG_KEYS="64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5" GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com keyserver hkps://keys.openpgp.org diff --git a/test/python/install_additional_python.sh b/test/python/install_additional_python.sh index d584f4be9..03f29451f 100755 --- a/test/python/install_additional_python.sh +++ b/test/python/install_additional_python.sh @@ -12,29 +12,11 @@ check "python version 3.8 installed" bash -c "ls -l /usr/local/python | grep 3. check "python version 3.9.13 installed" bash -c "ls -l /usr/local/python | grep 3.9.13" # Check that tools can execute - make sure something didn't get messed up in this scenario -check "autopep8" autopep8 --version -check "black" black --version -check "yapf" yapf --version -check "bandit" bandit --version -check "flake8" flake8 --version -check "mypy" mypy --version -check "pycodestyle" pycodestyle --version -check "pydocstyle" pydocstyle --version -check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version -check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" -check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" -check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" -check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" -check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" -check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" -check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" -check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" -check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result diff --git a/test/python/install_os_provided_python.sh b/test/python/install_os_provided_python.sh index e39b51412..f2cd5e53c 100755 --- a/test/python/install_os_provided_python.sh +++ b/test/python/install_os_provided_python.sh @@ -11,29 +11,11 @@ check "pip is installed" pip --version check "pip is installed" pip3 --version # Check that tools can execute -check "autopep8" autopep8 --version -check "black" black --version -check "yapf" yapf --version -check "bandit" bandit --version -check "flake8" flake8 --version -check "mypy" mypy --version -check "pycodestyle" pycodestyle --version -check "pydocstyle" pydocstyle --version -check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version -check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" -check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" -check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" -check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" -check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" -check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" -check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" -check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" -check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result diff --git a/test/python/install_via_oryx.sh b/test/python/install_via_oryx.sh index e39b51412..f2cd5e53c 100755 --- a/test/python/install_via_oryx.sh +++ b/test/python/install_via_oryx.sh @@ -11,29 +11,11 @@ check "pip is installed" pip --version check "pip is installed" pip3 --version # Check that tools can execute -check "autopep8" autopep8 --version -check "black" black --version -check "yapf" yapf --version -check "bandit" bandit --version -check "flake8" flake8 --version -check "mypy" mypy --version -check "pycodestyle" pycodestyle --version -check "pydocstyle" pydocstyle --version -check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version -check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" -check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" -check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" -check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" -check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" -check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" -check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" -check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" -check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result diff --git a/test/python/test.sh b/test/python/test.sh index 038826d5c..16bb04937 100755 --- a/test/python/test.sh +++ b/test/python/test.sh @@ -11,29 +11,11 @@ check "pip is installed" pip --version check "pip is installed" pip3 --version # Check that tools can execute -check "autopep8" autopep8 --version -check "black" black --version -check "yapf" yapf --version -check "bandit" bandit --version -check "flake8" flake8 --version -check "mypy" mypy --version -check "pycodestyle" pycodestyle --version -check "pydocstyle" pydocstyle --version -check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version -check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" -check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" -check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" -check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" -check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" -check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" -check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" -check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" -check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result From 211966b1eda84a6cf12438a67f2c9de6dc8400ce Mon Sep 17 00:00:00 2001 From: Luciana Abud Date: Tue, 8 Aug 2023 13:43:08 -0700 Subject: [PATCH 3/4] Revert "No longer install Python linters and formatters" This reverts commit 57c7bec14dca54fde4b4df2580ed429484180882. --- src/python/install.sh | 2 +- test/python/install_additional_python.sh | 18 ++++++++++++++++++ test/python/install_os_provided_python.sh | 18 ++++++++++++++++++ test/python/install_via_oryx.sh | 18 ++++++++++++++++++ test/python/test.sh | 18 ++++++++++++++++++ 5 files changed, 73 insertions(+), 1 deletion(-) diff --git a/src/python/install.sh b/src/python/install.sh index cf365933c..0e2b1253c 100755 --- a/src/python/install.sh +++ b/src/python/install.sh @@ -26,7 +26,7 @@ CONFIGURE_JUPYTERLAB_ALLOW_ORIGIN="${CONFIGUREJUPYTERLABALLOWORIGIN:-""}" # alongside PYTHON_VERSION, but not set as default. ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}" -DEFAULT_UTILS=("pipenv" "virtualenv" "pytest") +DEFAULT_UTILS=("pylint" "flake8" "autopep8" "black" "yapf" "mypy" "pydocstyle" "pycodestyle" "bandit" "pipenv" "virtualenv" "pytest") PYTHON_SOURCE_GPG_KEYS="64E628F8D684696D B26995E310250568 2D347EA6AA65421D FB9921286F5E1540 3A5CA953F73C700D 04C367C218ADD4FF 0EDDC5F26A45C816 6AF053F07D9DC8D2 C9BE28DEE6DF025C 126EB563A74B06BF D9866941EA5BBD71 ED9D77D5" GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com keyserver hkps://keys.openpgp.org diff --git a/test/python/install_additional_python.sh b/test/python/install_additional_python.sh index 03f29451f..d584f4be9 100755 --- a/test/python/install_additional_python.sh +++ b/test/python/install_additional_python.sh @@ -12,11 +12,29 @@ check "python version 3.8 installed" bash -c "ls -l /usr/local/python | grep 3. check "python version 3.9.13 installed" bash -c "ls -l /usr/local/python | grep 3.9.13" # Check that tools can execute - make sure something didn't get messed up in this scenario +check "autopep8" autopep8 --version +check "black" black --version +check "yapf" yapf --version +check "bandit" bandit --version +check "flake8" flake8 --version +check "mypy" mypy --version +check "pycodestyle" pycodestyle --version +check "pydocstyle" pydocstyle --version +check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version +check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" +check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" +check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" +check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" +check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" +check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" +check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" +check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" +check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result diff --git a/test/python/install_os_provided_python.sh b/test/python/install_os_provided_python.sh index f2cd5e53c..e39b51412 100755 --- a/test/python/install_os_provided_python.sh +++ b/test/python/install_os_provided_python.sh @@ -11,11 +11,29 @@ check "pip is installed" pip --version check "pip is installed" pip3 --version # Check that tools can execute +check "autopep8" autopep8 --version +check "black" black --version +check "yapf" yapf --version +check "bandit" bandit --version +check "flake8" flake8 --version +check "mypy" mypy --version +check "pycodestyle" pycodestyle --version +check "pydocstyle" pydocstyle --version +check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version +check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" +check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" +check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" +check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" +check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" +check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" +check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" +check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" +check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result diff --git a/test/python/install_via_oryx.sh b/test/python/install_via_oryx.sh index f2cd5e53c..e39b51412 100755 --- a/test/python/install_via_oryx.sh +++ b/test/python/install_via_oryx.sh @@ -11,11 +11,29 @@ check "pip is installed" pip --version check "pip is installed" pip3 --version # Check that tools can execute +check "autopep8" autopep8 --version +check "black" black --version +check "yapf" yapf --version +check "bandit" bandit --version +check "flake8" flake8 --version +check "mypy" mypy --version +check "pycodestyle" pycodestyle --version +check "pydocstyle" pydocstyle --version +check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version +check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" +check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" +check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" +check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" +check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" +check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" +check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" +check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" +check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result diff --git a/test/python/test.sh b/test/python/test.sh index 16bb04937..038826d5c 100755 --- a/test/python/test.sh +++ b/test/python/test.sh @@ -11,11 +11,29 @@ check "pip is installed" pip --version check "pip is installed" pip3 --version # Check that tools can execute +check "autopep8" autopep8 --version +check "black" black --version +check "yapf" yapf --version +check "bandit" bandit --version +check "flake8" flake8 --version +check "mypy" mypy --version +check "pycodestyle" pycodestyle --version +check "pydocstyle" pydocstyle --version +check "pylint" pylint --version check "pytest" pytest --version # Check paths in settings check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" check "current symlink works" /usr/local/python/current/bin/python --version +check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" +check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" +check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" +check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" +check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" +check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" +check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" +check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" +check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" # Report result From f98071b46a8b542a08950cdebb96c3065b1ea054 Mon Sep 17 00:00:00 2001 From: Luciana Abud Date: Sat, 30 Sep 2023 12:08:16 -0700 Subject: [PATCH 4/4] Bump minor version --- src/python/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/devcontainer-feature.json b/src/python/devcontainer-feature.json index 3580042e8..a8badf5fa 100644 --- a/src/python/devcontainer-feature.json +++ b/src/python/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "python", - "version": "1.1.0", + "version": "1.1.1", "name": "Python", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/python", "description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",