Skip to content

Commit 1facb0a

Browse files
authored
Merge pull request #39 from TikHub/v2
V2
2 parents e44bca1 + 0140a52 commit 1facb0a

5 files changed

Lines changed: 7 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ jobs:
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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "tikhub"
7-
version = "2.1.0"
7+
version = "2.1.1"
88
description = "Modern Python SDK for the TikHub social-media data API."
99
readme = "README.md"
1010
license = "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"]
5151
docs = [
5252
"mkdocs>=1.6",
5353
"mkdocs-material>=9.5",

src/tikhub/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Single source of truth for the SDK version."""
22

3-
__version__ = "2.1.0"
3+
__version__ = "2.1.1"

src/tikhub/cli/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
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/

src/tikhub/cli/main.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@
1212
import sys
1313
from 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

2217
from tikhub import TikHub, TikHubError, __version__
2318

0 commit comments

Comments
 (0)