File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 - name : Verify version matches tag
2020 run : |
2121 TAG="${GITHUB_REF#refs/tags/v}"
22- PKG_VERSION=$(python -c "
23- import re, pathlib
24- text = pathlib.Path('src/tikhub/_version.py').read_text()
25- print(re.search(r'__version__\s*=\s*[\"'\''](.*?)[\"'\'']', text).group(1))
26- " )
22+ PKG_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' src/tikhub/_version.py)
2723 if [ "$TAG" != "$PKG_VERSION" ]; then
2824 echo "::error::tag $TAG does not match package version $PKG_VERSION"
2925 exit 1
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " tikhub"
7- version = " 2.1.0 "
7+ version = " 2.1.1 "
88description = " Modern Python SDK for the TikHub social-media data API."
99readme = " README.md"
1010license = " MIT"
@@ -44,10 +44,10 @@ dependencies = [
4444 " httpx>=0.27" ,
4545 " pydantic>=2.6" ,
4646 " anyio>=4.0" ,
47+ " typer>=0.12" ,
4748]
4849
4950[project .optional-dependencies ]
50- cli = [" typer>=0.12" ]
5151docs = [
5252 " mkdocs>=1.6" ,
5353 " mkdocs-material>=9.5" ,
Original file line number Diff line number Diff line change 11"""Single source of truth for the SDK version."""
22
3- __version__ = "2.1.0 "
3+ __version__ = "2.1.1 "
Original file line number Diff line number Diff line change 1- """Optional command -line wrapper for the TikHub SDK.
1+ """Command -line wrapper for the TikHub SDK.
22
3- Install with the ``cli`` extra::
4-
5- pip install "tikhub[cli]"
6-
7- Then::
3+ Usage::
84
95 tikhub health
106 tikhub fetch https://v.douyin.com/abc/
Original file line number Diff line number Diff line change 1212import sys
1313from typing import Any , Callable
1414
15- try :
16- import typer
17- except ImportError as exc : # pragma: no cover
18- raise ImportError (
19- "The CLI requires the 'cli' extra. Install with: pip install 'tikhub[cli]'"
20- ) from exc
15+ import typer
2116
2217from tikhub import TikHub , TikHubError , __version__
2318
You can’t perform that action at this time.
0 commit comments