codebatch 1.0.0__tar.gz → 1.0.1__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.
- {codebatch-1.0.0 → codebatch-1.0.1}/.github/workflows/ci.yml +168 -166
- {codebatch-1.0.0 → codebatch-1.0.1}/.github/workflows/pages.yml +50 -50
- {codebatch-1.0.0 → codebatch-1.0.1}/.github/workflows/publish.yml +140 -138
- {codebatch-1.0.0 → codebatch-1.0.1}/.gitignore +52 -52
- {codebatch-1.0.0 → codebatch-1.0.1}/.spec_baseline_hash +1 -1
- {codebatch-1.0.0 → codebatch-1.0.1}/CHANGELOG.md +130 -103
- {codebatch-1.0.0 → codebatch-1.0.1}/Dockerfile +15 -15
- {codebatch-1.0.0 → codebatch-1.0.1}/LICENSE +21 -21
- {codebatch-1.0.0 → codebatch-1.0.1}/PKG-INFO +1 -1
- {codebatch-1.0.0 → codebatch-1.0.1}/README.es.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/README.fr.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/README.hi.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/README.it.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/README.ja.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/README.md +194 -194
- {codebatch-1.0.0 → codebatch-1.0.1}/README.pt-BR.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/README.zh.md +165 -165
- {codebatch-1.0.0 → codebatch-1.0.1}/SCORECARD.md +44 -44
- {codebatch-1.0.0 → codebatch-1.0.1}/SECURITY.md +29 -29
- {codebatch-1.0.0 → codebatch-1.0.1}/SHIP_GATE.md +80 -80
- {codebatch-1.0.0 → codebatch-1.0.1}/SPEC.md +342 -342
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/GATES.md +1000 -1000
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/INTEGRATION.md +359 -359
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE2_ACCEPTANCE.md +158 -158
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE2_CHARTER.md +175 -175
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE2_RULES.md +142 -142
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE3_CHARTER.md +183 -183
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE3_GATES.md +94 -94
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE6_CHARTER.md +181 -181
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE7_CHARTER.md +314 -314
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/PHASE8_CHARTER.md +333 -333
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/TASKS.md +533 -533
- {codebatch-1.0.0 → codebatch-1.0.1}/docs/index.md +50 -50
- {codebatch-1.0.0 → codebatch-1.0.1}/llms.txt +81 -81
- {codebatch-1.0.0 → codebatch-1.0.1}/pyproject.toml +55 -55
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/api.schema.json +242 -242
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/batch.schema.json +53 -53
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/chunk-manifest.schema.json +72 -72
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/error.schema.json +40 -40
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/event-record.schema.json +75 -75
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/files-index-record.schema.json +55 -55
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/gate-result.schema.json +124 -124
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/output-record.schema.json +79 -79
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/plan.schema.json +61 -61
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/snapshot.schema.json +73 -73
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/state.schema.json +89 -89
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/store.schema.json +38 -38
- {codebatch-1.0.0 → codebatch-1.0.1}/schemas/task.schema.json +91 -91
- {codebatch-1.0.0 → codebatch-1.0.1}/scripts/check_no_network.py +149 -149
- {codebatch-1.0.0 → codebatch-1.0.1}/scripts/check_spec_protected.py +115 -115
- {codebatch-1.0.0 → codebatch-1.0.1}/scripts/check_truth_stores.py +158 -158
- codebatch-1.0.1/site/astro.config.mjs +24 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/site/package-lock.json +7539 -6141
- {codebatch-1.0.0 → codebatch-1.0.1}/site/package.json +18 -17
- codebatch-1.0.1/site/src/content/docs/handbook/commands.md +130 -0
- codebatch-1.0.1/site/src/content/docs/handbook/getting-started.md +151 -0
- codebatch-1.0.1/site/src/content/docs/handbook/index.md +52 -0
- codebatch-1.0.1/site/src/content/docs/handbook/reference.md +134 -0
- codebatch-1.0.1/site/src/content/docs/handbook/usage.md +160 -0
- codebatch-1.0.1/site/src/content.config.ts +7 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/site/src/pages/index.astro +33 -33
- {codebatch-1.0.0 → codebatch-1.0.1}/site/src/site-config.ts +120 -120
- {codebatch-1.0.0 → codebatch-1.0.1}/site/src/styles/global.css +3 -3
- codebatch-1.0.1/site/src/styles/starlight-custom.css +17 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/site/tsconfig.json +5 -5
- codebatch-1.0.1/src/codebatch/__init__.py +9 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/__main__.py +7 -7
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/batch.py +374 -374
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/cache.py +575 -575
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/cache_meta.py +245 -245
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/cas.py +170 -170
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/cli.py +2553 -2553
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/common.py +109 -107
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/errors.py +287 -287
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/gates/__init__.py +19 -19
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/gates/definitions.py +670 -670
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/gates/registry.py +222 -222
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/gates/result.py +277 -277
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/gates/runner.py +252 -252
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/index_build.py +222 -222
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/paths.py +216 -216
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/query.py +481 -481
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/registry.py +557 -557
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/runner.py +515 -515
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/snapshot.py +352 -352
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/store.py +159 -159
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/tasks/__init__.py +41 -41
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/tasks/analyze.py +348 -348
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/tasks/lint.py +1458 -947
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/tasks/parse.py +813 -813
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/tasks/symbols.py +703 -703
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/ui/__init__.py +87 -87
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/ui/diff.py +412 -412
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/ui/format.py +439 -439
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/ui/pager.py +153 -153
- {codebatch-1.0.0 → codebatch-1.0.1}/src/codebatch/workflow.py +551 -473
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/README.md +52 -52
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/conftest.py +9 -9
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus/crlf_example.txt +3 -3
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus/emoji_/360/237/216/211.md +5 -5
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus/hello.py +11 -11
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus/unicode_/350/267/257/345/276/204.txt +3 -3
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus-windows-only/CaseA.cs +9 -9
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus-windows-only/casea.cs.expected +12 -12
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus_lint/messy.py +14 -14
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/golden/snapshot/files.index.jsonl +6 -6
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/golden/snapshot/snapshot.json +19 -19
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/golden/ui/json_basic.json +12 -12
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/golden/ui/jsonl_basic.jsonl +3 -3
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/golden/ui/table_basic.txt +5 -5
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/golden/ui/table_no_header.txt +3 -3
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_analyze_task.py +238 -238
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_batch.py +176 -176
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_cache_perf.py +139 -139
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_cas.py +116 -116
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_diff_commands.py +448 -448
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_diff_engine.py +355 -355
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_e2e_acceptance.py +306 -306
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_errors.py +326 -326
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_explain.py +350 -350
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_gate_cli.py +336 -336
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_gates.py +457 -457
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_index_build.py +531 -531
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_inspect.py +296 -296
- codebatch-1.0.1/tests/test_lint_js.py +388 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_lint_task.py +397 -397
- codebatch-1.0.1/tests/test_parallel.py +208 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_parse_task.py +228 -228
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_paths.py +170 -170
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_phase2_gates.py +582 -582
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_phase6_gates.py +528 -528
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_phase7_gates.py +399 -399
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_phase8_gates.py +1655 -1655
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_query.py +183 -183
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_runner.py +252 -252
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_schema_validation.py +224 -224
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_snapshot.py +145 -145
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_store.py +140 -140
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_symbols_task.py +430 -430
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_ui_format.py +374 -374
- codebatch-1.0.1/tests/test_version.py +39 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/test_workflow.py +256 -256
- {codebatch-1.0.0 → codebatch-1.0.1}/uv.lock +693 -693
- codebatch-1.0.0/site/astro.config.mjs +0 -13
- codebatch-1.0.0/src/codebatch/__init__.py +0 -3
- {codebatch-1.0.0 → codebatch-1.0.1}/.polyglot-cache.json +0 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/assets/logo.png +0 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus/binary.bin +0 -0
- {codebatch-1.0.0 → codebatch-1.0.1}/tests/fixtures/corpus/empty.txt +0 -0
|
@@ -1,166 +1,168 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
paths:
|
|
7
|
-
- 'src/**'
|
|
8
|
-
- 'tests/**'
|
|
9
|
-
- 'schemas/**'
|
|
10
|
-
- 'scripts/**'
|
|
11
|
-
- 'pyproject.toml'
|
|
12
|
-
- '.github/workflows/**'
|
|
13
|
-
pull_request:
|
|
14
|
-
branches: [main]
|
|
15
|
-
paths:
|
|
16
|
-
- 'src/**'
|
|
17
|
-
- 'tests/**'
|
|
18
|
-
- 'schemas/**'
|
|
19
|
-
- 'scripts/**'
|
|
20
|
-
- 'pyproject.toml'
|
|
21
|
-
- '.github/workflows/**'
|
|
22
|
-
workflow_dispatch:
|
|
23
|
-
|
|
24
|
-
concurrency:
|
|
25
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
26
|
-
cancel-in-progress: true
|
|
27
|
-
|
|
28
|
-
jobs:
|
|
29
|
-
test:
|
|
30
|
-
runs-on: ubuntu-latest
|
|
31
|
-
strategy:
|
|
32
|
-
matrix:
|
|
33
|
-
python-version: ["3.12", "3.13"]
|
|
34
|
-
|
|
35
|
-
steps:
|
|
36
|
-
- uses: actions/checkout@v4
|
|
37
|
-
|
|
38
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
39
|
-
uses: actions/setup-python@v6
|
|
40
|
-
with:
|
|
41
|
-
python-version: ${{ matrix.python-version }}
|
|
42
|
-
cache: 'pip'
|
|
43
|
-
|
|
44
|
-
- name: Install dependencies
|
|
45
|
-
run: |
|
|
46
|
-
python -m pip install --upgrade pip
|
|
47
|
-
pip install -e ".[dev]"
|
|
48
|
-
|
|
49
|
-
- name: Run tests
|
|
50
|
-
run: |
|
|
51
|
-
python -m pytest tests/ -v --tb=short
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
from
|
|
78
|
-
from codebatch.
|
|
79
|
-
from codebatch.
|
|
80
|
-
from codebatch.
|
|
81
|
-
from codebatch.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
store
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
corpus
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
--
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'src/**'
|
|
8
|
+
- 'tests/**'
|
|
9
|
+
- 'schemas/**'
|
|
10
|
+
- 'scripts/**'
|
|
11
|
+
- 'pyproject.toml'
|
|
12
|
+
- '.github/workflows/**'
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [main]
|
|
15
|
+
paths:
|
|
16
|
+
- 'src/**'
|
|
17
|
+
- 'tests/**'
|
|
18
|
+
- 'schemas/**'
|
|
19
|
+
- 'scripts/**'
|
|
20
|
+
- 'pyproject.toml'
|
|
21
|
+
- '.github/workflows/**'
|
|
22
|
+
workflow_dispatch:
|
|
23
|
+
|
|
24
|
+
concurrency:
|
|
25
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
26
|
+
cancel-in-progress: true
|
|
27
|
+
|
|
28
|
+
jobs:
|
|
29
|
+
test:
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
strategy:
|
|
32
|
+
matrix:
|
|
33
|
+
python-version: ["3.12", "3.13"]
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
39
|
+
uses: actions/setup-python@v6
|
|
40
|
+
with:
|
|
41
|
+
python-version: ${{ matrix.python-version }}
|
|
42
|
+
cache: 'pip'
|
|
43
|
+
|
|
44
|
+
- name: Install dependencies
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install --upgrade pip
|
|
47
|
+
pip install -e ".[dev]"
|
|
48
|
+
|
|
49
|
+
- name: Run tests with coverage
|
|
50
|
+
run: |
|
|
51
|
+
python -m pytest tests/ -v --tb=short \
|
|
52
|
+
--cov=codebatch --cov-report=term-missing --cov-report=json \
|
|
53
|
+
--cov-fail-under=70
|
|
54
|
+
|
|
55
|
+
gates:
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
needs: test # Run gates after tests pass
|
|
58
|
+
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
|
|
62
|
+
- name: Set up Python
|
|
63
|
+
uses: actions/setup-python@v6
|
|
64
|
+
with:
|
|
65
|
+
python-version: "3.12"
|
|
66
|
+
cache: 'pip'
|
|
67
|
+
|
|
68
|
+
- name: Install dependencies
|
|
69
|
+
run: |
|
|
70
|
+
python -m pip install --upgrade pip
|
|
71
|
+
pip install -e ".[dev]"
|
|
72
|
+
|
|
73
|
+
- name: Create test store and run gates
|
|
74
|
+
run: |
|
|
75
|
+
# Create a test store with sample data
|
|
76
|
+
python -c "
|
|
77
|
+
from pathlib import Path
|
|
78
|
+
from codebatch.store import init_store
|
|
79
|
+
from codebatch.snapshot import SnapshotBuilder
|
|
80
|
+
from codebatch.batch import BatchManager
|
|
81
|
+
from codebatch.runner import ShardRunner
|
|
82
|
+
from codebatch.common import object_shard_prefix
|
|
83
|
+
from codebatch.tasks import get_executor
|
|
84
|
+
|
|
85
|
+
# Initialize store
|
|
86
|
+
store = Path('test_store')
|
|
87
|
+
store.mkdir()
|
|
88
|
+
init_store(store)
|
|
89
|
+
|
|
90
|
+
# Create corpus
|
|
91
|
+
corpus = Path('test_corpus')
|
|
92
|
+
corpus.mkdir()
|
|
93
|
+
(corpus / 'sample.py').write_text('print(\"hello\")')
|
|
94
|
+
|
|
95
|
+
# Create snapshot
|
|
96
|
+
builder = SnapshotBuilder(store)
|
|
97
|
+
snapshot_id = builder.build(corpus)
|
|
98
|
+
|
|
99
|
+
# Create batch
|
|
100
|
+
manager = BatchManager(store)
|
|
101
|
+
batch_id = manager.init_batch(snapshot_id, 'full')
|
|
102
|
+
|
|
103
|
+
# Run tasks
|
|
104
|
+
runner = ShardRunner(store)
|
|
105
|
+
records = builder.load_file_index(snapshot_id)
|
|
106
|
+
shards = set(object_shard_prefix(r['object']) for r in records)
|
|
107
|
+
plan = manager.load_plan(batch_id)
|
|
108
|
+
|
|
109
|
+
for shard_id in shards:
|
|
110
|
+
for task_def in plan['tasks']:
|
|
111
|
+
executor = get_executor(task_def['task_id'])
|
|
112
|
+
runner.run_shard(batch_id, task_def['task_id'], shard_id, executor)
|
|
113
|
+
|
|
114
|
+
print(f'BATCH_ID={batch_id}')
|
|
115
|
+
" > setup_output.txt
|
|
116
|
+
|
|
117
|
+
BATCH_ID=$(grep 'BATCH_ID=' setup_output.txt | cut -d= -f2)
|
|
118
|
+
echo "BATCH_ID=$BATCH_ID" >> $GITHUB_ENV
|
|
119
|
+
|
|
120
|
+
- name: List available gates
|
|
121
|
+
run: |
|
|
122
|
+
python -m codebatch gate-list
|
|
123
|
+
|
|
124
|
+
- name: Run release gate bundle
|
|
125
|
+
run: |
|
|
126
|
+
python -m codebatch gate-bundle release \
|
|
127
|
+
--store ./test_store \
|
|
128
|
+
--batch $BATCH_ID \
|
|
129
|
+
--json > gate-results.json
|
|
130
|
+
|
|
131
|
+
- name: Show gate results
|
|
132
|
+
run: |
|
|
133
|
+
cat gate-results.json | python -m json.tool
|
|
134
|
+
|
|
135
|
+
- name: Upload gate artifacts on failure
|
|
136
|
+
if: failure()
|
|
137
|
+
uses: actions/upload-artifact@v4
|
|
138
|
+
with:
|
|
139
|
+
name: gate-artifacts
|
|
140
|
+
path: |
|
|
141
|
+
./test_store/indexes/gate_artifacts/
|
|
142
|
+
gate-results.json
|
|
143
|
+
retention-days: 7
|
|
144
|
+
|
|
145
|
+
lint:
|
|
146
|
+
runs-on: ubuntu-latest
|
|
147
|
+
|
|
148
|
+
steps:
|
|
149
|
+
- uses: actions/checkout@v4
|
|
150
|
+
|
|
151
|
+
- name: Set up Python
|
|
152
|
+
uses: actions/setup-python@v6
|
|
153
|
+
with:
|
|
154
|
+
python-version: "3.12"
|
|
155
|
+
cache: 'pip'
|
|
156
|
+
|
|
157
|
+
- name: Install dependencies
|
|
158
|
+
run: |
|
|
159
|
+
python -m pip install --upgrade pip
|
|
160
|
+
pip install ruff mypy
|
|
161
|
+
|
|
162
|
+
- name: Run ruff check
|
|
163
|
+
run: |
|
|
164
|
+
ruff check src/ tests/ || true
|
|
165
|
+
|
|
166
|
+
- name: Run ruff format check
|
|
167
|
+
run: |
|
|
168
|
+
ruff format --check src/ tests/ || true
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
name: Deploy site to GitHub Pages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main]
|
|
6
|
-
paths:
|
|
7
|
-
- 'site/**'
|
|
8
|
-
- '.github/workflows/pages.yml'
|
|
9
|
-
workflow_dispatch:
|
|
10
|
-
|
|
11
|
-
concurrency:
|
|
12
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
-
cancel-in-progress: true
|
|
14
|
-
|
|
15
|
-
permissions:
|
|
16
|
-
contents: read
|
|
17
|
-
pages: write
|
|
18
|
-
id-token: write
|
|
19
|
-
|
|
20
|
-
jobs:
|
|
21
|
-
build:
|
|
22
|
-
runs-on: ubuntu-latest
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
25
|
-
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: 22
|
|
29
|
-
|
|
30
|
-
- name: Install site dependencies
|
|
31
|
-
working-directory: site
|
|
32
|
-
run: npm ci
|
|
33
|
-
|
|
34
|
-
- name: Build site
|
|
35
|
-
working-directory: site
|
|
36
|
-
run: npm run build
|
|
37
|
-
|
|
38
|
-
- uses: actions/upload-pages-artifact@v3
|
|
39
|
-
with:
|
|
40
|
-
path: site/dist
|
|
41
|
-
|
|
42
|
-
deploy:
|
|
43
|
-
needs: build
|
|
44
|
-
runs-on: ubuntu-latest
|
|
45
|
-
environment:
|
|
46
|
-
name: github-pages
|
|
47
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
48
|
-
steps:
|
|
49
|
-
- id: deployment
|
|
50
|
-
uses: actions/deploy-pages@v4
|
|
1
|
+
name: Deploy site to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'site/**'
|
|
8
|
+
- '.github/workflows/pages.yml'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
pages: write
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 22
|
|
29
|
+
|
|
30
|
+
- name: Install site dependencies
|
|
31
|
+
working-directory: site
|
|
32
|
+
run: npm ci
|
|
33
|
+
|
|
34
|
+
- name: Build site
|
|
35
|
+
working-directory: site
|
|
36
|
+
run: npm run build
|
|
37
|
+
|
|
38
|
+
- uses: actions/upload-pages-artifact@v3
|
|
39
|
+
with:
|
|
40
|
+
path: site/dist
|
|
41
|
+
|
|
42
|
+
deploy:
|
|
43
|
+
needs: build
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
environment:
|
|
46
|
+
name: github-pages
|
|
47
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
48
|
+
steps:
|
|
49
|
+
- id: deployment
|
|
50
|
+
uses: actions/deploy-pages@v4
|