briskdb 0.1.0a4__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 (166) hide show
  1. briskdb-0.1.0a4/.github/pull_request_template.md +23 -0
  2. briskdb-0.1.0a4/.github/workflows/ci.yml +209 -0
  3. briskdb-0.1.0a4/.github/workflows/python-wheels.yml +207 -0
  4. briskdb-0.1.0a4/.github/workflows/release.yml +231 -0
  5. briskdb-0.1.0a4/.gitignore +7 -0
  6. briskdb-0.1.0a4/API.md +38 -0
  7. briskdb-0.1.0a4/ASYNC_API.md +75 -0
  8. briskdb-0.1.0a4/BRISKDB_LICENSE.txt +21 -0
  9. briskdb-0.1.0a4/CHANGELOG.md +18 -0
  10. briskdb-0.1.0a4/COMPATIBILITY.md +39 -0
  11. briskdb-0.1.0a4/CONTRIBUTING.md +87 -0
  12. briskdb-0.1.0a4/Cargo.lock +2000 -0
  13. briskdb-0.1.0a4/Cargo.toml +120 -0
  14. briskdb-0.1.0a4/LICENSE +21 -0
  15. briskdb-0.1.0a4/PKG-INFO +90 -0
  16. briskdb-0.1.0a4/PUBLISHING.md +36 -0
  17. briskdb-0.1.0a4/README.md +226 -0
  18. briskdb-0.1.0a4/RELEASE_NOTES.md +98 -0
  19. briskdb-0.1.0a4/ROADMAP.md +451 -0
  20. briskdb-0.1.0a4/SERVERLESS.md +31 -0
  21. briskdb-0.1.0a4/VALUE_CONVERSIONS.md +59 -0
  22. briskdb-0.1.0a4/benches/storage.rs +186 -0
  23. briskdb-0.1.0a4/benches/support/mod.rs +378 -0
  24. briskdb-0.1.0a4/docs/ADMIN_BROWSER.md +169 -0
  25. briskdb-0.1.0a4/docs/ARCHITECTURE.md +1197 -0
  26. briskdb-0.1.0a4/docs/BENCHMARKS.md +579 -0
  27. briskdb-0.1.0a4/docs/CRATE_FEATURES.md +77 -0
  28. briskdb-0.1.0a4/docs/DEBIAN_INSTALL.md +128 -0
  29. briskdb-0.1.0a4/docs/EMBEDDED_RUST.md +109 -0
  30. briskdb-0.1.0a4/docs/EMBEDDED_SQL.md +66 -0
  31. briskdb-0.1.0a4/docs/ERRORS.md +434 -0
  32. briskdb-0.1.0a4/docs/GENERATED_KEYS.md +335 -0
  33. briskdb-0.1.0a4/docs/OFFLINE_BACKUP.md +75 -0
  34. briskdb-0.1.0a4/docs/POSTGRES_ADAPTER.md +233 -0
  35. briskdb-0.1.0a4/docs/POSTGRES_LISTENER.md +225 -0
  36. briskdb-0.1.0a4/docs/POSTGRES_QUICKSTART.md +101 -0
  37. briskdb-0.1.0a4/docs/PRE_1_COMPATIBILITY.md +67 -0
  38. briskdb-0.1.0a4/docs/REQUEST_CONTROLS.md +263 -0
  39. briskdb-0.1.0a4/docs/SHARDED_VIRTUAL_TABLE.md +287 -0
  40. briskdb-0.1.0a4/docs/SQLITE_IMPORT.md +221 -0
  41. briskdb-0.1.0a4/docs/SQL_COMPATIBILITY.md +1025 -0
  42. briskdb-0.1.0a4/docs/SQL_PARAMETERS.md +200 -0
  43. briskdb-0.1.0a4/docs/SQL_PARSER.md +193 -0
  44. briskdb-0.1.0a4/docs/SQL_PLANNING.md +379 -0
  45. briskdb-0.1.0a4/docs/SQL_PREPARED_STATEMENTS.md +497 -0
  46. briskdb-0.1.0a4/docs/SQL_SHARD_KEYS.md +194 -0
  47. briskdb-0.1.0a4/docs/SQL_STATEMENT_CLASSIFICATION.md +268 -0
  48. briskdb-0.1.0a4/docs/SQL_SUBSET.md +246 -0
  49. briskdb-0.1.0a4/docs/SQL_TRANSLATION.md +251 -0
  50. briskdb-0.1.0a4/docs/STORAGE_FORMAT.md +1855 -0
  51. briskdb-0.1.0a4/docs/SUPPORTED_PLATFORMS.md +151 -0
  52. briskdb-0.1.0a4/docs/VTAB_ROLLOUT.md +128 -0
  53. briskdb-0.1.0a4/docs/assets/admin-browser.svg +109 -0
  54. briskdb-0.1.0a4/docs/benchmarks/issue-131-rollout-2026-08-12.tsv +159 -0
  55. briskdb-0.1.0a4/examples/LARGE_Data.import.json +132 -0
  56. briskdb-0.1.0a4/examples/asyncio.py +17 -0
  57. briskdb-0.1.0a4/examples/embedded.rs +49 -0
  58. briskdb-0.1.0a4/examples/serverless_handler.py +14 -0
  59. briskdb-0.1.0a4/examples/sync.py +14 -0
  60. briskdb-0.1.0a4/packaging/debian/briskdb.default +27 -0
  61. briskdb-0.1.0a4/packaging/debian/briskdb.service +46 -0
  62. briskdb-0.1.0a4/packaging/debian/build-deb.sh +86 -0
  63. briskdb-0.1.0a4/packaging/debian/control.in +13 -0
  64. briskdb-0.1.0a4/packaging/debian/postinst +40 -0
  65. briskdb-0.1.0a4/packaging/debian/postrm +14 -0
  66. briskdb-0.1.0a4/packaging/debian/prerm +8 -0
  67. briskdb-0.1.0a4/packaging/debian/test-deb-service.sh +56 -0
  68. briskdb-0.1.0a4/pyproject.toml +51 -0
  69. briskdb-0.1.0a4/python/API.md +38 -0
  70. briskdb-0.1.0a4/python/ASYNC_API.md +75 -0
  71. briskdb-0.1.0a4/python/BRISKDB_LICENSE.txt +21 -0
  72. briskdb-0.1.0a4/python/CHANGELOG.md +18 -0
  73. briskdb-0.1.0a4/python/COMPATIBILITY.md +39 -0
  74. briskdb-0.1.0a4/python/Cargo.toml +19 -0
  75. briskdb-0.1.0a4/python/PUBLISHING.md +36 -0
  76. briskdb-0.1.0a4/python/README.md +64 -0
  77. briskdb-0.1.0a4/python/SERVERLESS.md +31 -0
  78. briskdb-0.1.0a4/python/VALUE_CONVERSIONS.md +59 -0
  79. briskdb-0.1.0a4/python/briskdb/NATIVE_NOTICES.txt +12 -0
  80. briskdb-0.1.0a4/python/briskdb/__init__.py +86 -0
  81. briskdb-0.1.0a4/python/briskdb/__init__.pyi +46 -0
  82. briskdb-0.1.0a4/python/briskdb/_briskdb.pyi +236 -0
  83. briskdb-0.1.0a4/python/briskdb/api.py +317 -0
  84. briskdb-0.1.0a4/python/briskdb/api.pyi +139 -0
  85. briskdb-0.1.0a4/python/briskdb/py.typed +0 -0
  86. briskdb-0.1.0a4/python/examples/asyncio.py +17 -0
  87. briskdb-0.1.0a4/python/examples/serverless_handler.py +14 -0
  88. briskdb-0.1.0a4/python/examples/sync.py +14 -0
  89. briskdb-0.1.0a4/python/scripts/check_dist.py +131 -0
  90. briskdb-0.1.0a4/python/scripts/check_versions.py +64 -0
  91. briskdb-0.1.0a4/python/src/error.rs +241 -0
  92. briskdb-0.1.0a4/python/src/lib.rs +929 -0
  93. briskdb-0.1.0a4/python/src/value.rs +179 -0
  94. briskdb-0.1.0a4/python/tests/test_api.py +172 -0
  95. briskdb-0.1.0a4/python/tests/test_embedded.py +300 -0
  96. briskdb-0.1.0a4/python/tests/typing_contract.py +24 -0
  97. briskdb-0.1.0a4/src/bin/briskdb-import.rs +111 -0
  98. briskdb-0.1.0a4/src/core/catalog.rs +1290 -0
  99. briskdb-0.1.0a4/src/core/control.rs +459 -0
  100. briskdb-0.1.0a4/src/core/engine.rs +9934 -0
  101. briskdb-0.1.0a4/src/core/error.rs +271 -0
  102. briskdb-0.1.0a4/src/core/generated_id.rs +901 -0
  103. briskdb-0.1.0a4/src/core/lifecycle.rs +225 -0
  104. briskdb-0.1.0a4/src/core/mod.rs +1145 -0
  105. briskdb-0.1.0a4/src/core/options.rs +661 -0
  106. briskdb-0.1.0a4/src/core/planner.rs +2830 -0
  107. briskdb-0.1.0a4/src/core/prepared.rs +907 -0
  108. briskdb-0.1.0a4/src/core/routing.rs +347 -0
  109. briskdb-0.1.0a4/src/core/scatter.rs +352 -0
  110. briskdb-0.1.0a4/src/core/session.rs +226 -0
  111. briskdb-0.1.0a4/src/core/types.rs +592 -0
  112. briskdb-0.1.0a4/src/core/worker.rs +248 -0
  113. briskdb-0.1.0a4/src/embedded.rs +757 -0
  114. briskdb-0.1.0a4/src/import/copy.rs +1255 -0
  115. briskdb-0.1.0a4/src/import/mod.rs +849 -0
  116. briskdb-0.1.0a4/src/import/schema.rs +2691 -0
  117. briskdb-0.1.0a4/src/import/staging.rs +1141 -0
  118. briskdb-0.1.0a4/src/lib.rs +32 -0
  119. briskdb-0.1.0a4/src/main.rs +734 -0
  120. briskdb-0.1.0a4/src/protocol/error.rs +469 -0
  121. briskdb-0.1.0a4/src/protocol/http/admin/app.js +357 -0
  122. briskdb-0.1.0a4/src/protocol/http/admin/index.html +110 -0
  123. briskdb-0.1.0a4/src/protocol/http/admin/logic.js +106 -0
  124. briskdb-0.1.0a4/src/protocol/http/admin/styles.css +221 -0
  125. briskdb-0.1.0a4/src/protocol/http/admin.rs +2612 -0
  126. briskdb-0.1.0a4/src/protocol/http.rs +2076 -0
  127. briskdb-0.1.0a4/src/protocol/mod.rs +7 -0
  128. briskdb-0.1.0a4/src/protocol/postgres.rs +2920 -0
  129. briskdb-0.1.0a4/src/server/mod.rs +1401 -0
  130. briskdb-0.1.0a4/src/sql/classifier.rs +599 -0
  131. briskdb-0.1.0a4/src/sql/dml.rs +321 -0
  132. briskdb-0.1.0a4/src/sql/generated.rs +375 -0
  133. briskdb-0.1.0a4/src/sql/inference.rs +1829 -0
  134. briskdb-0.1.0a4/src/sql/mod.rs +1544 -0
  135. briskdb-0.1.0a4/src/sql/normalizer.rs +739 -0
  136. briskdb-0.1.0a4/src/sql/parser.rs +718 -0
  137. briskdb-0.1.0a4/src/sql/scatter.rs +493 -0
  138. briskdb-0.1.0a4/src/sql/subset.rs +1645 -0
  139. briskdb-0.1.0a4/src/sql/translator.rs +1112 -0
  140. briskdb-0.1.0a4/src/sqlite_error.rs +303 -0
  141. briskdb-0.1.0a4/src/storage/hilo.rs +269 -0
  142. briskdb-0.1.0a4/src/storage/manifest.rs +13850 -0
  143. briskdb-0.1.0a4/src/storage/migration.rs +2756 -0
  144. briskdb-0.1.0a4/src/storage/mod.rs +6430 -0
  145. briskdb-0.1.0a4/src/storage/pool.rs +2207 -0
  146. briskdb-0.1.0a4/src/storage/schema_gate.rs +572 -0
  147. briskdb-0.1.0a4/src/storage/shard.rs +5554 -0
  148. briskdb-0.1.0a4/src/storage/sharded_vtab/benchmarks.rs +4048 -0
  149. briskdb-0.1.0a4/src/storage/sharded_vtab/locator.rs +411 -0
  150. briskdb-0.1.0a4/src/storage/sharded_vtab/module_v2.rs +266 -0
  151. briskdb-0.1.0a4/src/storage/sharded_vtab/write.rs +3291 -0
  152. briskdb-0.1.0a4/src/storage/sharded_vtab.rs +8373 -0
  153. briskdb-0.1.0a4/tests/admin_browser_js.rs +43 -0
  154. briskdb-0.1.0a4/tests/admin_browser_logic.test.js +111 -0
  155. briskdb-0.1.0a4/tests/benchmark_workloads.rs +126 -0
  156. briskdb-0.1.0a4/tests/debian_packaging.rs +102 -0
  157. briskdb-0.1.0a4/tests/embedded_api.rs +176 -0
  158. briskdb-0.1.0a4/tests/embedded_host_safety.rs +164 -0
  159. briskdb-0.1.0a4/tests/embedded_lifecycle.rs +135 -0
  160. briskdb-0.1.0a4/tests/embedded_sql_api.rs +186 -0
  161. briskdb-0.1.0a4/tests/logical_scatter.rs +376 -0
  162. briskdb-0.1.0a4/tests/offline_backup.rs +103 -0
  163. briskdb-0.1.0a4/tests/public_api.rs +1977 -0
  164. briskdb-0.1.0a4/tests/release_compatibility.rs +43 -0
  165. briskdb-0.1.0a4/tests/release_packaging.rs +116 -0
  166. briskdb-0.1.0a4/tests/sqlite_import.rs +1020 -0
