From 01ac95059e4429bf382a31eda02c634adfb83917 Mon Sep 17 00:00:00 2001 From: mischa Date: Sat, 27 Jun 2026 17:08:11 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20monorepo=20scaffold=20=E2=80=94=20photo?= =?UTF-8?q?flow=20shared=20dist=20+=20trip-cluster=20app=20skeleton?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 6 ++++++ .gitignore | 8 ++++++++ apps/trip-cluster/app/__init__.py | 0 apps/trip-cluster/categorize.py | 5 +++++ apps/trip-cluster/pyproject.toml | 13 +++++++++++++ apps/trip-cluster/tests/conftest.py | 1 + pyproject.toml | 3 +++ shared/photoflow/__init__.py | 0 shared/photoflow/core/__init__.py | 0 shared/photoflow/immich/__init__.py | 0 shared/photoflow/ui/__init__.py | 0 shared/pyproject.toml | 16 ++++++++++++++++ shared/tests/test_imports.py | 4 ++++ 13 files changed, 56 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 apps/trip-cluster/app/__init__.py create mode 100644 apps/trip-cluster/categorize.py create mode 100644 apps/trip-cluster/pyproject.toml create mode 100644 apps/trip-cluster/tests/conftest.py create mode 100644 pyproject.toml create mode 100644 shared/photoflow/__init__.py create mode 100644 shared/photoflow/core/__init__.py create mode 100644 shared/photoflow/immich/__init__.py create mode 100644 shared/photoflow/ui/__init__.py create mode 100644 shared/pyproject.toml create mode 100644 shared/tests/test_imports.py diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..65fd3b9 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +IMMICH_URL=http://your-immich-host:2283 +IMMICH_API_KEY=your-immich-api-key +ANTHROPIC_API_KEY= +DATA_DIR=./data +UID=1000 +GID=1000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c92ae54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +__pycache__/ +*.pyc +.venv/ +data/ +*.db +.env +.pytest_cache/ +*.egg-info/ diff --git a/apps/trip-cluster/app/__init__.py b/apps/trip-cluster/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/apps/trip-cluster/categorize.py b/apps/trip-cluster/categorize.py new file mode 100644 index 0000000..3ee3709 --- /dev/null +++ b/apps/trip-cluster/categorize.py @@ -0,0 +1,5 @@ +import sys +from app.cli import main + +if __name__ == "__main__": + sys.exit(main()) diff --git a/apps/trip-cluster/pyproject.toml b/apps/trip-cluster/pyproject.toml new file mode 100644 index 0000000..f682724 --- /dev/null +++ b/apps/trip-cluster/pyproject.toml @@ -0,0 +1,13 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "trip-cluster" +version = "0.1.0" +requires-python = ">=3.12" +dependencies = ["photoflow", "flask==3.1.0", "requests==2.32.3", "Pillow==11.0.0"] + +[tool.setuptools.packages.find] +where = ["."] +include = ["app*"] diff --git a/apps/trip-cluster/tests/conftest.py b/apps/trip-cluster/tests/conftest.py new file mode 100644 index 0000000..ac60ed2 --- /dev/null +++ b/apps/trip-cluster/tests/conftest.py @@ -0,0 +1 @@ +# Editable installs put `app` and `photoflow` on sys.path; nothing extra needed. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f3e7c59 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[tool.pytest.ini_options] +testpaths = ["shared/tests", "apps/trip-cluster/tests"] +addopts = "-q" diff --git a/shared/photoflow/__init__.py b/shared/photoflow/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shared/photoflow/core/__init__.py b/shared/photoflow/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shared/photoflow/immich/__init__.py b/shared/photoflow/immich/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shared/photoflow/ui/__init__.py b/shared/photoflow/ui/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shared/pyproject.toml b/shared/pyproject.toml new file mode 100644 index 0000000..7ed6113 --- /dev/null +++ b/shared/pyproject.toml @@ -0,0 +1,16 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "photoflow" +version = "0.1.0" +requires-python = ">=3.12" +dependencies = ["requests==2.32.3", "flask==3.1.0", "Pillow==11.0.0"] + +[tool.setuptools.packages.find] +where = ["."] +include = ["photoflow*"] + +[tool.setuptools.package-data] +"photoflow.ui" = ["templates/*.html", "static/*.js"] diff --git a/shared/tests/test_imports.py b/shared/tests/test_imports.py new file mode 100644 index 0000000..7baa49e --- /dev/null +++ b/shared/tests/test_imports.py @@ -0,0 +1,4 @@ +def test_shared_packages_import(): + import photoflow.immich + import photoflow.core + import photoflow.ui