Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
c3ae773
fix(ci): wrong shared coverage folder path
Vchen7629 Apr 17, 2026
9df82d1
feat(shared): added videoJobMessage type struct for use in scene-spli…
Vchen7629 Apr 17, 2026
5ec6e46
feat(video-upload): added helper functions for checking video resolut…
Vchen7629 Apr 17, 2026
f0fc849
tests(video-upload): added unit tests for video.go in service package
Vchen7629 Apr 17, 2026
38a1582
feat(video-upload): updated http.go to check the video resolution and…
Vchen7629 Apr 17, 2026
c20ad15
tests(video-upload): added extra tests for new LOC
Vchen7629 Apr 17, 2026
ed5150c
refactor(backend): created new unmarshalJetstreamMsg helper in shared…
Vchen7629 Apr 17, 2026
67f2572
refactor(backend): extracted duplicated loadConfig and stopHttpApi fu…
Vchen7629 Apr 17, 2026
07f1e50
refactor(video-status): removed duplicated logic in main.go with shar…
Vchen7629 Apr 17, 2026
cdd20ec
refactor(video-upload): replaced duplicate ConnectJobStatus with the …
Vchen7629 Apr 18, 2026
de6e1a3
refactor(backend): created shared ack and nak helper which also captu…
Vchen7629 Apr 18, 2026
8deb99a
feat(video-upscaling): initialized uv project for video-upscaling ser…
Vchen7629 Apr 20, 2026
10ca870
feat(video-upscaling): created load_model.py to load the upscaling mo…
Vchen7629 Apr 20, 2026
c45c6c5
feat(video-upscaling): created logging.py helper
Vchen7629 Apr 20, 2026
e2b18bb
feat(video-upscaling): created helper functions for upscaling model
Vchen7629 Apr 20, 2026
8a160c9
fix(scene-detector): wrong import path
Vchen7629 Apr 20, 2026
f41f610
refactor(shared): moved shared go files to a go folder since i will b…
Vchen7629 Apr 20, 2026
7ddfd71
feat(shared): created python folder in shared for shared python code
Vchen7629 Apr 20, 2026
a4b3a09
refactor(backend): moved duplicated python logic out of scene-detecto…
Vchen7629 Apr 20, 2026
7117f8d
tests(backend): moved shared specific tests out of scene-detector int…
Vchen7629 Apr 20, 2026
223f304
refactor(backend): extracted more logic from scene-detector service.p…
Vchen7629 Apr 20, 2026
3245a51
refactor(backend): moved publish_jetstream to shared folder since its…
Vchen7629 Apr 20, 2026
de4635f
fix(scene-detector): circular imports for SceneSplitMessage pydantic …
Vchen7629 Apr 20, 2026
27922f6
tests(backend): moved consumer specific tests to shared
Vchen7629 Apr 20, 2026
c680700
Refactor(backend): added source_resolution to scene-split-message pyd…
Vchen7629 Apr 20, 2026
2a07452
feat(video-upscaling): added video_upscale helper function
Vchen7629 Apr 21, 2026
985cba7
fix(video-upscaling): updated path typing for load_model.py and batch.py
Vchen7629 Apr 21, 2026
347d461
feat(video-upscaling): created model_router.py to help choose the cor…
Vchen7629 Apr 21, 2026
74bcd12
feat(video-upscaling): created process_msg to handle downloading the …
Vchen7629 Apr 21, 2026
97eb776
refactor(video-upscaling): extracted the print metrics into a seperat…
Vchen7629 Apr 21, 2026
2d9203f
feat(video-upscaling): created service.py to start the service and in…
Vchen7629 Apr 21, 2026
c966b18
chore: updated general makefile
Vchen7629 Apr 21, 2026
4c6b418
chore(frontend): removed unused assets
Vchen7629 Apr 21, 2026
672139e
refactor(frontend): combined videoDownloadButton and videoUploadButto…
Vchen7629 Apr 21, 2026
61cbe73
feat(frontend): video upload with different features like transcode, …
Vchen7629 Apr 21, 2026
9a88921
fix(backend): updated logging.py in shared to accept service name rat…
Vchen7629 Apr 21, 2026
4508507
feat(scene-detector): updated the http route to accept source resolut…
Vchen7629 Apr 21, 2026
8a311cb
fix(backend): added missing logger to connection.py
Vchen7629 Apr 21, 2026
7fed178
fix(video-upscaling): removed duplicate logs and fixed output dir errpr
Vchen7629 Apr 21, 2026
9c2f6f1
fix(video-upscaling): updated 2k to 1440p
Vchen7629 Apr 21, 2026
672c6b7
fix(backend): updated shared upload_video to accept a storage_url
Vchen7629 Apr 21, 2026
955e43a
tests(scene-detector): updated tests with missing params
Vchen7629 Apr 21, 2026
3034b82
tests(shared): updated python shared tests with new params
Vchen7629 Apr 21, 2026
e46a6b0
deps(shared-python): added pyrefly
Vchen7629 Apr 21, 2026
3545a49
chore(backend): ruff formatting
Vchen7629 Apr 21, 2026
f7652bc
feat(ci): added ci for shared python folder
Vchen7629 Apr 21, 2026
4a574c2
refactor(backend): moved shared start health http server function out…
Vchen7629 Apr 21, 2026
19c3ea7
feat(video-upscaling): added upscaling models
Vchen7629 Apr 21, 2026
94a8553
fix(video-upscaling): added missing comma to video_downscale
Vchen7629 Apr 22, 2026
d2b6d50
chore(video-upscaling): added more testing dependencies
Vchen7629 Apr 22, 2026
14e8f21
tests(video-upscaling): added unit/integration tests for video-upscaling
Vchen7629 Apr 22, 2026
b81cf82
fix(video-upload): added missing http request values to tests
Vchen7629 Apr 22, 2026
629866e
fix(transcoder-worker): added bandaid -p fix
Vchen7629 Apr 22, 2026
138b42f
deps(shared-python): added pytest-cov for test coverage
Vchen7629 Apr 22, 2026
74954e9
chore(shared-python): added type annotation
Vchen7629 Apr 22, 2026
48e0159
refactor(backend): replaced duplicate service StartSeaweedFSFiler tes…
Vchen7629 Apr 22, 2026
9ca4871
tests(shared-go): added unit tests for helpers.go
Vchen7629 Apr 22, 2026
912aa95
refactor(backend): removed duplicate OpenTestVideo test helper from b…
Vchen7629 Apr 22, 2026
c681a15
refactor(backend): replaced duplicate SetupNats in services with the …
Vchen7629 Apr 22, 2026
5cb7859
Merge branch 'main' into phase-five
Vchen7629 Apr 22, 2026
2a6a87e
fix(backend): updated uv lock
Vchen7629 Apr 22, 2026
06ff23d
Merge branch 'phase-five' of https://github.com/Vchen7629/Splice into…
Vchen7629 Apr 22, 2026
06b1da5
fix(ci): wrong filter output name
Vchen7629 Apr 22, 2026
633491c
tests(video-status): added missing tiemout causing issues in github a…
Vchen7629 Apr 22, 2026
467e7db
feat(video-upscaling): updated it to send video progress to the job s…
Vchen7629 Apr 22, 2026
98bc69e
feat(frontend): updated frontend to display the progress
Vchen7629 Apr 22, 2026
89a3612
chore(shared-python): ruff formatting + updated type annotation for k…
Vchen7629 Apr 22, 2026
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
71 changes: 58 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
video_recombiner: ${{ steps.changes.outputs.video_recombiner }}
video_upload: ${{ steps.changes.outputs.video_upload }}
video_status: ${{ steps.changes.outputs.video_status }}
shared: ${{ steps.changes.outputs.shared }}
shared_go: ${{ steps.changes.outputs.shared_go }}
shared_python: ${{ steps.changes.outputs.shared_python }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
Expand All @@ -40,8 +41,10 @@ jobs:
- 'backend/video-upload/**'
video_status:
- 'backend/video-status/**'
shared:
- 'backend/shared/**'
shared_go:
- 'backend/shared/go/**'
shared_python:
- 'backend/shared/python/**'
frontend-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.frontend == 'true' }}
Expand Down Expand Up @@ -226,9 +229,9 @@ jobs:
working-directory: ./backend/video-status/cmd
run: make test_all

