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
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v7
Expand All @@ -66,10 +68,6 @@ jobs:
with:
python-version: "3.12"

- name: Update Version
run: |
sed -i 's/version = ".*"/version = "${{ needs.validate.outputs.version }}"/' pyproject.toml

- name: Build Package
run: uv build

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ target/
# virtual env
.venv/

# Auto-generated version file (hatch-vcs)
src/pyssertive/_version.py

# uv lock file
uv.lock

Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyssertive"
version = "0.1.0"
dynamic = ["version"]
description = "Fluent, chainable assertions for Django tests. Inspired by Laravel's elegant testing API."
readme = "README.md"
license = { text = "MIT" }
Expand Down Expand Up @@ -40,9 +40,16 @@ Repository = "https://github.com/othercodes/pyssertive.git"
Issues = "https://github.com/othercodes/pyssertive/issues"

[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "vcs"
fallback-version = "0.0.0.dev0"

[tool.hatch.build.hooks.vcs]
version-file = "src/pyssertive/_version.py"

[tool.hatch.build.targets.wheel]
packages = ["src/pyssertive"]

Expand All @@ -68,6 +75,7 @@ exclude = [
".venv",
"build",
"dist",
"src/pyssertive/_version.py",
]

[tool.ruff.lint]
Expand Down
1 change: 1 addition & 0 deletions src/pyssertive/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from pyssertive._version import __version__ as __version__