Skip to content
Merged

V2 #39

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: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ jobs:
- name: Verify version matches tag
run: |
TAG="${GITHUB_REF#refs/tags/v}"
PKG_VERSION=$(python -c "
import re, pathlib
text = pathlib.Path('src/tikhub/_version.py').read_text()
print(re.search(r'__version__\s*=\s*[\"'\''](.*?)[\"'\'']', text).group(1))
")
PKG_VERSION=$(grep -oP '__version__\s*=\s*"\K[^"]+' src/tikhub/_version.py)
if [ "$TAG" != "$PKG_VERSION" ]; then
echo "::error::tag $TAG does not match package version $PKG_VERSION"
exit 1
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "tikhub"
version = "2.1.0"
version = "2.1.1"
description = "Modern Python SDK for the TikHub social-media data API."
readme = "README.md"
license = "MIT"
Expand Down Expand Up @@ -44,10 +44,10 @@ dependencies = [
"httpx>=0.27",
"pydantic>=2.6",
"anyio>=4.0",
"typer>=0.12",
]

[project.optional-dependencies]
cli = ["typer>=0.12"]
docs = [
"mkdocs>=1.6",
"mkdocs-material>=9.5",
Expand Down
2 changes: 1 addition & 1 deletion src/tikhub/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Single source of truth for the SDK version."""

__version__ = "2.1.0"
__version__ = "2.1.1"
8 changes: 2 additions & 6 deletions src/tikhub/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""Optional command-line wrapper for the TikHub SDK.
"""Command-line wrapper for the TikHub SDK.

Install with the ``cli`` extra::

pip install "tikhub[cli]"

Then::
Usage::

tikhub health
tikhub fetch https://v.douyin.com/abc/
Expand Down
7 changes: 1 addition & 6 deletions src/tikhub/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
import sys
from typing import Any, Callable

try:
import typer
except ImportError as exc: # pragma: no cover
raise ImportError(
"The CLI requires the 'cli' extra. Install with: pip install 'tikhub[cli]'"
) from exc
import typer

from tikhub import TikHub, TikHubError, __version__

Expand Down
Loading