shared-ci:
shared-go-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.shared == 'true' }}
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.shared_go == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -241,19 +244,55 @@ jobs:
cache: 'true'

- name: Download Go modules
working-directory: ./backend/shared
working-directory: ./backend/shared/go
run: go mod download

- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
working-directory: ./backend/shared
working-directory: ./backend/shared/go

- name: run tests
working-directory: ./backend/shared
working-directory: ./backend/shared/go
run: make test_all

shared-python-ci:
needs: path-filter
if: ${{ github.event_name == 'pull_request' && needs.path-filter.outputs.shared_python == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.19"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install the project
run: uv sync --locked --all-extras --dev
working-directory: ./backend/shared/python

- name: Run Linter and Formatting
run: |
uv run ruff check .
uv run ruff format --check
working-directory: ./backend/shared/python

- name: Run Type Checking
run: uv run pyrefly check
working-directory: ./backend/shared/python

- name: Run Unit/Integration Tests
run: make test_all
working-directory: ./backend/shared/python

coverage:
needs: path-filter
runs-on: ubuntu-latest
Expand All @@ -264,7 +303,8 @@ jobs:
needs.path-filter.outputs.video_recombiner == 'true' ||
needs.path-filter.outputs.video_upload == 'true' ||
needs.path-filter.outputs.video_status == 'true' ||
needs.path-filter.outputs.shared == 'true'
needs.path-filter.outputs.shared_go == 'true' ||
needs.path-filter.outputs.shared_python == 'true'
)
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -301,8 +341,12 @@ jobs:
working-directory: ./backend/video-status/cmd
run: make coverage

- name: Run shared coverage
working-directory: ./backend/shared
- name: Run shared go coverage
working-directory: ./backend/shared/go
run: make coverage

- name: Run shared python coverage
working-directory: ./backend/shared/python
run: make coverage

- name: Upload coverage to Codecov
Expand All @@ -313,6 +357,7 @@ jobs:
./backend/video-recombiner/cmd/coverage.out,
./backend/video-upload/cmd/coverage.out,
./backend/video-status/cmd/coverage.out,
./backend/shared/coverage.out,
./backend/scene-detector/coverage.xml
./backend/scene-detector/coverage.xml,
./backend/shared/go/coverage.out,
./backend/shared/python/coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ docs/
__pycache__/
.pytest_cache/
.ruff_cache/
shared_python.egg-info

# Logs
logs
Expand Down
2 changes: 1 addition & 1 deletion backend/go.work
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
go 1.26.2

use (
./shared
./shared/go
./pipeline-tests
./transcoder-worker
./video-recombiner
Expand Down
1 change: 1 addition & 0 deletions backend/go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
go.opentelemetry.io/contrib/detectors/gcp v1.39.0/go.mod h1:t/OGqzHBa5v6RHZwrDBJ2OirWc+4q/w2fTbLZwAKjTk=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ=
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8=
Expand Down
4 changes: 3 additions & 1 deletion backend/pipeline-tests/e2e_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"os/exec"
"path/filepath"
"pipeline-tests/helpers"

shelpers "shared/test"
"testing"
"time"
"github.com/stretchr/testify/assert"
Expand All @@ -18,7 +20,7 @@ import (
var sharedFilerURL string

func TestMain(m *testing.M) {
filerURL, cleanup := helpers.StartSeaweedFSFiler()
filerURL, cleanup := shelpers.StartSeaweedFSFiler()
sharedFilerURL = filerURL

code := m.Run()
Expand Down
39 changes: 0 additions & 39 deletions backend/pipeline-tests/helpers/storage.go

This file was deleted.

7 changes: 6 additions & 1 deletion backend/scene-detector/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ dependencies = [
"scenedetect[opencv-headless]>=0.6.7.1",
"structlog>=25.5.0",
"types-requests>=2.33.0.20260402",
"shared_python"
]

[tool.uv.sources]
shared_python = { path = "../shared/python", editable = true }

[tool.pyright]
venvPath = "."
venv = ".venv"
Expand All @@ -22,7 +26,8 @@ extraPaths = ["."]
[tool.pyrefly]
python-version = "3.13"
untyped-def-behavior = "check-and-infer-return-any"
search-path = ["."]
search-path = [".", "../shared/python/src"]
venv = ".venv"

[tool.pyrefly.errors]
unannotated-parameter = "error"
Expand Down
19 changes: 4 additions & 15 deletions backend/scene-detector/src/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,13 @@

class Settings(BaseSettings):
# general config
LOG_LEVEL: str = "DEBUG"
LOG_FORMAT: str = "json"
HTTP_PORT: int = 9098
SERVICE_NAME: str = "scene-detector"

# Nats config
NATS_URL: str = "nats://localhost:4222"
NATS_SUB_QUEUE_NAME: str = "scene-detector-workers"
SCENE_SPLIT_SUBJECT: str = (
"jobs.video.scene-split" # topic containing Job ID + storage path in MinIO
)
VIDEO_CHUNKS_SUBJECT: str = "jobs.video.chunks"

MAX_RECONNECT_ATTEMPT: int = 5
RECONNECT_TIME_WAIT_S: int = 2

MAX_DELIVER_ATTEMPTS: int = 3
ACK_WAIT_S: int = 30
KV_BUCKET_TTL_S: int = 3 * 60 * 60 # 3 hour TTL
SUB_QUEUE_NAME: str = "scene-detector-workers"
SUB_SUBJECT: str = "jobs.video.scene-split"
PUB_SUBJECT: str = "jobs.video.chunks"

BASE_STORAGE_URL: str = "http://localhost:8888"

Expand Down
38 changes: 0 additions & 38 deletions backend/scene-detector/src/handler/connection.py

This file was deleted.

46 changes: 0 additions & 46 deletions backend/scene-detector/src/handler/publisher.py

This file was deleted.

Loading
Loading