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: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Generate API documentation
working-directory: sdk
run: uv run pydoc-markdown
run: uv run poe docs

- name: Checkout docs
uses: actions/checkout@v6
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
uses: astral-sh/setup-uv@v7

- name: Check formatting
run: uv run ruff format --check .
run: uv run poe format

- name: Lint code
run: uv run ruff check .
run: uv run poe lint

type-check:
name: Type Check
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: uv sync
- name: Run ty
run: uv run ty check
run: uv run poe typecheck

test:
name: Test Python ${{ matrix.python-version }}
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Install dependencies
run: uv sync
- name: Run tests with coverage
run: uv run pytest tests/unit/ -v --cov=src/fishaudio --cov-report=xml --cov-report=term
run: uv run poe test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
if: matrix.python-version == '3'
Expand All @@ -74,7 +74,7 @@ jobs:
run: uv sync

- name: Run integration tests
run: uv run pytest tests/integration/ -v
run: uv run poe test-integration
env:
FISH_API_KEY: ${{ secrets.FISH_API_KEY }}

Expand All @@ -94,7 +94,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build package
run: uv build
run: uv run poe build
- name: Check package
run: uv run python -c "import fishaudio; print(f'fishaudio v{fishaudio.__version__}')"
- name: Upload build artifacts
Expand Down
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ asyncio_mode = "auto"
[dependency-groups]
dev = [
"fish-audio-sdk[utils]",
"poethepoet>=0.32.0",
"pydoc-markdown>=4.8.2",
"pytest>=8.3.5",
"pytest-asyncio>=0.24.0",
Expand Down Expand Up @@ -112,5 +113,24 @@ runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true

[tool.poe.tasks]
lint = "ruff check ."
format = "ruff format --check ."
typecheck = "ty check"
check = ["lint", "format", "typecheck"]

lint-fix = "ruff check --fix ."
format-fix = "ruff format ."
fix = ["lint-fix", "format-fix"]

test = "pytest tests/unit/ -v --cov=src/fishaudio --cov-report=xml --cov-report=term"
test-integration = "pytest tests/integration/ -v"

docs = "pydoc-markdown"

[tool.poe.tasks.build]
cmd = "uv build"
executor = {type = "simple"}

[tool.uv.sources]
fish-audio-sdk = { workspace = true }
47 changes: 47 additions & 0 deletions uv.lock

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