diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e6f1007c..756e54e6 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,12 @@ }, "remoteUser": "root", "onCreateCommand": "echo 'eval \"$(starship init bash)\"' >> ~/.bashrc", - "postCreateCommand": "uv sync && uv run pre-commit install --install-hooks", + "postCreateCommand": "uv sync && pre-commit install --install-hooks", + "containerEnv": { + "VIRTUAL_ENV": "/opt/venv", + "PATH": "/opt/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", + "UV_PROJECT_ENVIRONMENT": "/opt/venv", + }, "customizations": { "vscode": { "extensions": [ @@ -36,8 +41,8 @@ "github.copilot.chat.edits.codesearch.enabled": true, "github.copilot.chat.edits.enabled": true, "github.copilot.nextEditSuggestions.enabled": true, - "python.defaultInterpreterPath": "/workspaces/substrate/.venv/bin/python", - "python.terminal.activateEnvironment": true, + "python.defaultInterpreterPath": "/opt/venv/bin/python", + "python.terminal.activateEnvironment": false, "terminal.integrated.env.linux": { "GIT_EDITOR": "code --wait" }, diff --git a/pyproject.toml b/pyproject.toml index ff0ab8d3..51528ee3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ dependencies = [ [tool.commitizen] bump_message = "bump: v$current_version → v$new_version" +pre_bump_hooks = ["uv lock --offline --upgrade-package substrate"] tag_format = "v$version" update_changelog_on_bump = true version_provider = "pep621" diff --git a/template/.devcontainer/devcontainer.json.jinja b/template/.devcontainer/devcontainer.json.jinja index fa6c9f4c..eea213ff 100644 --- a/template/.devcontainer/devcontainer.json.jinja +++ b/template/.devcontainer/devcontainer.json.jinja @@ -7,7 +7,6 @@ {%- if project_type == 'app' %} "ghcr.io/devcontainers/features/docker-in-docker:2": {}, {%- endif %} - "ghcr.io/devcontainers/features/node:1": {}, "ghcr.io/devcontainers-extra/features/starship": {} }, "overrideCommand": true, diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 60db3919..ad83422c 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -62,6 +62,7 @@ dev = [ [tool.commitizen] # https://commitizen-tools.github.io/commitizen/config/ bump_message = "bump: v$current_version → v$new_version" +pre_bump_hooks = ["uv lock --offline --upgrade-package {{ project_name_kebab_case }}"] tag_format = "v$version" update_changelog_on_bump = true version_provider = "pep621"