Skip to content
Open
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
Binary file added .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# macOS
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
60 changes: 45 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Makefile for Speechmatics Python SDKs

.PHONY: help
.PHONY: test-all test-rt test-batch test-flow
.PHONY: format-all format-rt format-batch format-flow
.PHONY: lint-all lint-rt lint-batch lint-flow
.PHONY: type-check-all type-check-rt type-check-batch type-check-flow
.PHONY: build-all build-rt build-batch build-flow
.PHONY: clean-all clean-rt clean-batch clean-flow clean-flow
.PHONY: test-all test-rt test-batch test-flow test-tts
.PHONY: format-all format-rt format-batch format-flow format-tts
.PHONY: lint-all lint-rt lint-batch lint-flow lint-tts
.PHONY: type-check-all type-check-rt type-check-batch type-check-flow type-check-tts
.PHONY: build-all build-rt build-batch build-flow build-tts
.PHONY: clean-all clean-rt clean-batch clean-flow clean-tts

help:
@echo "Available commands:"
Expand Down Expand Up @@ -49,7 +49,7 @@ help:
@echo ""

# Testing targets
test-all: test-rt test-batch test-flow
test-all: test-rt test-batch test-flow test-tts

test-rt:
pytest tests/rt/ -v
Expand All @@ -60,8 +60,14 @@ test-batch:
test-flow:
pytest tests/flow/ -v

test-tts:
pytest tests/tts/ -v

# Formatting targets
format-all: format-rt format-batch format-flow
format-all: format-rt format-batch format-flow format-tts
format-tests:
cd tests && black .
cd tests && ruff check --fix .

format-rt:
cd sdk/rt/speechmatics && black .
Expand All @@ -75,8 +81,12 @@ format-flow:
cd sdk/flow/speechmatics && black .
cd sdk/flow/speechmatics && ruff check --fix .

format-tts:
cd sdk/tts/speechmatics && black .
cd sdk/tts/speechmatics && ruff check --fix .

# Linting targets
lint-all: lint-rt lint-batch lint-flow
lint-all: lint-rt lint-batch lint-flow lint-tts

lint-rt:
cd sdk/rt/speechmatics && ruff check .
Expand All @@ -87,8 +97,14 @@ lint-batch:
lint-flow:
cd sdk/flow/speechmatics && ruff check .

lint-tts:
cd sdk/tts/speechmatics && ruff check .

lint-tests:
cd tests && ruff check .

# Type checking targets
type-check-all: type-check-rt type-check-batch type-check-flow
type-check-all: type-check-rt type-check-batch type-check-flow type-check-tts

type-check-rt:
cd sdk/rt/speechmatics && mypy .
Expand All @@ -99,18 +115,25 @@ type-check-batch:
type-check-flow:
cd sdk/flow/speechmatics && mypy .

type-check-tts:
cd sdk/tts/speechmatics && mypy .

type-check-tests:
cd tests && mypy .

# Installation targets
install-dev:
python -m pip install --upgrade pip
python -m pip install -e sdk/rt[dev]
python -m pip install -e sdk/batch[dev]
python -m pip install -e sdk/flow[dev]
python -m pip install -e sdk/rt[dev] --config-settings editable_mode=strict
python -m pip install -e sdk/batch[dev] --config-settings editable_mode=strict
python -m pip install -e sdk/flow[dev] --config-settings editable_mode=strict
python -m pip install -e sdk/tts[dev] --config-settings editable_mode=strict

install-build:
python -m pip install --upgrade build

# Building targets
build-all: build-rt build-batch build-flow
build-all: build-rt build-batch build-flow build-tts

build-rt: install-build
cd sdk/rt && python -m build
Expand All @@ -121,8 +144,11 @@ build-batch: install-build
build-flow: install-build
cd sdk/flow && python -m build

build-tts: install-build
cd sdk/tts && python -m build

# Cleaning targets
clean-all: clean-rt clean-batch clean-flow
clean-all: clean-rt clean-batch clean-flow clean-tts

clean-rt:
rm -rf sdk/rt/dist sdk/rt/build sdk/rt/*.egg-info
Expand All @@ -135,3 +161,7 @@ clean-batch:
clean-flow:
rm -rf sdk/flow/dist sdk/flow/build sdk/flow/*.egg-info
find sdk/flow -name __pycache__ -exec rm -rf {} + 2>/dev/null || true

clean-tts:
rm -rf sdk/tts/dist sdk/tts/build sdk/tts/*.egg-info
find sdk/tts -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
Loading