Skip to content

Commit 022ed7c

Browse files
authored
✨ refactor: move to uv (#58)
1 parent 52b4b69 commit 022ed7c

File tree

14 files changed

+191
-261
lines changed

14 files changed

+191
-261
lines changed

.github/workflows/lint-and-fmt.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ jobs:
2424
run: |
2525
npm install -g prettier
2626
27-
- name: Install poetry
28-
run: pipx install poetry
27+
- name: Install uv
28+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
2929

3030
- name: Install python
3131
uses: actions/setup-python@v5
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434
architecture: ${{ matrix.architecture }}
35-
cache: 'poetry'
3635

3736
- name: Install just
3837
uses: extractions/setup-just@v2

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Install poetry
17-
run: pipx install poetry
16+
- name: Install uv
17+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
1818

1919
- name: Install python
2020
uses: actions/setup-python@v5
2121
with:
2222
python-version: '3.x'
23-
cache: 'poetry'
2423

2524
- name: Install just
2625
uses: extractions/setup-just@v2

.github/workflows/unit-test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121

22-
- name: Install poetry
23-
run: pipx install poetry
22+
- name: Install uv
23+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
2424

2525
- name: Install python
2626
uses: actions/setup-python@v5
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
architecture: ${{ matrix.architecture }}
30-
cache: 'poetry'
3130

3231
- name: Install just
3332
uses: extractions/setup-just@v2

.gitignore

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -117,25 +117,8 @@ dmypy.json
117117
# macOS
118118
.DS_Store
119119

120-
# Media files
121-
*.aac
122-
*.mp3
123-
*.mp4
124-
*.m4s
125-
*.xml
126-
*.pb
127-
*.ass
128-
*.srt
129-
*.nfo
130-
131120
# test files
132121
*.test.py
133122

134-
# stub files
135-
py.typed
136-
137123
# logs
138124
log
139-
140-
# test files
141-
__test_files__

justfile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
VERSION := `poetry run python -c "import sys; from moelib import __version__ as version; sys.stdout.write(version)"`
1+
VERSION := `uv run python -c "import sys; from moelib import __version__ as version; sys.stdout.write(version)"`
22

33
install:
4-
poetry install
4+
uv sync --all-extras --dev
55

66
test:
7-
poetry run pytest
7+
uv run pytest
88
just clean
99

1010
fmt:
11-
poetry run ruff format .
11+
uv run ruff format .
1212

1313
lint:
14-
poetry run pyright moelib tests
15-
poetry run ruff check .
14+
uv run pyright src/moelib tests
15+
uv run ruff check .
1616

1717
fmt-docs:
1818
prettier --write '**/*.md'
1919

2020
build:
21-
touch moelib/py.typed
22-
poetry build
21+
uv tool run --from build python -m build --installer uv .
2322

2423
release:
2524
@echo 'Tagging v{{VERSION}}...'
2625
git tag "v{{VERSION}}"
2726
@echo 'Push to GitHub to trigger publish process...'
2827
git push --tags
2928

30-
publish:
31-
touch moelib/py.typed
32-
poetry publish --build
33-
git tag "v{{VERSION}}"
34-
git push --tags
35-
just clean-builds
29+
# Missing command for uv
30+
# publish:
31+
# poetry publish --build
32+
# git tag "v{{VERSION}}"
33+
# git push --tags
34+
# just clean-builds
3635

3736
clean:
3837
find . -name "*.pyc" -print0 | xargs -0 rm -f
@@ -46,15 +45,15 @@ clean-builds:
4645
rm -rf *.egg-info/
4746

4847
ci-install:
49-
poetry install --no-interaction --no-root
48+
just install
5049

5150
ci-fmt-check:
52-
poetry run ruff format --check --diff .
51+
uv run ruff format --check --diff .
5352
prettier --check '**/*.md'
5453

5554
ci-lint:
5655
just lint
5756

5857
ci-test:
59-
poetry run pytest --reruns 3 --reruns-delay 1
58+
uv run pytest --reruns 3 --reruns-delay 1
6059
just clean

poetry.lock

Lines changed: 0 additions & 191 deletions
This file was deleted.

poetry.toml

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)