Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- name: Sync dependencies (locked)
run: |
uv sync --locked --all-groups
uv sync --extra rust

- name: Run linters
run: |
Expand All @@ -44,7 +43,6 @@ jobs:
- name: Sync dependencies (locked)
run: |
uv sync --locked --all-groups
uv sync --extra rust

- name: Run tests
run: |
Expand Down
54 changes: 25 additions & 29 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,15 @@ jobs:
test:
uses: ./.github/workflows/test.yml

publish-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Sync dependencies (locked)
run: |
uv sync --locked --all-groups

- name: Deploy to Pages
run: uv run mkdocs gh-deploy --force

build-wheels:
name: Build wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs:
- test
- publish-docs
needs: test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
Expand Down Expand Up @@ -76,8 +55,7 @@ jobs:

build-sdist:
runs-on: ubuntu-latest
needs:
- test
needs: build-wheels
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -106,11 +84,9 @@ jobs:
name: sdist
path: dist/*.tar.gz

publish:
publish-package:
runs-on: ubuntu-latest
needs:
- build-wheels
- build-sdist
needs: build-sdist
permissions:
contents: read
id-token: write
Expand All @@ -131,3 +107,23 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: out

publish-docs:
runs-on: ubuntu-latest
needs: publish-package
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Sync dependencies (locked)
run: |
uv sync --locked --all-groups

- name: Deploy to Pages
run: uv run mkdocs gh-deploy --force
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
- name: Sync dependencies (locked)
run: |
uv sync --locked --all-groups
uv sync --extra rust

- name: Run tests
run: |
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "typeid-python"
version = "0.3.5"
version = "0.3.6"
description = "Python implementation of TypeIDs: type-safe, K-sortable, and globally unique identifiers inspired by Stripe IDs"
authors = [{ name = "Murad Akhundov", email = "[email protected]" }]
requires-python = ">=3.10,<4"
Expand All @@ -27,9 +27,9 @@ dependencies = ["uuid6>=2024.7.10,<2026.0.0"]
[project.optional-dependencies]
cli = ["click"]
yaml = ["PyYAML"]
rust = ["uuid-utils>=0.12.0"]
rust = ["uuid-utils>=0.12.0", "typeid_base32>=0.3.5,<0.4.0"]

[project.urls]
[project.urls]
Homepage = "https://github.com/akhundMurad/typeid-python"
Repository = "https://github.com/akhundMurad/typeid-python"
"Bug Tracker" = "https://github.com/akhundMurad/typeid-python/issues"
Expand Down
1 change: 0 additions & 1 deletion rust-base32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ crate-type = ["cdylib"]

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

5 changes: 5 additions & 0 deletions tests/test_uuid_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
],
)
def test_backend_forced(monkeypatch, value, expected):
try:
import uuid_utils # noqa: F401
except Exception:
pytest.skip("Rust extension uuid_utils not installed in this environment")

monkeypatch.setenv("TYPEID_UUID_BACKEND", value)
backend = get_uuid_backend()
assert backend.name == expected
Expand Down
13 changes: 12 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.