Skip to content

Commit a3ff119

Browse files
chore: Migrate to mise (#19)
- Replace individual Python, task, and uv setup steps with mise-action - Add .mise.toml configuration for tool management - Update CONTRIBUTING.md with new mise-based setup instructions - Add PYTHON_VERSION environment variable for matrix builds
1 parent fc19404 commit a3ff119

File tree

5 files changed

+30
-46
lines changed

5 files changed

+30
-46
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,12 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727

28-
- name: Set up Python 3.10
29-
uses: actions/setup-python@v4
28+
- uses: jdx/mise-action@v2
3029
with:
31-
python-version: "3.10"
32-
33-
- name: Install go-task
34-
uses: arduino/setup-task@v1
35-
with:
36-
version: 3.x
37-
repo-token: ${{ secrets.GITHUB_TOKEN }}
38-
39-
- name: Set up uv
40-
uses: astral-sh/setup-uv@v5
30+
install: true
31+
cache: true
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4134

4235
- name: Setup development environment
4336
run: task setup
@@ -54,23 +47,18 @@ jobs:
5447
strategy:
5548
matrix:
5649
python-version: ["3.9", "3.10", "3.11"]
50+
env:
51+
PYTHON_VERSION: ${{ matrix.python-version }}
5752

5853
steps:
5954
- uses: actions/checkout@v3
6055

61-
- name: Set up Python ${{ matrix.python-version }}
62-
uses: actions/setup-python@v4
56+
- uses: jdx/mise-action@v2
6357
with:
64-
python-version: ${{ matrix.python-version }}
65-
66-
- name: Install go-task
67-
uses: arduino/setup-task@v1
68-
with:
69-
version: 3.x
70-
repo-token: ${{ secrets.GITHUB_TOKEN }}
71-
72-
- name: Set up uv
73-
uses: astral-sh/setup-uv@v5
58+
install: true
59+
cache: true
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7462

7563
- name: Setup development environment
7664
run: task setup

.mise.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[env]
2+
PROJECT_NAME = "{{ cwd | basename }}"
3+
4+
[tools]
5+
python = "{{ get_env(name='PYTHON_VERSION', default='3.10') }}"
6+
task = "latest"
7+
uv = "latest"

CONTRIBUTING.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,28 @@ This document provides guidelines and instructions for setting up your developme
44

55
## Development Environment
66

7-
This project uses [uv](https://github.com/astral-sh/uv) for dependency management and [go-task](https://taskfile.dev/) for task running.
7+
This project uses [mise](https://mise.jdx.dev/) for tool management, [uv](https://github.com/astral-sh/uv) for dependency management, and [go-task](https://taskfile.dev/) for task running.
88

99
### Prerequisites
1010

11-
1. Install uv:
11+
1. Install mise:
1212

1313
```bash
14-
pip install uv
14+
curl https://mise.run | sh
1515
```
1616

17-
1. Install go-task:
18-
19-
```bash
20-
brew install go-task
21-
```
17+
Or via package manager (see [mise installation docs](https://mise.jdx.dev/getting-started.html)).
2218

2319
### Setup Development Environment
2420

25-
1. Set up the development environment:
21+
1. Install tools and set up the development environment:
2622

2723
```bash
24+
mise install
2825
task setup
2926
```
3027

31-
This will create a virtual environment and install all dependencies. The virtual environment will be activated automatically by uv.
28+
This will install Python, uv, and task via mise, then create a virtual environment and install all dependencies.
3229

3330
## Development Tasks
3431

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ chat.invoke([HumanMessage(content="Continue...")])
313313

314314
## Contributing
315315

316-
1. `uv sync`
317-
2. `pytest && ruff check . && mypy .`
316+
1. `mise install && task setup`
317+
2. `task lint && task test`
318318
3. Open a PR!
319319

320320
## Links

taskfile.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# yaml-language-server: $schema=https://taskfile.dev/schema.json
22
#
33
# see https://taskfile.dev/usage/
4-
# brew install go-task
54
#
65
version: 3
76
dotenv: [".env"]
@@ -28,18 +27,11 @@ tasks:
2827
# Setup task: Set up local environment (install dependencies, etc.)
2928
setup:
3029
desc: Set up local environment (install dependencies, etc.)
31-
cmds:
32-
- task: install:uv
33-
34-
# Install uv task: Install Python dependencies using uv
35-
install:uv:
36-
silent: true
3730
sources:
3831
- "pyproject.toml"
3932
cmds:
40-
- echo "Creating virtual environment and installing dependencies with uv..."
41-
- "uv venv .venv"
42-
- "uv pip install -e .[dev,test,lint,typing,codespell]"
33+
- echo "Installing dependencies with uv..."
34+
- "uv sync --all-extras"
4335
status:
4436
- test -d ".venv"
4537

0 commit comments

Comments
 (0)