diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index db8e41c..71baf5c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -11,10 +11,8 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/ # Just Installation COPY --from=ghcr.io/casey/just:latest /just /usr/local/bin/ -# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. -COPY ./languages/python/requirements.txt /tmp/pip-tmp/ -RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ - && rm -rf /tmp/pip-tmp +# uv Installation +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/ # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ @@ -23,6 +21,3 @@ RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requ # [Optional] Uncomment this line to install global node packages. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 -# Aliases - -RUN echo "alias lint='pycodestyle * && pylint *'" >> /etc/bash.bashrc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 55fe1cb..88c3a7c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -9,7 +9,7 @@ // Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local on arm64/Apple Silicon. - "VARIANT": "3.10-bullseye", + "VARIANT": "3.14-bullseye", // Options "NODE_VERSION": "none" } @@ -21,27 +21,15 @@ // Set *default* container specific settings.json values on container create. "settings": { "python.autoComplete.extraPaths": ["/workspaces"], - "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.linting.enabled": true, - "python.linting.pycodestyleEnabled": true, - "python.linting.pylintEnabled": true, - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint" + "python.defaultInterpreterPath": "/usr/local/bin/python" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ - "ms-python.pylint", "ms-python.vscode-pylance", "ms-python.python", - "Anthropic.claude-code" + "Anthropic.claude-code", + "charliermarsh.ruff" ] } }, @@ -50,7 +38,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "pip install --upgrade pip; pip install --user -r requirements.txt", + "postCreateCommand": "uv sync --all-groups", // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "vscode", diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 448cfa9..eafc8b7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "DavidAnson.vscode-markdownlint", "ms-python.python", "ms-python.vscode-pylance", - "ms-vscode-remote.remote-containers" + "ms-vscode-remote.remote-containers", + "charliermarsh.ruff" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 804f791..a47d37e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,13 @@ "editor.tabSize": 4, "files.autoSave": "afterDelay", "files.trimTrailingWhitespace": true, - "terminal.integrated.localEchoStyle": "dim" + "terminal.integrated.localEchoStyle": "dim", + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.ruff": "explicit", + "source.organizeImports.ruff": "explicit" + } + } } diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e48a37f..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -pycodestyle==2.14.0 -pylint==4.0.5 -pytest==9.0.2 -ruff==0.15.9 -rust-just==1.48.1 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 31ee266..0000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[pycodestyle] -max-line-length = 100 -exclude = CHANGELOG.md,.gitignore,LICENSE,.pylintrc,pytest.ini,README.md,requirements.txt,setup.cfg \ No newline at end of file