From 6a7d2a23844a398990998be746238067022763d5 Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 16 Feb 2026 12:32:39 +0100 Subject: [PATCH 1/5] Add mise setup with uv and ruff --- mise.toml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 mise.toml diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..3288498 --- /dev/null +++ b/mise.toml @@ -0,0 +1,32 @@ +min_version = "2024.9.5" + +[env] +# Use the project name derived from the current directory +PROJECT_NAME = "{{ config_root | basename }}" + +# Automatic virtualenv activation +_.python.venv = { path = ".venv", create = true } + +[tools] +python = "{{ get_env(name='PYTHON_VERSION', default='3.14') }}" +ruff = "latest" + +[tasks.install] +description = "Install dependencies" +alias = "i" +run = "uv pip install -r requirements.txt requirements-dev.txt" + +[tasks.test] +description = "Run tests" +run = "pytest tests/" + +[tasks.lint] +description = "Lint the code" +run = "ruff check gitprivacy/" + +[tasks.info] +description = "Print project information" +run = ''' +echo "Project: $PROJECT_NAME" +echo "Virtual Environment: $VIRTUAL_ENV" +''' From 243494001e4883881e64f7a534bd34cbec6cb722 Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:42:15 +0100 Subject: [PATCH 2/5] Run ruff check (linter) on tests as well --- mise.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mise.toml b/mise.toml index 3288498..3bf780e 100644 --- a/mise.toml +++ b/mise.toml @@ -22,7 +22,7 @@ run = "pytest tests/" [tasks.lint] description = "Lint the code" -run = "ruff check gitprivacy/" +run = "ruff check ." [tasks.info] description = "Print project information" From 379be0d3d49883a531e71e335998d36102fe00bd Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:42:36 +0100 Subject: [PATCH 3/5] Add uv to mise tools --- mise.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/mise.toml b/mise.toml index 3bf780e..42e7c8b 100644 --- a/mise.toml +++ b/mise.toml @@ -9,6 +9,7 @@ _.python.venv = { path = ".venv", create = true } [tools] python = "{{ get_env(name='PYTHON_VERSION', default='3.14') }}" +uv = "latest" ruff = "latest" [tasks.install] From cb2443111f86e5ac40c34bf45105095f8f2ee55d Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:43:01 +0100 Subject: [PATCH 4/5] Install editable git-privacy to venv so tests test dev version --- mise.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mise.toml b/mise.toml index 42e7c8b..70a31f1 100644 --- a/mise.toml +++ b/mise.toml @@ -13,9 +13,9 @@ uv = "latest" ruff = "latest" [tasks.install] -description = "Install dependencies" +description = "Install dependencies and install git-privacy in venv in editable mode (necessary for tests)" alias = "i" -run = "uv pip install -r requirements.txt requirements-dev.txt" +run = "uv pip install -r requirements.txt -r requirements-dev.txt -e ." [tasks.test] description = "Run tests" From 4c1707574bb7f582c8ed3de5f0489ace339a1136 Mon Sep 17 00:00:00 2001 From: fap <459631+fapdash@users.noreply.github.com> Date: Mon, 23 Feb 2026 16:43:56 +0100 Subject: [PATCH 5/5] Add ty language server to mise setup --- mise.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mise.toml b/mise.toml index 70a31f1..0bcb751 100644 --- a/mise.toml +++ b/mise.toml @@ -11,12 +11,17 @@ _.python.venv = { path = ".venv", create = true } python = "{{ get_env(name='PYTHON_VERSION', default='3.14') }}" uv = "latest" ruff = "latest" +ty = "latest" [tasks.install] description = "Install dependencies and install git-privacy in venv in editable mode (necessary for tests)" alias = "i" run = "uv pip install -r requirements.txt -r requirements-dev.txt -e ." +[tasks.lsp] +description = "Start the ty language server" +run = "ty server" + [tasks.test] description = "Run tests" run = "pytest tests/"