@@ -0,0 +1,23 @@
1
+ ## Summary
2
+
3
+ <!-- What changed, and why? -->
4
+
5
+ ## Tests
6
+
7
+ <!-- List the exact commands and targeted suites run. -->
8
+
9
+ - [ ] Unit tests were added or updated for behavior-changing code.
10
+ - [ ] Boundary/integration tests were added where the change crosses SQLite,
11
+ HTTP, protocol, filesystem, or process boundaries.
12
+ - [ ] A regression test accompanies each bug fix.
13
+ - [ ] No automated test is applicable; the explanation is included above.
14
+ - [ ] `cargo fmt --check` passes.
15
+ - [ ] `cargo test` passes.
16
+ - [ ] `cargo clippy --all-targets --all-features -- -D warnings` passes.
17
+
18
+ ## Compatibility and operations
19
+
20
+ - [ ] Public behavior and compatibility documentation were updated where needed.
21
+ - [ ] Storage-format, migration, security, and recovery effects were considered.
22
+
23
+ Closes #
@@ -0,0 +1,209 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ concurrency:
16
+ group: ci-${{ github.workflow }}-${{ github.ref }}
17
+ cancel-in-progress: true
18
+
19
+ env:
20
+ CARGO_TERM_COLOR: always
21
+ RUST_BACKTRACE: "1"
22
+
23
+ jobs:
24
+ features:
25
+ name: Features (${{ matrix.surface }}, Rust ${{ matrix.rust }})
26
+ runs-on: ubuntu-24.04
27
+ timeout-minutes: 15
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ rust:
32
+ - "1.85.0"
33
+ - stable
34
+ surface:
35
+ - core
36
+ - embedded
37
+ - http
38
+ - postgres
39
+ - sqlite-import
40
+ - default
41
+ steps:
42
+ - name: Check out source
43
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44
+ with:
45
+ persist-credentials: false
46
+
47
+ - name: Install Rust ${{ matrix.rust }}
48
+ run: rustup toolchain install "${{ matrix.rust }}" --profile minimal
49
+
50
+ - name: Select Rust ${{ matrix.rust }}
51
+ run: rustup default "${{ matrix.rust }}"
52
+
53
+ - name: Restore Rust build cache
54
+ uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
55
+ with:
56
+ shared-key: features-${{ matrix.rust }}-${{ matrix.surface }}
57
+
58
+ - name: Check feature surface
59
+ run: |
60
+ case "${{ matrix.surface }}" in
61
+ core) cargo check --locked --lib --no-default-features ;;
62
+ default) cargo check --locked --lib ;;
63
+ *) cargo check --locked --lib --no-default-features --features "${{ matrix.surface }}" ;;
64
+ esac
65
+
66
+ - name: Verify embedded dependency boundary
67
+ if: matrix.surface == 'embedded'
68
+ run: |
69
+ forbidden_dependencies="$(
70
+ cargo tree --locked --no-default-features --features embedded --edges normal --prefix none |
71
+ awk '$1 ~ /^(anyhow|axum|clap|hyper|hyper-util|pgwire|tokio-util|tower|tracing-subscriber)$/ { print $1 }' |
72
+ sort -u
73
+ )"
74
+ if [ -n "$forbidden_dependencies" ]; then
75
+ echo "embedded feature unexpectedly includes: $forbidden_dependencies"
76
+ exit 1
77
+ fi
78
+
79
+ quality:
80
+ name: Format and Clippy (stable)
81
+ runs-on: ubuntu-24.04
82
+ timeout-minutes: 15
83
+ steps:
84
+ - name: Check out source
85
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
86
+ with:
87
+ persist-credentials: false
88
+
89
+ - name: Install stable Rust with quality components
90
+ run: rustup toolchain install stable --profile minimal --component rustfmt,clippy
91
+
92
+ - name: Select stable Rust
93
+ run: rustup default stable
94
+
95
+ - name: Restore Rust build cache
96
+ uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
97
+ with:
98
+ shared-key: stable-quality
99
+
100
+ - name: Check formatting
101
+ run: cargo fmt --all --check
102
+
103
+ - name: Run Clippy
104
+ run: cargo clippy --locked --all-targets --all-features -- -D warnings
105
+
106
+ - name: Verify publishable crate package
107
+ run: cargo package --locked --allow-dirty
108
+
109
+ - name: Reject Git-sourced dependencies
110
+ run: |
111
+ if awk '/source = "git\+/{ found = 1 } END { exit !found }' Cargo.lock; then
112
+ echo "Cargo.lock contains a Git-sourced dependency"
113
+ exit 1
114
+ fi
115
+
116
+ test:
117
+ name: Tests (${{ matrix.rust }})
118
+ runs-on: ubuntu-24.04
119
+ timeout-minutes: 20
120
+ strategy:
121
+ fail-fast: false
122
+ matrix:
123
+ rust:
124
+ - "1.85.0"
125
+ - stable
126
+ steps:
127
+ - name: Check out source
128
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
129
+ with:
130
+ persist-credentials: false
131
+
132
+ - name: Install Rust ${{ matrix.rust }}
133
+ run: rustup toolchain install "${{ matrix.rust }}" --profile minimal
134
+
135
+ - name: Select Rust ${{ matrix.rust }}
136
+ run: rustup default "${{ matrix.rust }}"
137
+
138
+ - name: Restore Rust build cache
139
+ uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
140
+ with:
141
+ shared-key: tests-${{ matrix.rust }}
142
+
143
+ - name: Run target tests
144
+ run: cargo test --locked --all-targets --all-features
145
+
146
+ - name: Run documentation tests
147
+ run: cargo test --locked --doc --all-features
148
+
149
+ python:
150
+ name: Python source build (${{ matrix.python }})
151
+ runs-on: ubuntu-24.04
152
+ timeout-minutes: 20
153
+ strategy:
154
+ fail-fast: false
155
+ matrix:
156
+ python:
157
+ - "3.9"
158
+ - "3.14"
159
+ steps:
160
+ - name: Check out source
161
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
162
+ with:
163
+ persist-credentials: false
164
+
165
+ - name: Install Rust 1.85
166
+ run: rustup toolchain install 1.85.0 --profile minimal --component clippy
167
+
168
+ - name: Select Rust 1.85
169
+ run: rustup default 1.85.0
170
+
171
+ - name: Install Python ${{ matrix.python }}
172
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
173
+ with:
174
+ python-version: ${{ matrix.python }}
175
+ cache: pip
176
+ cache-dependency-path: python/pyproject.toml
177
+
178
+ - name: Restore Rust build cache
179
+ uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
180
+ with:
181
+ shared-key: python-${{ matrix.python }}
182
+
183
+ - name: Install pinned build frontend
184
+ run: python -m pip install maturin==1.14.1
185
+
186
+ - name: Build wheel from source
187
+ run: maturin build --manifest-path python/Cargo.toml --locked --out dist
188
+
189
+ - name: Install wheel and run Python tests
190
+ run: |
191
+ python -m pip install --force-reinstall dist/*.whl
192
+ python -m unittest discover -s python/tests -v
193
+
194
+ - name: Test and lint the native extension
195
+ run: |
196
+ cargo test --locked -p briskdb-python
197
+ cargo clippy --locked -p briskdb-python --all-targets --no-deps -- -D warnings
198
+
199
+ - name: Verify Python dependency boundary
200
+ run: |
201
+ forbidden_dependencies="$(
202
+ cargo tree --locked -p briskdb-python --edges normal --prefix none |
203
+ awk '$1 ~ /^(anyhow|axum|clap|hyper|hyper-util|pgwire|tokio-util|tower|tracing-subscriber)$/ { print $1 }' |
204
+ sort -u
205
+ )"
206
+ if [ -n "$forbidden_dependencies" ]; then
207
+ echo "Python extension unexpectedly includes: $forbidden_dependencies"
208
+ exit 1
209
+ fi
@@ -0,0 +1,207 @@
1
+ name: Python distributions
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - ".github/workflows/python-wheels.yml"
7
+ - ".github/workflows/release.yml"
8
+ - "Cargo.lock"
9
+ - "Cargo.toml"
10
+ - "LICENSE"
11
+ - "python/**"
12
+ - "src/**"
13
+ workflow_call:
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ env:
19
+ CARGO_TERM_COLOR: always
20
+ MACOSX_DEPLOYMENT_TARGET: "11.0"
21
+
22
+ jobs:
23
+ sdist:
24
+ name: Python sdist, metadata, and typing
25
+ runs-on: ubuntu-24.04
26
+ timeout-minutes: 25
27
+ steps:
28
+ - name: Check out source
29
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ persist-credentials: false
32
+
33
+ - name: Install Rust 1.85
34
+ run: rustup toolchain install 1.85.0 --profile minimal
35
+
36
+ - name: Select Rust 1.85
37
+ run: rustup default 1.85.0
38
+
39
+ - name: Install Python 3.14
40
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
41
+ with:
42
+ python-version: "3.14"
43
+ cache: pip
44
+ cache-dependency-path: python/pyproject.toml
45
+
46
+ - name: Install pinned packaging tools
47
+ run: >-
48
+ python -m pip install
49
+ maturin==1.14.1
50
+ mypy==1.19.1
51
+ packaging==26.3
52
+ twine==7.0.0
53
+
54
+ - name: Check Rust, extension, and build metadata parity
55
+ run: python python/scripts/check_versions.py
56
+
57
+ - name: Type-check the public API at the minimum Python version
58
+ env:
59
+ MYPYPATH: python/python
60
+ run: python -m mypy --strict --python-version 3.9 python/tests/typing_contract.py
61
+
62
+ - name: Build and inspect the source distribution
63
+ shell: bash
64
+ run: |
65
+ set -euo pipefail
66
+ maturin sdist --manifest-path python/Cargo.toml --out dist
67
+ sdists=(dist/*.tar.gz)
68
+ if [[ ${#sdists[@]} -ne 1 || ! -f "${sdists[0]}" ]]; then
69
+ echo "expected exactly one source distribution" >&2
70
+ exit 1
71
+ fi
72
+ python python/scripts/check_dist.py --sdist "${sdists[0]}"
73
+ python -m twine check "${sdists[0]}"
74
+
75
+ - name: Install the sdist and run the Python suite
76
+ shell: bash
77
+ run: |
78
+ set -euo pipefail
79
+ python -m venv "$RUNNER_TEMP/briskdb-sdist"
80
+ "$RUNNER_TEMP/briskdb-sdist/bin/python" -m pip install dist/*.tar.gz
81
+ "$RUNNER_TEMP/briskdb-sdist/bin/python" -m unittest discover -s python/tests -v
82
+
83
+ - name: Upload source distribution
84
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
85
+ with:
86
+ name: briskdb-python-sdist
87
+ path: dist/*.tar.gz
88
+ if-no-files-found: error
89
+ retention-days: 7
90
+
91
+ wheels:
92
+ name: Python wheel (${{ matrix.platform }})
93
+ runs-on: ${{ matrix.runner }}
94
+ timeout-minutes: 30
95
+ strategy:
96
+ fail-fast: false
97
+ matrix:
98
+ include:
99
+ - runner: ubuntu-24.04
100
+ target: x86_64-unknown-linux-gnu
101
+ platform: manylinux_2_28_x86_64
102
+ manylinux: "2_28"
103
+ - runner: ubuntu-24.04-arm
104
+ target: aarch64-unknown-linux-gnu
105
+ platform: manylinux_2_28_aarch64
106
+ manylinux: "2_28"
107
+ - runner: macos-15-intel
108
+ target: x86_64-apple-darwin
109
+ platform: macosx_11_0_x86_64
110
+ manylinux: auto
111
+ - runner: macos-15
112
+ target: aarch64-apple-darwin
113
+ platform: macosx_11_0_arm64
114
+ manylinux: auto
115
+ steps:
116
+ - name: Check out source
117
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
118
+ with:
119
+ persist-credentials: false
120
+
121
+ - name: Install Python 3.14 for build inspection
122
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
123
+ with:
124
+ python-version: "3.14"
125
+
126
+ - name: Build the abi3 wheel under the fixed platform policy
127
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
128
+ with:
129
+ maturin-version: v1.14.1
130
+ rust-toolchain: 1.85.0
131
+ target: ${{ matrix.target }}
132
+ manylinux: ${{ matrix.manylinux }}
133
+ args: >-
134
+ --release
135
+ --locked
136
+ --compatibility pypi
137
+ --manifest-path python/Cargo.toml
138
+ --out dist
139
+
140
+ - name: Check wheel contents, metadata, and exact tag
141
+ shell: bash
142
+ run: |
143
+ set -euo pipefail
144
+ python -m pip install check-wheel-contents==0.6.3 packaging==26.3
145
+ wheels=(dist/*.whl)
146
+ if [[ ${#wheels[@]} -ne 1 || ! -f "${wheels[0]}" ]]; then
147
+ echo "expected exactly one wheel" >&2
148
+ exit 1
149
+ fi
150
+ check-wheel-contents "${wheels[0]}"
151
+ python python/scripts/check_dist.py \
152
+ --wheel "${wheels[0]}" \
153
+ --platform "${{ matrix.platform }}"
154
+
155
+ - name: Audit manylinux dependencies and symbols
156
+ if: runner.os == 'Linux'
157
+ shell: bash
158
+ run: |
159
+ set -euo pipefail
160
+ python -m pip install auditwheel==6.8.0
161
+ auditwheel show dist/*.whl | tee "dist/${{ matrix.platform }}-AUDIT.txt"
162
+
163
+ - name: Inspect macOS dynamic-library dependencies
164
+ if: runner.os == 'macOS'
165
+ shell: bash
166
+ run: |
167
+ set -euo pipefail
168
+ python -m pip install delocate==0.13.0
169
+ delocate-listdeps --all dist/*.whl | tee "dist/${{ matrix.platform }}-AUDIT.txt"
170
+
171
+ - name: Install and test wheel on CPython 3.9
172
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
173
+ with:
174
+ python-version: "3.9"
175
+
176
+ - name: Run minimum-version wheel tests without a source build
177
+ run: |
178
+ python -m pip install --no-index --only-binary=:all: --force-reinstall dist/*.whl
179
+ python -m unittest discover -s python/tests -v
180
+
181
+ - name: Install and test wheel on CPython 3.14
182
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
183
+ with:
184
+ python-version: "3.14"
185
+
186
+ - name: Run maximum-version wheel tests without a source build
187
+ run: |
188
+ python -m pip install --no-index --only-binary=:all: --force-reinstall dist/*.whl
189
+ python -m unittest discover -s python/tests -v
190
+ python -m pip install mypy==1.19.1
191
+ python -m mypy --strict --python-version 3.9 python/tests/typing_contract.py
192
+
193
+ - name: Upload wheel
194
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
195
+ with:
196
+ name: briskdb-python-wheel-${{ matrix.platform }}
197
+ path: dist/*.whl
198
+ if-no-files-found: error
199
+ retention-days: 7
200
+
201
+ - name: Upload native dependency audit
202
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
203
+ with:
204
+ name: briskdb-python-audit-${{ matrix.platform }}
205
+ path: dist/*-AUDIT.txt
206
+ if-no-files-found: error
207
+ retention-days: 7
@@ -0,0 +1,231 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ env:
13
+ CARGO_TERM_COLOR: always
14
+
15
+ jobs:
16
+ python-wheels:
17
+ name: Build and verify Python distributions
18
+ uses: ./.github/workflows/python-wheels.yml
19
+
20
+ build:
21
+ name: Build ${{ matrix.platform }}
22
+ runs-on: ${{ matrix.runner }}
23
+ timeout-minutes: 20
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ include:
28
+ - runner: ubuntu-24.04
29
+ target: x86_64-unknown-linux-gnu
30
+ platform: linux-x86_64
31
+ deb_architecture: amd64
32
+ - runner: ubuntu-24.04-arm
33
+ target: aarch64-unknown-linux-gnu
34
+ platform: linux-aarch64
35
+ deb_architecture: arm64
36
+ - runner: macos-15-intel
37
+ target: x86_64-apple-darwin
38
+ platform: macos-x86_64
39
+ deb_architecture: none
40
+ - runner: macos-15
41
+ target: aarch64-apple-darwin
42
+ platform: macos-aarch64
43
+ deb_architecture: none
44
+ steps:
45
+ - name: Check out tagged source
46
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47
+ with:
48
+ persist-credentials: false
49
+
50
+ - name: Install stable Rust
51
+ run: rustup toolchain install stable --profile minimal --target "${{ matrix.target }}"
52
+
53
+ - name: Select stable Rust
54
+ run: rustup default stable
55
+
56
+ - name: Verify release version
57
+ shell: bash
58
+ run: |
59
+ set -euo pipefail
60
+ version="$(cargo metadata --locked --no-deps --format-version 1 | python3 -c 'import json,sys; print(next(p["version"] for p in json.load(sys.stdin)["packages"] if p["name"] == "briskdb"))')"
61
+ if [[ "$GITHUB_REF_TYPE" == "tag" && "$GITHUB_REF_NAME" != "v$version" ]]; then
62
+ echo "tag $GITHUB_REF_NAME does not match package version $version" >&2
63
+ exit 1
64
+ fi
65
+ echo "VERSION=$version" >> "$GITHUB_ENV"
66
+
67
+ - name: Build locked release binaries
68
+ run: cargo build --release --locked --bins --target "${{ matrix.target }}"
69
+
70
+ - name: Smoke-test native server
71
+ shell: bash
72
+ run: |
73
+ set -euo pipefail
74
+ binary="target/${{ matrix.target }}/release/briskdb"
75
+ "$binary" --version | grep -F "briskdb $VERSION"
76
+ data_dir="$(mktemp -d)"
77
+ "$binary" \
78
+ --listen 127.0.0.1:17654 \
79
+ --postgres-listen disabled \
80
+ --data-dir "$data_dir/database" \
81
+ --shards 2 &
82
+ server_pid=$!
83
+ cleanup() {
84
+ kill -TERM "$server_pid" 2>/dev/null || true
85
+ wait "$server_pid" 2>/dev/null || true
86
+ rm -rf "$data_dir"
87
+ }
88
+ trap cleanup EXIT
89
+ for attempt in {1..30}; do
90
+ if curl --fail --silent --show-error http://127.0.0.1:17654/admin >/dev/null; then
91
+ kill -TERM "$server_pid"
92
+ wait "$server_pid"
93
+ trap - EXIT
94
+ rm -rf "$data_dir"
95
+ exit 0
96
+ fi
97
+ sleep 1
98
+ done
99
+ echo "server did not become ready" >&2
100
+ exit 1
101
+
102
+ - name: Package release archive
103
+ shell: bash
104
+ run: |
105
+ set -euo pipefail
106
+ archive="briskdb-v${VERSION}-${{ matrix.platform }}"
107
+ mkdir -p "dist/$archive"
108
+ cp "target/${{ matrix.target }}/release/briskdb" "dist/$archive/"
109
+ cp "target/${{ matrix.target }}/release/briskdb-import" "dist/$archive/"
110
+ cp README.md RELEASE_NOTES.md LICENSE ROADMAP.md CONTRIBUTING.md "dist/$archive/"
111
+ cp -R docs "dist/$archive/docs"
112
+ tar -C dist -czf "dist/$archive.tar.gz" "$archive"
113
+ tar -tzf "dist/$archive.tar.gz" | grep -F "$archive/docs/OFFLINE_BACKUP.md"
114
+
115
+ - name: Build Debian package
116
+ if: matrix.deb_architecture != 'none'
117
+ shell: bash
118
+ run: |
119
+ packaging/debian/build-deb.sh \
120
+ "target/${{ matrix.target }}/release" \
121
+ "${{ matrix.deb_architecture }}" \
122
+ "$VERSION" \
123
+ dist
124
+
125
+ - name: Install and smoke-test Debian service
126
+ if: matrix.deb_architecture != 'none'
127
+ shell: bash
128
+ run: |
129
+ set -euo pipefail
130
+ packages=(dist/*.deb)
131
+ if [[ ${#packages[@]} -ne 1 || ! -f "${packages[0]}" ]]; then
132
+ echo "expected exactly one Debian package" >&2
133
+ exit 1
134
+ fi
135
+ packaging/debian/test-deb-service.sh "${packages[0]}"
136
+
137
+ - name: Upload release archive
138
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
139
+ with:
140
+ name: briskdb-${{ matrix.platform }}
141
+ path: dist/*.tar.gz
142
+ if-no-files-found: error
143
+ retention-days: 7
144
+
145
+ - name: Upload Debian package
146
+ if: matrix.deb_architecture != 'none'
147
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
148
+ with:
149
+ name: briskdb-deb-${{ matrix.deb_architecture }}
150
+ path: dist/*.deb
151
+ if-no-files-found: error
152
+ retention-days: 7
153
+
154
+ release:
155
+ name: Publish GitHub prerelease
156
+ if: startsWith(github.ref, 'refs/tags/v')
157
+ needs: [build, python-wheels]
158
+ runs-on: ubuntu-24.04
159
+ timeout-minutes: 10
160
+ permissions:
161
+ attestations: write
162
+ contents: write
163
+ id-token: write
164
+ steps:
165
+ - name: Check out tagged source
166
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
167
+ with:
168
+ persist-credentials: false
169
+
170
+ - name: Download release archives
171
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
172
+ with:
173
+ path: dist
174
+ pattern: briskdb-*
175
+ merge-multiple: true
176
+
177
+ - name: Create checksums
178
+ working-directory: dist
179
+ shell: bash
180
+ run: |
181
+ set -euo pipefail
182
+ artifacts=(*.tar.gz *.deb *.whl *-AUDIT.txt)
183
+ sha256sum "${artifacts[@]}" > SHA256SUMS
184
+
185
+ - name: Sign artifact provenance
186
+ uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
187
+ with:
188
+ subject-checksums: dist/SHA256SUMS
189
+
190
+ - name: Publish prerelease
191
+ env:
192
+ GH_TOKEN: ${{ github.token }}
193
+ run: |
194
+ gh release create "$GITHUB_REF_NAME" dist/* \
195
+ --verify-tag \
196
+ --prerelease \
197
+ --title "BriskDB $GITHUB_REF_NAME" \
198
+ --notes-file RELEASE_NOTES.md
199
+
200
+ publish-python:
201
+ name: Publish Python distributions to PyPI
202
+ if: startsWith(github.ref, 'refs/tags/v')
203
+ needs: release
204
+ runs-on: ubuntu-24.04
205
+ timeout-minutes: 10
206
+ environment:
207
+ name: pypi
208
+ url: https://pypi.org/p/briskdb
209
+ steps:
210
+ - name: Download verified wheels
211
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
212
+ with:
213
+ path: dist
214
+ pattern: briskdb-python-wheel-*
215
+ merge-multiple: true
216
+
217
+ - name: Download verified source distribution
218
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
219
+ with:
220
+ path: dist
221
+ pattern: briskdb-python-sdist
222
+ merge-multiple: true
223
+
224
+ - name: Publish to PyPI with the repository API token
225
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
226
+ with:
227
+ packages-dir: dist
228
+ password: ${{ secrets.PYPI_API_TOKEN }}
229
+ # PEP 740 attestations require OIDC trusted publishing. GitHub build
230
+ # provenance for the same files is generated by the release job.
231
+ attestations: false
@@ -0,0 +1,7 @@
1
+ /target
2
+ /dist
3
+ /.venv
4
+ /python/python/briskdb/_briskdb*.so
5
+ /python/python/briskdb/_briskdb*.pyd
6
+ __pycache__/
7
+ *.pyc