S-expression parser, evaluator, and primitive registry in shared/sexp/. 109 unit tests covering parsing, evaluation, special forms, lambdas, closures, components (defcomp), and 60+ pure builtins. Test infrastructure: Dockerfile.unit (tier 1, fast) and Dockerfile.integration (tier 2, ffmpeg). Dev watch mode auto-reruns on file changes. Deploy gate blocks push on test failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
1.9 KiB
Docker
52 lines
1.9 KiB
Docker
# Tier 1: Unit tests — pure Python, no services, no DB, no Redis
|
|
# Covers: shared/, artdag/core/, artdag/l1/tests/, artdag/l1/sexp_effects/
|
|
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONPATH=/app
|
|
|
|
WORKDIR /app
|
|
|
|
# Install shared deps (includes pytest, pytest-asyncio)
|
|
COPY shared/requirements.txt ./requirements-shared.txt
|
|
RUN pip install --no-cache-dir -r requirements-shared.txt pytest-watch
|
|
|
|
# Install artdag core as editable package
|
|
COPY artdag/core/ ./artdag/core/
|
|
RUN pip install --no-cache-dir -e artdag/core/[dev]
|
|
|
|
# Install artdag common
|
|
COPY artdag/common/ ./artdag/common/
|
|
RUN pip install --no-cache-dir -e artdag/common/
|
|
|
|
# Install L1 deps that unit tests need (not the heavy ones)
|
|
COPY artdag/l1/requirements.txt ./requirements-l1.txt
|
|
RUN pip install --no-cache-dir -r requirements-l1.txt 2>/dev/null || true
|
|
|
|
# Copy test subjects
|
|
COPY shared/ ./shared/
|
|
COPY artdag/l1/tests/ ./artdag/l1/tests/
|
|
COPY artdag/l1/sexp_effects/ ./artdag/l1/sexp_effects/
|
|
COPY artdag/l1/app/ ./artdag/l1/app/
|
|
COPY artdag/l1/database.py ./artdag/l1/database.py
|
|
COPY artdag/l1/ipfs_client.py ./artdag/l1/ipfs_client.py
|
|
COPY artdag/l1/storage_providers.py ./artdag/l1/storage_providers.py
|
|
COPY artdag/l1/cache_manager.py ./artdag/l1/cache_manager.py
|
|
COPY artdag/l1/claiming.py ./artdag/l1/claiming.py
|
|
COPY artdag/l1/path_registry.py ./artdag/l1/path_registry.py
|
|
COPY artdag/l1/celery_app.py ./artdag/l1/celery_app.py
|
|
COPY artdag/l1/pyproject.toml ./artdag/l1/pyproject.toml
|
|
|
|
# Default: run all unit tests
|
|
CMD ["python", "-m", "pytest", \
|
|
"shared/", \
|
|
"artdag/core/tests/", \
|
|
"artdag/core/artdag/sexp/", \
|
|
"artdag/l1/tests/", \
|
|
"artdag/l1/sexp_effects/", \
|
|
"-v", "--tb=short", \
|
|
"--ignore=artdag/l1/tests/test_jax_primitives.py", \
|
|
"--ignore=artdag/l1/tests/test_jax_pipeline_integration.py", \
|
|
"-k", "not gpu and not cuda"]
|