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
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Build Docker image
run: |
docker build \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--build-arg UNAME=$(whoami) \
-t visualmic-ci .

- name: Lint
run: docker run --rm --entrypoint "" visualmic-ci ruff check .

- name: Verify import
run: docker run --rm --entrypoint "" visualmic-ci python -c "import visualmic"

- name: Verify --help
run: docker run --rm --entrypoint "" visualmic-ci python visualmic.py --help

- name: Verify --version
run: docker run --rm --entrypoint "" visualmic-ci python visualmic.py --version

test-gpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Build GPU Docker image
run: |
docker build -f Dockerfile.gpu \
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
--build-arg UNAME=$(whoami) \
-t visualmic-gpu-ci .

- name: Lint
run: docker run --rm --entrypoint "" visualmic-gpu-ci ruff check .

- name: Verify import
run: docker run --rm --entrypoint "" visualmic-gpu-ci python -c "import visualmic"

- name: Verify --help
run: docker run --rm --entrypoint "" visualmic-gpu-ci python visualmic.py --help

- name: Verify --version
run: docker run --rm --entrypoint "" visualmic-gpu-ci python visualmic.py --version
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [2.0.0] - 2026-03-21

### Removed
- Denoising (`--denoise`, `--denoise-input`). Use the standalone [`audio_denoising`](https://github.com/joeljose/audio_denoising) tool instead.

### Added
- `--nlevels` CLI flag for configurable DTCWT decomposition levels (default: 3)
- `--biort` and `--qshift` CLI flags for wavelet filter selection (default: `near_sym_b`/`qshift_b`)
- `--version` flag
- Pre-flight GPU VRAM estimation and warning
- Unit tests for CPU and GPU paths (`tests/test_visualmic.py`, `tests/test_visualmic_gpu.py`)
- Docker-based test runner (`test.sh`) supporting cpu/gpu modes
- CI/CD pipeline (`.github/workflows/ci.yml`)
- `CHANGELOG.md`, `CONTRIBUTING.md`, design docs
- `VERSION` file as single source of truth for versioning
- Docker images tagged with version numbers

### Changed
- Default wavelet filters changed to `near_sym_b`/`qshift_b` for both CPU and GPU paths (matching DTCWT Motion Mag v2.0.0). Restore old behavior with `--biort near_sym_a --qshift qshift_a`.
- GPU Dockerfile upgraded from PyTorch 1.12.1/CUDA 11.3 to PyTorch 2.1.2/CUDA 12.1
- `-i`/`--input` is now always required (previously optional when using `--denoise-input`)
- Pinned upper bounds on all dependencies
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Contributing

Thanks for your interest in contributing!

## How to contribute

1. **Open an issue first** — describe the bug or feature before writing code. No silent PRs.
2. **Fork and branch** — create a feature branch from `main`.
3. **Keep PRs small** — one logical change per PR.
4. **Follow PEP 8** — enforced by `ruff` in CI.
5. **Test before opening a PR** — run `./test.sh` (and `./test.sh gpu` if touching GPU code).

## Running tests

All tests run inside Docker — no local Python dependencies needed:

```bash
./test.sh # CPU: lint + unit tests
./test.sh gpu # GPU: lint + unit tests (requires nvidia-container-toolkit)
./test.sh --build # Force rebuild image before testing
```
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ RUN groupadd -g ${GID} ${UNAME} && \

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY requirements.txt requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt

COPY visualmic.py .
COPY tests/ tests/

RUN chown -R ${UID}:${GID} /app

ARG VERSION
LABEL version=${VERSION}

USER ${UNAME}

Expand Down
15 changes: 12 additions & 3 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime
# Pin PyTorch 2.1.2 because pytorch_wavelets is unmaintained (last commit 2023)
# and uses old-style autograd.Function. Tested working with 2.1.2.
# numpy<2 required because pytorch_wavelets uses removed NumPy 2.0 APIs.
FROM pytorch/pytorch:2.1.2-cuda12.1-cudnn8-runtime

RUN apt-get update && \
apt-get install -y --no-install-recommends libgl1 libglib2.0-0 git && \
Expand All @@ -13,11 +16,17 @@ RUN groupadd -g ${GID} ${UNAME} && \

WORKDIR /app

COPY requirements-gpu.txt .
RUN pip install --no-cache-dir -r requirements-gpu.txt && \
COPY requirements-gpu.txt requirements-dev.txt ./
RUN pip install --no-cache-dir -r requirements-gpu.txt -r requirements-dev.txt && \
pip install --no-cache-dir git+https://github.com/fbcotter/pytorch_wavelets.git

COPY visualmic.py .
COPY tests/ tests/

RUN chown -R ${UID}:${GID} /app

ARG VERSION
LABEL version=${VERSION}

USER ${UNAME}

Expand Down
Loading