refactor: rename project to winnow
- Rename Python package directory if_curator/ → winnow/ - Update all imports, entry points, and CLI references - Update pyproject.toml: name, scripts, package list, repository URL - Update Dockerfile, compose.yml, entrypoint.sh, scheduler.py - Update GitHub Actions workflow image names - Update README Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,14 +9,14 @@ def _asset(days_ago: int) -> dict:
|
||||
|
||||
|
||||
def test_filter_recent_keeps_new_assets(monkeypatch):
|
||||
from if_curator.immich_api import filter_recent_assets
|
||||
from winnow.immich_api import filter_recent_assets
|
||||
assets = [_asset(1), _asset(30), _asset(365 * 5)]
|
||||
result = filter_recent_assets(assets, years=10)
|
||||
assert len(result) == 3
|
||||
|
||||
|
||||
def test_filter_recent_removes_old_assets(monkeypatch):
|
||||
from if_curator.immich_api import filter_recent_assets
|
||||
from winnow.immich_api import filter_recent_assets
|
||||
old = _asset(365 * 15)
|
||||
recent = _asset(10)
|
||||
result = filter_recent_assets([old, recent], years=10)
|
||||
@@ -25,7 +25,7 @@ def test_filter_recent_removes_old_assets(monkeypatch):
|
||||
|
||||
|
||||
def test_filter_recent_boundary(monkeypatch):
|
||||
from if_curator.immich_api import filter_recent_assets
|
||||
from winnow.immich_api import filter_recent_assets
|
||||
just_inside = _asset(365 * 10 - 1)
|
||||
just_outside = _asset(365 * 10 + 1)
|
||||
result = filter_recent_assets([just_inside, just_outside], years=10)
|
||||
@@ -34,7 +34,7 @@ def test_filter_recent_boundary(monkeypatch):
|
||||
|
||||
|
||||
def test_filter_recent_skips_missing_date():
|
||||
from if_curator.immich_api import filter_recent_assets
|
||||
from winnow.immich_api import filter_recent_assets
|
||||
assets = [{"id": "no-date"}, _asset(5)]
|
||||
result = filter_recent_assets(assets, years=10)
|
||||
assert len(result) == 1
|
||||
@@ -42,12 +42,12 @@ def test_filter_recent_skips_missing_date():
|
||||
|
||||
|
||||
def test_filter_recent_skips_bad_date():
|
||||
from if_curator.immich_api import filter_recent_assets
|
||||
from winnow.immich_api import filter_recent_assets
|
||||
assets = [{"id": "bad", "fileCreatedAt": "not-a-date"}, _asset(5)]
|
||||
result = filter_recent_assets(assets, years=10)
|
||||
assert len(result) == 1
|
||||
|
||||
|
||||
def test_filter_recent_empty_list():
|
||||
from if_curator.immich_api import filter_recent_assets
|
||||
from winnow.immich_api import filter_recent_assets
|
||||
assert filter_recent_assets([], years=10) == []
|
||||
|
||||
Reference in New Issue
Block a user