diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..0bcb751 --- /dev/null +++ b/mise.toml @@ -0,0 +1,38 @@ +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') }}" +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/" + +[tasks.lint] +description = "Lint the code" +run = "ruff check ." + +[tasks.info] +description = "Print project information" +run = ''' +echo "Project: $PROJECT_NAME" +echo "Virtual Environment: $VIRTUAL_ENV" +'''