vomebook commited on
Commit ·
e34e2fe
1
Parent(s): 79c1d14
Organize Space quality dependency files
Browse filesFiles changed (4)
17 unmodified lines181920212223242518 unmodified lines4445464748495017 unmodified linesFROM python:3.11.17-slim AS source-check-pythonWORKDIR /checkCOPY requirements-static-check.txt requirements.txt ruff.toml ./RUN pip install --no-cache-dir -r requirements-static-check.txtCOPY app.py ./COPY backend/ backend/COPY typings/ typings/18 unmodified linesCOPY --from=source-check-node /check/ /check/COPY --from=source-check-python /usr/local/lib/python3.11/site-packages/ /tmp/python-static-tools/COPY --from=source-check-python /usr/local/bin/ruff /tmp/python-static-tools/bin/ruffCOPY requirements-static-check.txt ruff.toml ./ENV PYTHONPATH=/tmp/python-static-toolsRUN npx --no-install pyright --project pyrightconfig.json \&& npx --no-install pyright --project pyrightconfig.strict.json \17 unmodified lines18192021222324252618 unmodified lines454647484950515217 unmodified linesFROM python:3.11.17-slim AS source-check-pythonWORKDIR /checkCOPY requirements.txt ruff.toml ./COPY config/dependencies/static-check.txt config/dependencies/static-check.txtRUN pip install --no-cache-dir -r config/dependencies/static-check.txtCOPY app.py ./COPY backend/ backend/COPY typings/ typings/18 unmodified linesCOPY --from=source-check-node /check/ /check/COPY --from=source-check-python /usr/local/lib/python3.11/site-packages/ /tmp/python-static-tools/COPY --from=source-check-python /usr/local/bin/ruff /tmp/python-static-tools/bin/ruffCOPY ruff.toml ./COPY config/dependencies/static-check.txt config/dependencies/static-check.txtENV PYTHONPATH=/tmp/python-static-toolsRUN npx --no-install pyright --project pyrightconfig.json \&& npx --no-install pyright --project pyrightconfig.strict.json \
454 unmodified lines45545645745845946070 unmodified lines531532533534535536454 unmodified linesself.assertIn("pyrightconfig.json pyrightconfig.strict.json", node_stage)self.assertIn("pip install --no-cache-dir -r requirements.txt", dockerfile)self.assertIn("FROM python:3.11.17-slim AS source-check-python", dockerfile)self.assertIn("RUN python -B scripts/check_python_static.py", dockerfile)self.assertIn("FROM node:26.11.1-bookworm-slim AS static-gate-test", dockerfile)self.assertIn("COPY scripts/ scripts/", node_stage)70 unmodified linesruntime = re.split(r'^FROM ', dockerfile, flags=re.M)[-1]self.assertTrue(runtime.startswith("python:3.11.17-slim\n"))self.assertNotIn("COPY quality/", runtime)self.assertIn("COPY --from=search-index-build /native/ /app/", runtime)self.assertIn("COPY --from=search-index-verified /verified-git/ /app/data/", runtime)self.assertIn("COPY --from=search-generation /selected/ /selected/", dockerfile)454 unmodified lines45545645745845946046146246346446570 unmodified lines536537538539540541542543544454 unmodified linesself.assertIn("pyrightconfig.json pyrightconfig.strict.json", node_stage)self.assertIn("pip install --no-cache-dir -r requirements.txt", dockerfile)self.assertIn("FROM python:3.11.17-slim AS source-check-python", dockerfile)python_stage = dockerfile.split("FROM python:3.11.17-slim AS source-check-python", 1)[1].split("\nFROM ", 1)[0]pinned = (ROOT / "config/dependencies/static-check.txt").read_text().splitlines()self.assertEqual(pinned, ["ruff==0.17.3", "coverage==7.17.0", "mutmut==3.8.1"])self.assertIn("COPY config/dependencies/static-check.txt config/dependencies/static-check.txt", python_stage)self.assertIn("RUN pip install --no-cache-dir -r config/dependencies/static-check.txt", python_stage)self.assertIn("RUN python -B scripts/check_python_static.py", dockerfile)self.assertIn("FROM node:26.11.1-bookworm-slim AS static-gate-test", dockerfile)self.assertIn("COPY scripts/ scripts/", node_stage)70 unmodified linesruntime = re.split(r'^FROM ', dockerfile, flags=re.M)[-1]self.assertTrue(runtime.startswith("python:3.11.17-slim\n"))self.assertNotIn("COPY quality/", runtime)self.assertNotIn("config/dependencies/static-check.txt", runtime)self.assertIn("COPY requirements.txt .", runtime)self.assertEqual((ROOT / "config/dependencies/audit.txt").read_text().splitlines(), ["pip-audit==2.10.1"])self.assertIn("COPY --from=search-index-build /native/ /app/", runtime)self.assertIn("COPY --from=search-index-verified /verified-git/ /app/data/", runtime)self.assertIn("COPY --from=search-generation /selected/ /selected/", dockerfile)
Dockerfile+5-3
requirements-audit.txt → config/dependencies/audit.txtRenamed
requirements-static-check.txt → config/dependencies/static-check.txtRenamed
tests/gates/test_static_contract.py+8