Skip to content

Commit 0824fb8

Browse files
committed
Migrate project tooling from Poetry to uv
1 parent 00b0f7e commit 0824fb8

7 files changed

Lines changed: 1456 additions & 1126 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,26 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v6
1919

20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v7
22+
with:
23+
version: "0.9.28"
24+
enable-cache: true
25+
2026
- name: Use Python 3.9
2127
uses: actions/setup-python@v6
2228
with:
2329
python-version: "3.9"
2430

25-
- name: Install Poetry
26-
run: python -m pip install poetry==1.8.5
27-
28-
- name: Install Dependencies
29-
run: poetry install
31+
- name: Sync Dependencies
32+
run: uv sync --locked --group dev
3033

3134
- name: Check Code Format
32-
run: poetry run black --check tardis_dev tests
35+
run: uv run black --check tardis_dev tests
3336

3437
- name: Run Tests
35-
run: poetry run pytest tests/ -q -m "not live"
38+
run: uv run pytest tests/ -q -m "not live"
3639

3740
- name: Run Import Smoke Test
3841
run: |
39-
poetry run python -c "from tardis_dev import DEFAULT_ENDPOINT, DEFAULT_DATASETS_ENDPOINT, DEFAULT_CACHE_DIR, Channel, Response, replay, download_datasets, download_datasets_async, get_exchange_details, get_exchange_details_async, clear_cache, default_file_name; print('OK')"
42+
uv run python -c "from tardis_dev import DEFAULT_ENDPOINT, DEFAULT_DATASETS_ENDPOINT, DEFAULT_CACHE_DIR, Channel, Response, replay, download_datasets, download_datasets_async, get_exchange_details, get_exchange_details_async, clear_cache, default_file_name; print('OK')"

.github/workflows/publish.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ jobs:
1818
with:
1919
ref: ${{ github.event.release.target_commitish }}
2020

21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
version: "0.9.28"
25+
enable-cache: true
26+
2127
- name: Use Python 3.9
2228
uses: actions/setup-python@v6
2329
with:
2430
python-version: "3.9"
2531

26-
- name: Install Poetry
27-
run: python -m pip install poetry==1.8.5
28-
2932
- name: Configure Git
3033
run: |
3134
git config --global user.name "GitHub Release Bot"
@@ -38,27 +41,24 @@ jobs:
3841
echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
3942
4043
- name: Update Package Version
41-
run: poetry version "${VERSION}"
42-
43-
- name: Install Dependencies
44-
run: poetry install
44+
run: uv version "${VERSION}"
4545

4646
- name: Run Tests
47-
run: poetry run pytest tests/ -q -m "not live"
47+
run: uv run pytest tests/ -q -m "not live"
4848

4949
- name: Run Import Smoke Test
5050
run: |
51-
poetry run python -c "from tardis_dev import DEFAULT_ENDPOINT, DEFAULT_DATASETS_ENDPOINT, DEFAULT_CACHE_DIR, Channel, Response, replay, download_datasets, download_datasets_async, get_exchange_details, get_exchange_details_async, clear_cache, default_file_name; print('OK')"
51+
uv run python -c "from tardis_dev import DEFAULT_ENDPOINT, DEFAULT_DATASETS_ENDPOINT, DEFAULT_CACHE_DIR, Channel, Response, replay, download_datasets, download_datasets_async, get_exchange_details, get_exchange_details_async, clear_cache, default_file_name; print('OK')"
5252
5353
- name: Build Package
54-
run: poetry build
54+
run: uv build --no-sources
5555

5656
- name: Publish Package
57-
run: poetry publish -u __token__ -p "${{ secrets.PYPI_TOKEN }}"
57+
run: uv publish --token "${{ secrets.PYPI_TOKEN }}" --no-attestations
5858

5959
- name: Commit Version Changes
6060
run: |
61-
git add pyproject.toml
61+
git add pyproject.toml uv.lock
6262
git diff --cached --quiet && exit 0
6363
git commit -m "bump version to ${VERSION}"
6464

.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
.coverage
2-
_build
3-
.DS_Store
4-
.vscode
5-
__pycache__
6-
build/
1+
.coverage
2+
_build
3+
.DS_Store
4+
.vscode
5+
.venv
6+
__pycache__
7+
build/
78
dist/
89
*.egg-info

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,20 @@ pip install tardis-dev
6060
<br/>
6161
<br/>
6262

63+
## Development
64+
65+
This repository uses [`uv`](https://docs.astral.sh/uv/) for dependency management, locking, builds, and release automation.
66+
67+
```bash
68+
uv sync --locked --group dev
69+
uv run black --check tardis_dev tests
70+
uv run pytest tests/ -q -m "not live"
71+
uv build --no-sources
72+
```
73+
74+
<br/>
75+
<br/>
76+
6377
## Documentation
6478

6579
### [See official docs](https://docs.tardis.dev/python-client/quickstart)

0 commit comments

Comments
 (0)