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
12 changes: 6 additions & 6 deletions src/photo_tools/cli.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import typer
from dotenv import load_dotenv

from photo_tools.clean_unpaired_raws import clean_unpaired_raws
from photo_tools.cli_errors import handle_cli_errors
from photo_tools.cli_reporter import make_reporter
from photo_tools.cli_support.cli_errors import handle_cli_errors
from photo_tools.cli_support.cli_reporter import make_reporter
from photo_tools.commands.clean_unpaired_raws import clean_unpaired_raws
from photo_tools.commands.optimise import optimise
from photo_tools.commands.organise_by_date import organise_by_date
from photo_tools.commands.separate_raws import separate_raws
from photo_tools.core.dependencies import validate_feature
from photo_tools.exceptions import MissingDependencyError
from photo_tools.logging_config import setup_logging
from photo_tools.optimise import optimise
from photo_tools.organise_by_date import organise_by_date
from photo_tools.separate_raws import separate_raws

app = typer.Typer(help="CLI tools for organising and optimising photography workflows.")

Expand Down
Empty file.
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_clean_unpaired_raws.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from photo_tools.clean_unpaired_raws import clean_unpaired_raws
from photo_tools.commands.clean_unpaired_raws import clean_unpaired_raws


def noop_report(level: str, message: str) -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_organise_by_date_command_moves_file(tmp_path, monkeypatch):

monkeypatch.setattr("shutil.which", lambda _: "/usr/bin/fake-exiftool")
monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: datetime(2024, 5, 17),
)

Expand All @@ -68,7 +68,7 @@ def test_organise_by_date_command_dry_run_does_not_move_file(tmp_path, monkeypat

monkeypatch.setattr("shutil.which", lambda _: "/usr/bin/fake-exiftool")
monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: datetime(2024, 5, 17),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_optimise.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from PIL import Image

from photo_tools.optimise import MAX_WIDTH, optimise
from photo_tools.commands.optimise import MAX_WIDTH, optimise


def noop_report(level: str, message: str) -> None:
Expand Down
14 changes: 7 additions & 7 deletions tests/test_organise_by_date.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime

from photo_tools.organise_by_date import organise_by_date
from photo_tools.commands.organise_by_date import organise_by_date


def noop_report(level: str, message: str) -> None:
Expand All @@ -17,7 +17,7 @@ def test_dry_run_does_not_move_files(tmp_path, monkeypatch):
image_file.write_text("fake image content")

monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: datetime(2024, 5, 17),
)

Expand All @@ -42,7 +42,7 @@ def test_moves_file_into_date_folder(tmp_path, monkeypatch):
image_file.write_text("fake image content")

monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: datetime(2024, 5, 17),
)

Expand Down Expand Up @@ -72,7 +72,7 @@ def test_skips_unsupported_files(tmp_path, monkeypatch):
unsupported_file.write_text("not an image")

monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: datetime(2024, 5, 17),
)

Expand Down Expand Up @@ -100,7 +100,7 @@ def test_skips_files_with_missing_date_metadata(tmp_path, monkeypatch):
image_file.write_text("fake image content")

monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: (_ for _ in ()).throw(ValueError("No DateTimeOriginal")),
)

Expand Down Expand Up @@ -133,7 +133,7 @@ def test_moves_files_into_separate_date_folders(tmp_path, monkeypatch):
}

monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda file_path: dates[file_path.name],
)

Expand Down Expand Up @@ -165,7 +165,7 @@ def test_skips_file_when_destination_already_exists(tmp_path, monkeypatch):
existing_file.write_text("existing file")

monkeypatch.setattr(
"photo_tools.organise_by_date.get_image_date",
"photo_tools.commands.organise_by_date.get_image_date",
lambda _: datetime(2024, 5, 17),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_separate_raws.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from photo_tools.separate_raws import separate_raws
from photo_tools.commands.separate_raws import separate_raws


def noop_report(level: str, message: str) -> None:
Expand Down
Loading