Skip to content

Commit dbb8813

Browse files
authored
Merge pull request #85 from anomaly/uv-move
Move to using `uv` as the package / project management tool
2 parents 7d292c3 + cf01ab8 commit dbb8813

File tree

7 files changed

+1736
-3302
lines changed

7 files changed

+1736
-3302
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
uses: actions/setup-python@v4
1818
with:
1919
python-version: 3.x
20-
- name: Install poetry
21-
run: pip install poetry
22-
- name: Install dependencies
23-
run: poetry install
20+
- name: Install uv
21+
run: pip install uv
22+
- name: Sync dependencies
23+
run: uv sync --extra dev
2424
- name: Build and Publish to GH Pages
25-
run: cd docs && poetry run mkdocs gh-deploy --force --clean --verbose
25+
run: cd docs && uv run mkdocs gh-deploy --force --clean --verbose

.github/workflows/publish-package.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
with:
2121
version: 3.x
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
23-
- name: Install dependencies
24-
run: |
25-
pip install poetry
26-
poetry install
23+
- name: Install uv
24+
run: pip install uv
25+
- name: Sync dependencies
26+
run: uv sync
2727
- name: Run tests
2828
run: |
2929
export GACC_API_KEY=${{ secrets.GACC_API_KEY }}
@@ -46,15 +46,16 @@ jobs:
4646
with:
4747
version: 3.x
4848
repo-token: ${{ secrets.GITHUB_TOKEN }}
49-
- name: Install dependencies
50-
run: |
51-
pip install poetry
52-
poetry install
49+
- name: Install uv
50+
run: pip install uv
51+
- name: Sync dependencies
52+
run: uv sync
5353
- name: Build package
54-
run: |
55-
poetry build
54+
run: uv build
5655
- name: Publish package
5756
env:
58-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_KEY }}
57+
TWINE_USERNAME: __token__
58+
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
5959
run: |
60-
poetry publish --no-interaction --username __token__ --password $POETRY_PYPI_TOKEN_PYPI
60+
pip install twine
61+
twine upload dist/*

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
with:
2121
version: 3.x
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
23-
- name: Install dependencies
24-
run: |
25-
pip install poetry
26-
poetry install
23+
- name: Install uv
24+
run: pip install uv
25+
- name: Sync dependencies
26+
run: uv sync
2727
- name: Run tests
2828
run: |
2929
export GACC_API_KEY="${{ secrets.GACC_API_KEY }}"

Taskfile.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tasks:
66
publish:tag:
77
vars:
88
PROJ_VERSION:
9-
sh: poetry version | awk '{print $2}'
9+
sh: uv version | awk '{print $2}'
1010
prompt: "Before we build, is the version {{.PROJ_VERSION}} number up to date?"
1111
desc: tags the current commit
1212
cmds:
@@ -16,54 +16,54 @@ tasks:
1616
prompt: Have you made sure the version number is up to date?
1717
desc: builds publishable python package
1818
cmds:
19-
- poetry build
19+
- uv build
2020
test:
2121
desc: runs tests inside the virtualenv
2222
summary: runs all the tests inside the virtualenv, optionally
2323
provide the name of the test as an argument to run a single test
2424

2525
this does not run coverage or provide tap output
2626
cmds:
27-
- poetry run coverage run -m pytest -s tests/{{.CLI_ARGS}}
27+
- uv run coverage run -m pytest -s tests/{{.CLI_ARGS}}
2828
test:tap:
2929
desc: runs tests with tap output
3030
summary: runs all the tests inside the virtualenv, optionally
3131
provide the name of the test as an argument to run a single test
3232
cmds:
33-
- poetry run coverage run -m pytest -s --tap tests/{{.CLI_ARGS}}
33+
- uv run coverage run -m pytest -s --tap tests/{{.CLI_ARGS}}
3434
test:list:
3535
desc: lists the available tests
3636
summary: runs collect only on pytest to list the tests available
3737
cmds:
38-
- poetry run pytest --co
38+
- uv run pytest --co
3939
test:coverreport:
4040
desc: runs coverage inside the server container
4141
cmds:
42-
- poetry run coverage report -m
42+
- uv run coverage report -m
4343
lint:
4444
desc: runs the linter
4545
cmds:
46-
- poetry run flake8 gallagher tests
46+
- uv run flake8 gallagher tests
4747
black:
4848
desc: runs black on the codebase
4949
cmds:
50-
- poetry run black gallagher tests
50+
- uv run black gallagher tests
5151
dev:textual:
5252
desc: runs the textual cli
5353
cmds:
54-
- poetry run textual -- {{.CLI_ARGS}}
54+
- uv run textual -- {{.CLI_ARGS}}
5555
dev:tui:
5656
desc: runs text gallagher console in dev mode
5757
cmds:
58-
- poetry run textual run --dev gallagher.tui
58+
- uv run textual run --dev gallagher.tui
5959
dev:py:
60-
desc: runs python in the poetry shell
60+
desc: runs python in the uv shell
6161
cmds:
62-
- poetry run python -- {{.CLI_ARGS}}
62+
- uv run python -- {{.CLI_ARGS}}
6363
dev:docs:
6464
desc: run the mkdocs server with appropriate flags
6565
cmds:
66-
- cd docs && poetry run mkdocs serve --open -a localhost:8001
66+
- cd docs && uv run mkdocs serve --open -a localhost:8001
6767
debug:get:
6868
desc: use httpie to get payload from CC
6969
summary: |

0 commit comments

Comments
 (0)