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