runvault-ai 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runvault_ai-0.1.0/.github/workflows/frontend-ci.yml +44 -0
- runvault_ai-0.1.0/.github/workflows/publish.yml +91 -0
- runvault_ai-0.1.0/.github/workflows/python-ci.yml +53 -0
- runvault_ai-0.1.0/.gitignore +85 -0
- runvault_ai-0.1.0/AGENTS.md +50 -0
- runvault_ai-0.1.0/CONTRIBUTING.md +61 -0
- runvault_ai-0.1.0/PKG-INFO +564 -0
- runvault_ai-0.1.0/README.md +525 -0
- runvault_ai-0.1.0/apps/web/index.html +12 -0
- runvault_ai-0.1.0/apps/web/package.json +26 -0
- runvault_ai-0.1.0/apps/web/src/App.test.ts +8 -0
- runvault_ai-0.1.0/apps/web/src/App.tsx +10 -0
- runvault_ai-0.1.0/apps/web/src/main.tsx +14 -0
- runvault_ai-0.1.0/apps/web/tsconfig.json +10 -0
- runvault_ai-0.1.0/apps/web/vite.config.ts +9 -0
- runvault_ai-0.1.0/docs/adr/0001-library-first-and-single-python-distribution.md +34 -0
- runvault_ai-0.1.0/docs/adr/0002-lightweight-core-and-optional-integrations.md +30 -0
- runvault_ai-0.1.0/docs/adr/0003-separation-of-artifact-data-plane-and-metadata-control-plane.md +33 -0
- runvault_ai-0.1.0/docs/adr/0004-sqlite-local-metadata-and-postgresql-hosted-metadata.md +33 -0
- runvault_ai-0.1.0/docs/adr/0005-storage-provider-abstraction.md +40 -0
- runvault_ai-0.1.0/docs/adr/0006-checkpoint-consistency-and-recovery.md +47 -0
- runvault_ai-0.1.0/docs/adr/0007-bounded-failure-aware-telemetry.md +40 -0
- runvault_ai-0.1.0/docs/adr/0008-reusable-ui-package-and-standalone-dashboard.md +40 -0
- runvault_ai-0.1.0/docs/adr/0009-jupyterhub-and-jupyterlab-as-studio-foundation.md +46 -0
- runvault_ai-0.1.0/examples/quickstart.ipynb +603 -0
- runvault_ai-0.1.0/examples/quickstart.py +188 -0
- runvault_ai-0.1.0/examples/test_gdrive_interactive.py +209 -0
- runvault_ai-0.1.0/package.json +16 -0
- runvault_ai-0.1.0/packages/ui/package.json +41 -0
- runvault_ai-0.1.0/packages/ui/src/index.test.ts +14 -0
- runvault_ai-0.1.0/packages/ui/src/index.ts +35 -0
- runvault_ai-0.1.0/packages/ui/tsconfig.json +9 -0
- runvault_ai-0.1.0/packages/ui/tsup.config.ts +11 -0
- runvault_ai-0.1.0/pnpm-lock.yaml +2021 -0
- runvault_ai-0.1.0/pnpm-workspace.yaml +3 -0
- runvault_ai-0.1.0/pyproject.toml +130 -0
- runvault_ai-0.1.0/runvault/__init__.py +148 -0
- runvault_ai-0.1.0/runvault/api.py +350 -0
- runvault_ai-0.1.0/runvault/core/__init__.py +1 -0
- runvault_ai-0.1.0/runvault/core/checkpoints.py +456 -0
- runvault_ai-0.1.0/runvault/core/db/__init__.py +1 -0
- runvault_ai-0.1.0/runvault/core/db/connection.py +50 -0
- runvault_ai-0.1.0/runvault/core/db/repository.py +691 -0
- runvault_ai-0.1.0/runvault/core/db/schema.py +332 -0
- runvault_ai-0.1.0/runvault/core/domain.py +291 -0
- runvault_ai-0.1.0/runvault/core/errors.py +197 -0
- runvault_ai-0.1.0/runvault/core/session.py +530 -0
- runvault_ai-0.1.0/runvault/core/storage/__init__.py +17 -0
- runvault_ai-0.1.0/runvault/core/storage/base.py +151 -0
- runvault_ai-0.1.0/runvault/core/storage/local.py +446 -0
- runvault_ai-0.1.0/runvault/core/workspace.py +91 -0
- runvault_ai-0.1.0/runvault/integrations/__init__.py +1 -0
- runvault_ai-0.1.0/runvault/integrations/gdrive/__init__.py +29 -0
- runvault_ai-0.1.0/runvault/integrations/gdrive/auth.py +181 -0
- runvault_ai-0.1.0/runvault/integrations/gdrive/provider.py +709 -0
- runvault_ai-0.1.0/runvault/integrations/gdrive/stream.py +215 -0
- runvault_ai-0.1.0/runvault/integrations/torch/__init__.py +106 -0
- runvault_ai-0.1.0/runvault/integrations/torch/manager.py +519 -0
- runvault_ai-0.1.0/runvault/integrations/torch/rng.py +158 -0
- runvault_ai-0.1.0/runvault/integrations/torch/state.py +194 -0
- runvault_ai-0.1.0/runvault/py.typed +1 -0
- runvault_ai-0.1.0/tests/__init__.py +1 -0
- runvault_ai-0.1.0/tests/test_checkpoints.py +1406 -0
- runvault_ai-0.1.0/tests/test_concurrency.py +186 -0
- runvault_ai-0.1.0/tests/test_domain.py +187 -0
- runvault_ai-0.1.0/tests/test_gdrive.py +985 -0
- runvault_ai-0.1.0/tests/test_package.py +48 -0
- runvault_ai-0.1.0/tests/test_sdk_api.py +420 -0
- runvault_ai-0.1.0/tests/test_sqlite_repository.py +882 -0
- runvault_ai-0.1.0/tests/test_storage.py +879 -0
- runvault_ai-0.1.0/tests/test_torch.py +747 -0
- runvault_ai-0.1.0/tsconfig.base.json +32 -0
- runvault_ai-0.1.0/uv.lock +1449 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Frontend CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Frontend Quality, Tests & Builds
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Install pnpm
|
|
23
|
+
uses: pnpm/action-setup@v4
|
|
24
|
+
with:
|
|
25
|
+
version: "10.29.1"
|
|
26
|
+
run_install: false
|
|
27
|
+
|
|
28
|
+
- name: Set up Node.js
|
|
29
|
+
uses: actions/setup-node@v4
|
|
30
|
+
with:
|
|
31
|
+
node-version: "22"
|
|
32
|
+
cache: "pnpm"
|
|
33
|
+
|
|
34
|
+
- name: Install workspace dependencies
|
|
35
|
+
run: pnpm install --frozen-lockfile
|
|
36
|
+
|
|
37
|
+
- name: Build all packages and applications
|
|
38
|
+
run: pnpm build
|
|
39
|
+
|
|
40
|
+
- name: Type check workspace
|
|
41
|
+
run: pnpm typecheck
|
|
42
|
+
|
|
43
|
+
- name: Run frontend unit tests
|
|
44
|
+
run: pnpm test
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: Publish Python Distribution to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- "v*.*.*"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
inputs:
|
|
11
|
+
environment:
|
|
12
|
+
description: "Target deployment environment"
|
|
13
|
+
required: true
|
|
14
|
+
default: "pypi"
|
|
15
|
+
type: choice
|
|
16
|
+
options:
|
|
17
|
+
- "pypi"
|
|
18
|
+
- "testpypi"
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
check-and-build:
|
|
26
|
+
name: Verify Quality & Build Wheel
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
|
|
32
|
+
- name: Install uv
|
|
33
|
+
uses: astral-sh/setup-uv@v5
|
|
34
|
+
with:
|
|
35
|
+
enable-cache: true
|
|
36
|
+
version: "latest"
|
|
37
|
+
|
|
38
|
+
- name: Set up Python 3.11
|
|
39
|
+
run: uv python install 3.11
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies with all extras
|
|
42
|
+
run: |
|
|
43
|
+
uv venv --python 3.11
|
|
44
|
+
uv pip install -e ".[dev,torch,gdrive]"
|
|
45
|
+
|
|
46
|
+
- name: Lint with Ruff
|
|
47
|
+
run: uv run ruff check .
|
|
48
|
+
|
|
49
|
+
- name: Check formatting with Ruff
|
|
50
|
+
run: uv run ruff format --check .
|
|
51
|
+
|
|
52
|
+
- name: Type check with Pyright (strict mode)
|
|
53
|
+
run: uv run pyright
|
|
54
|
+
|
|
55
|
+
- name: Run test suite
|
|
56
|
+
run: uv run pytest
|
|
57
|
+
|
|
58
|
+
- name: Build sdist and wheel
|
|
59
|
+
run: uv build
|
|
60
|
+
|
|
61
|
+
- name: Store distribution artifacts
|
|
62
|
+
uses: actions/upload-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: python-package-distributions
|
|
65
|
+
path: dist/
|
|
66
|
+
retention-days: 7
|
|
67
|
+
|
|
68
|
+
publish:
|
|
69
|
+
name: Publish to PyPI
|
|
70
|
+
needs: [check-and-build]
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
environment:
|
|
73
|
+
name: ${{ github.event.inputs.environment || 'pypi' }}
|
|
74
|
+
url: ${{ (github.event.inputs.environment == 'testpypi') && 'https://test.pypi.org/p/runvault-ai' || 'https://pypi.org/p/runvault-ai' }}
|
|
75
|
+
permissions:
|
|
76
|
+
id-token: write # Mandatory for PyPI Trusted Publishing (OIDC)
|
|
77
|
+
contents: read
|
|
78
|
+
|
|
79
|
+
steps:
|
|
80
|
+
- name: Download distribution artifacts
|
|
81
|
+
uses: actions/download-artifact@v4
|
|
82
|
+
with:
|
|
83
|
+
name: python-package-distributions
|
|
84
|
+
path: dist/
|
|
85
|
+
|
|
86
|
+
- name: Publish package to PyPI via Trusted Publishing
|
|
87
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
88
|
+
with:
|
|
89
|
+
repository-url: ${{ (github.event.inputs.environment == 'testpypi') && 'https://test.pypi.org/legacy/' || '' }}
|
|
90
|
+
packages-dir: dist/
|
|
91
|
+
verbose: true
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Python CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
name: Python ${{ matrix.python-version }} Quality & Tests
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ["3.11", "3.12"]
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
with:
|
|
29
|
+
enable-cache: true
|
|
30
|
+
version: "latest"
|
|
31
|
+
|
|
32
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
33
|
+
run: uv python install ${{ matrix.python-version }}
|
|
34
|
+
|
|
35
|
+
- name: Create virtual environment and install package
|
|
36
|
+
run: |
|
|
37
|
+
uv venv --python ${{ matrix.python-version }}
|
|
38
|
+
uv pip install -e ".[dev,torch,gdrive]"
|
|
39
|
+
|
|
40
|
+
- name: Lint with Ruff
|
|
41
|
+
run: uv run ruff check .
|
|
42
|
+
|
|
43
|
+
- name: Check formatting with Ruff
|
|
44
|
+
run: uv run ruff format --check .
|
|
45
|
+
|
|
46
|
+
- name: Type check with Pyright (strict mode)
|
|
47
|
+
run: uv run pyright
|
|
48
|
+
|
|
49
|
+
- name: Run tests with Pytest
|
|
50
|
+
run: uv run pytest
|
|
51
|
+
|
|
52
|
+
- name: Validate distribution build
|
|
53
|
+
run: uv build
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# Virtual environments
|
|
30
|
+
.venv/
|
|
31
|
+
venv/
|
|
32
|
+
env/
|
|
33
|
+
ENV/
|
|
34
|
+
|
|
35
|
+
# Python tooling caches
|
|
36
|
+
.ruff_cache/
|
|
37
|
+
.pytest_cache/
|
|
38
|
+
.mypy_cache/
|
|
39
|
+
.pyright/
|
|
40
|
+
|
|
41
|
+
# Frontend dependencies & build outputs
|
|
42
|
+
node_modules/
|
|
43
|
+
.pnpm-store/
|
|
44
|
+
.turbo/
|
|
45
|
+
coverage/
|
|
46
|
+
*.tsbuildinfo
|
|
47
|
+
|
|
48
|
+
# OS artifacts
|
|
49
|
+
.DS_Store
|
|
50
|
+
Thumbs.db
|
|
51
|
+
|
|
52
|
+
# Editor & IDE artifacts
|
|
53
|
+
.idea/
|
|
54
|
+
.vscode/
|
|
55
|
+
*.swp
|
|
56
|
+
*.swo
|
|
57
|
+
|
|
58
|
+
# Secrets & Environment variables
|
|
59
|
+
.env
|
|
60
|
+
.env.*
|
|
61
|
+
!.env.example
|
|
62
|
+
credentials.json
|
|
63
|
+
service_account.json
|
|
64
|
+
*.pem
|
|
65
|
+
*.key
|
|
66
|
+
|
|
67
|
+
# Local RunVault artifacts, databases, and logs (data plane / runtime)
|
|
68
|
+
.runvault/
|
|
69
|
+
*.db
|
|
70
|
+
*.sqlite
|
|
71
|
+
*.sqlite3
|
|
72
|
+
*.db-wal
|
|
73
|
+
*.db-shm
|
|
74
|
+
artifacts/
|
|
75
|
+
checkpoints/
|
|
76
|
+
runs/
|
|
77
|
+
data/
|
|
78
|
+
*.pt
|
|
79
|
+
*.pth
|
|
80
|
+
*.bin
|
|
81
|
+
*.safetensors
|
|
82
|
+
*.ckpt
|
|
83
|
+
wandb/
|
|
84
|
+
mlruns/
|
|
85
|
+
lightning_logs/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# RunVault — Agent Instructions and Engineering Rules
|
|
2
|
+
|
|
3
|
+
> Mandatory instructions and behavioral guardrails for all AI coding agents working on the RunVault codebase.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Architectural Integrity & Package Boundaries
|
|
8
|
+
|
|
9
|
+
- **Library-First Invariant:** The Python SDK (`runvault`) must operate independently, offline, and without requiring any server, daemon, or external service. Never introduce mandatory server dependencies to the SDK core.
|
|
10
|
+
- **Single Python Distribution for SDK:** Keep all client SDK capabilities within the single `runvault` distribution package using optional integration extras (such as `[torch]` and `[gdrive]`). Hosted server infrastructure belongs to a separate deployable project and must never be coupled into the SDK distribution package.
|
|
11
|
+
- **Lightweight Core:** The core `runvault` package must rely on the Python standard library wherever practical. Do not make heavy third-party packages (e.g., Pydantic, PyTorch, FastAPI, SQLAlchemy, Google API libraries) mandatory in the SDK core.
|
|
12
|
+
- **Direct-to-Storage Data Plane:** Model checkpoints and artifact binaries must stream directly between the client SDK and storage providers. Binaries must never pass through the metadata API server.
|
|
13
|
+
- **Frontend Modularity:** Keep reusable React UI components inside `packages/ui` (`@runvault/ui`). The dashboard (`apps/web`) is a consumer of `@runvault/ui`. Do not leak application-specific business logic or routes into `packages/ui`.
|
|
14
|
+
- **Preserve Clean Layers:** Keep domain business logic strictly decoupled from transport layers, presentation components, CLI endpoints, and API route handlers.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 2. Typing & Code Standards
|
|
19
|
+
|
|
20
|
+
- **Strict Python Typing:**
|
|
21
|
+
- All Python code must satisfy `pyright` in strict mode (`typeCheckingMode = "strict"`).
|
|
22
|
+
- Explicit type annotations are required on all function arguments, return values, and module-level constants.
|
|
23
|
+
- Do not use `# type: ignore` or Pyright suppressions unless accompanied by a clear, documented comment explaining why an external library's types are broken.
|
|
24
|
+
- **Strict TypeScript Standards:**
|
|
25
|
+
- All TypeScript code must compile under `tsconfig.base.json` strict settings.
|
|
26
|
+
- **Zero `any` Policy:** Do not use `any` or loose type assertions (`as unknown as ...`). Use explicit union types, generics, or `unknown` with runtime type guards.
|
|
27
|
+
- **Code Style & Formatting:**
|
|
28
|
+
- Python: Enforce `ruff check` and `ruff format`.
|
|
29
|
+
- Do not introduce custom formatting styles or disable linter rules without justification.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 3. Dependency & Performance Discipline
|
|
34
|
+
|
|
35
|
+
- **Keep Optional Dependencies Optional:** Any code importing optional integrations (such as PyTorch, Google Drive, or FastAPI) must isolate imports within designated submodules and handle missing dependencies with actionable `ImportError` messages directing users to the appropriate installation extra (e.g., `pip install runvault[torch]`).
|
|
36
|
+
- **Non-Blocking Telemetry:** Never perform synchronous network or disk I/O inside machine learning training step loops. Telemetry must be collected in-memory and flushed asynchronously.
|
|
37
|
+
- **Atomic File Writes:** When persisting checkpoints or local metadata, use atomic write semantics (write to temporary file, `fdatasync`, atomic replace) to prevent data corruption during process interruption or crash.
|
|
38
|
+
- **Never Silently Swallow Errors:** Always handle exceptions explicitly. Never use bare `except:` or catch `Exception` and pass silently without logging or re-raising.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 4. Engineering Workflow & Hygiene
|
|
43
|
+
|
|
44
|
+
- **Inspect Before Mutating:** Always inspect existing code, directory structures, and tests before making modifications.
|
|
45
|
+
- **No Unrelated Refactoring:** Focus strictly on the assigned task. Do not reformat, rename, or reorganize unrelated files or modules.
|
|
46
|
+
- **No Placeholder Business Logic:** Do not commit fake stub implementations or mock bypasses just to make a test pass. Implement the actual contract or do not claim it is implemented.
|
|
47
|
+
- **Test-Driven Verification:** Every new feature, bug fix, or abstraction must be accompanied by unit or integration tests (`pytest` for Python, `vitest` for TypeScript).
|
|
48
|
+
- **Run Mandatory Quality Checks:** Before declaring any task complete, execute the full suite of verification commands:
|
|
49
|
+
- Python: `ruff check .`, `ruff format --check .`, `pyright`, `pytest`
|
|
50
|
+
- Frontend: `pnpm typecheck`, `pnpm test`, `pnpm build`
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing to RunVault
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to RunVault. This document outlines our engineering standards, development workflows, and contribution guidelines.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Git Workflow
|
|
8
|
+
|
|
9
|
+
- **Branching Model:** We use a `main`-based development workflow. All pull requests target the `main` branch.
|
|
10
|
+
- **Commit Messages:** Follow the Conventional Commits specification:
|
|
11
|
+
- `feat: add local filesystem storage provider`
|
|
12
|
+
- `fix: resolve race condition in telemetry queue flush`
|
|
13
|
+
- `docs: update storage abstraction ADR`
|
|
14
|
+
- `refactor: extract atomic write utility in storage engine`
|
|
15
|
+
- **Clean History:** Keep pull requests focused on a single change. Rebase against `main` before submitting.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Python Development Standards
|
|
20
|
+
|
|
21
|
+
- **Python Versions:** We target Python 3.11 and 3.12 in CI. Code must remain compatible with `>=3.11`.
|
|
22
|
+
- **Package Management:** We recommend `uv` for managing dependencies and virtual environments.
|
|
23
|
+
- **Strict Typing:** All code must pass `pyright` in strict mode without errors.
|
|
24
|
+
- **Linting & Formatting:** We use `ruff`:
|
|
25
|
+
```bash
|
|
26
|
+
ruff check .
|
|
27
|
+
ruff format --check .
|
|
28
|
+
```
|
|
29
|
+
- **Testing:** We use `pytest`:
|
|
30
|
+
```bash
|
|
31
|
+
pytest
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Frontend Development Standards
|
|
37
|
+
|
|
38
|
+
- **Package Manager:** `pnpm` (version 9+ or 10+) is required. Do not use npm or yarn.
|
|
39
|
+
- **TypeScript:** Strict mode is enforced across the workspace. Implicit `any` is strictly prohibited.
|
|
40
|
+
- **Monorepo Packages:**
|
|
41
|
+
- `packages/ui`: Reusable component library. No application routing or backend API calls allowed here.
|
|
42
|
+
- `apps/web`: Standalone dashboard application.
|
|
43
|
+
- **Verification Commands:**
|
|
44
|
+
```bash
|
|
45
|
+
pnpm typecheck
|
|
46
|
+
pnpm test
|
|
47
|
+
pnpm build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Pull Request Checklist
|
|
53
|
+
|
|
54
|
+
Before submitting a pull request, ensure:
|
|
55
|
+
1. `ruff check .` and `ruff format --check .` pass.
|
|
56
|
+
2. `pyright` reports 0 errors in strict mode.
|
|
57
|
+
3. `pytest` passes all tests.
|
|
58
|
+
4. `pnpm typecheck` reports 0 TypeScript errors.
|
|
59
|
+
5. `pnpm test` passes all frontend unit tests.
|
|
60
|
+
6. `pnpm build` builds all workspace packages successfully.
|
|
61
|
+
7. Any architectural changes are documented in `docs/adr/`.
|