diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6a12d26..60a12a6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,13 +1,14 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.238.0/containers/python-3/.devcontainer/base.Dockerfile # [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster -ARG VARIANT="3.14-bullseye" +ARG VARIANT="3.14.2-bullseye" FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} -# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. -# COPY 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 +# Just Installation +COPY --from=ghcr.io/casey/just:latest /just /usr/local/bin/ + +# 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 \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b9a0c4d..9e64a28 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,24 +21,16 @@ "vscode": { // Set *default* container specific settings.json values on container create. "settings": { - "python.defaultInterpreterPath": "/usr/local/bin/python", - "python.linting.enabled": 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.autoComplete.extraPaths": ["/workspaces"], + "python.defaultInterpreterPath": "/usr/local/bin/python" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "ms-python.python", - "ms-python.vscode-pylance" + "ms-python.vscode-pylance", + "Anthropic.claude-code", + "charliermarsh.ruff" ] } }, @@ -47,7 +39,7 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "python -m pip install --upgrade pip && pip3 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 new file mode 100644 index 0000000..755c4be --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "DavidAnson.vscode-markdownlint", + "ms-python.python", + "ms-python.vscode-pylance", + "ms-vscode-remote.remote-containers", + "charliermarsh.ruff" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 3911f20..6fcd85e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,14 @@ { - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.enabled": true, - "python.linting.flake8Args": [ - "--max-line-length=120", - ] + "editor.tabSize": 4, + "files.autoSave": "afterDelay", + "files.trimTrailingWhitespace": true, + "terminal.integrated.localEchoStyle": "dim", + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.ruff": "explicit", + "source.organizeImports.ruff": "explicit" + } + } } \ No newline at end of file diff --git a/LICENSE b/LICENSE index 5b2878c..b442934 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Aaron H. +Copyright (c) 2018 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ac90ab3..293e5d8 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,4 @@ Note: Project uses `uv` and `just` to manage project configuration and commands * Lint project - `just lint` * Sync uv environment - `just sync` * Run Unit Tests - `just test` +* Install dependency: `uv add {package}` diff --git a/pyproject.toml b/pyproject.toml index 079962a..b3c2243 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,9 @@ dependencies = [] [dependency-groups] dev = ["pytest", "ruff>=0.16.0"] +[tool.pytest.ini_options] +pythonpath = ["."] + [tool.ruff] line-length = 100 target-version = "py314" diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 03f586d..0000000 --- a/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -pythonpath = . \ No newline at end of file