Skip to content

Commit ef41ae2

Browse files
authored
Merge pull request #68 from akhundMurad/fix/ci-cd
resolve issues between rust and python parts
2 parents 9e66be6 + 970c844 commit ef41ae2

File tree

7 files changed

+45
-37
lines changed

7 files changed

+45
-37
lines changed

.github/workflows/pr.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
- name: Sync dependencies (locked)
2222
run: |
2323
uv sync --locked --all-groups
24-
uv sync --extra rust
2524
2625
- name: Run linters
2726
run: |
@@ -44,7 +43,6 @@ jobs:
4443
- name: Sync dependencies (locked)
4544
run: |
4645
uv sync --locked --all-groups
47-
uv sync --extra rust
4846
4947
- name: Run tests
5048
run: |

.github/workflows/publish.yml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,15 @@ jobs:
1212
test:
1313
uses: ./.github/workflows/test.yml
1414

15-
publish-docs:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
20-
- uses: actions/setup-python@v5
21-
with:
22-
python-version: "3.11"
23-
24-
- name: Install uv
25-
uses: astral-sh/setup-uv@v3
26-
27-
- name: Sync dependencies (locked)
28-
run: |
29-
uv sync --locked --all-groups
30-
31-
- name: Deploy to Pages
32-
run: uv run mkdocs gh-deploy --force
33-
3415
build-wheels:
3516
name: Build wheels (${{ matrix.os }})
3617
runs-on: ${{ matrix.os }}
37-
needs:
38-
- test
39-
- publish-docs
18+
needs: test
4019
strategy:
4120
fail-fast: false
4221
matrix:
4322
os: [ubuntu-latest, macos-latest, windows-latest]
44-
python-version: ["3.11"]
23+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
4524

4625
steps:
4726
- name: Checkout
@@ -76,8 +55,7 @@ jobs:
7655

7756
build-sdist:
7857
runs-on: ubuntu-latest
79-
needs:
80-
- test
58+
needs: build-wheels
8159
steps:
8260
- name: Checkout
8361
uses: actions/checkout@v4
@@ -106,11 +84,9 @@ jobs:
10684
name: sdist
10785
path: dist/*.tar.gz
10886

109-
publish:
87+
publish-package:
11088
runs-on: ubuntu-latest
111-
needs:
112-
- build-wheels
113-
- build-sdist
89+
needs: build-sdist
11490
permissions:
11591
contents: read
11692
id-token: write
@@ -131,3 +107,23 @@ jobs:
131107
uses: pypa/gh-action-pypi-publish@release/v1
132108
with:
133109
packages-dir: out
110+
111+
publish-docs:
112+
runs-on: ubuntu-latest
113+
needs: publish-package
114+
steps:
115+
- uses: actions/checkout@v4
116+
117+
- uses: actions/setup-python@v5
118+
with:
119+
python-version: "3.11"
120+
121+
- name: Install uv
122+
uses: astral-sh/setup-uv@v3
123+
124+
- name: Sync dependencies (locked)
125+
run: |
126+
uv sync --locked --all-groups
127+
128+
- name: Deploy to Pages
129+
run: uv run mkdocs gh-deploy --force

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
- name: Sync dependencies (locked)
3838
run: |
3939
uv sync --locked --all-groups
40-
uv sync --extra rust
4140
4241
- name: Run tests
4342
run: |

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "typeid-python"
3-
version = "0.3.5"
3+
version = "0.3.6"
44
description = "Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs"
55
authors = [{ name = "Murad Akhundov", email = "[email protected]" }]
66
requires-python = ">=3.10,<4"
@@ -27,9 +27,9 @@ dependencies = ["uuid6>=2024.7.10,<2026.0.0"]
2727
[project.optional-dependencies]
2828
cli = ["click"]
2929
yaml = ["PyYAML"]
30-
rust = ["uuid-utils>=0.12.0"]
30+
rust = ["uuid-utils>=0.12.0", "typeid_base32>=0.3.5,<0.4.0"]
3131

32-
[project.urls]
32+
[project.urls]
3333
Homepage = "https://github.com/akhundMurad/typeid-python"
3434
Repository = "https://github.com/akhundMurad/typeid-python"
3535
"Bug Tracker" = "https://github.com/akhundMurad/typeid-python/issues"

rust-base32/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ crate-type = ["cdylib"]
99

1010
[dependencies]
1111
pyo3 = { version = "0.27.2", features = ["extension-module"] }
12-

tests/test_uuid_backend.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
],
1212
)
1313
def test_backend_forced(monkeypatch, value, expected):
14+
try:
15+
import uuid_utils # noqa: F401
16+
except Exception:
17+
pytest.skip("Rust extension uuid_utils not installed in this environment")
18+
1419
monkeypatch.setenv("TYPEID_UUID_BACKEND", value)
1520
backend = get_uuid_backend()
1621
assert backend.name == expected

uv.lock

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)