bdsc-cli 0.2.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.
bdsc_cli-0.2.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Gustavo Madeira Santana
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,362 @@
1
+ Metadata-Version: 2.4
2
+ Name: bdsc-cli
3
+ Version: 0.2.1
4
+ Summary: Sync and query BDSC datasets locally
5
+ Author: Gustavo Madeira Santana
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/gumadeiras/bdsc-cli
8
+ Project-URL: Repository, https://github.com/gumadeiras/bdsc-cli
9
+ Project-URL: Issues, https://github.com/gumadeiras/bdsc-cli/issues
10
+ Keywords: bdsc,drosophila,cli,bioinformatics,genetics
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Provides-Extra: release
18
+ Requires-Dist: build>=1.2.2; extra == "release"
19
+ Requires-Dist: twine>=6.1.0; extra == "release"
20
+ Dynamic: license-file
21
+
22
+ # bdsc-cli
23
+
24
+ Small CLI for syncing public Bloomington Drosophila Stock Center datasets and
25
+ querying them locally.
26
+
27
+ Repo:
28
+
29
+ - https://github.com/gumadeiras/bdsc-cli
30
+
31
+ Primary source:
32
+
33
+ - https://bdsc.indiana.edu/stocks/stockdata.html
34
+
35
+ What it does:
36
+
37
+ - syncs BDSC CSV datasets into a local cache
38
+ - builds a local SQLite index
39
+ - supports local text search and stock lookups
40
+ - exposes optional live search against BDSC's current web endpoint
41
+
42
+ No third-party Python dependencies.
43
+
44
+ ## Install
45
+
46
+ Another computer:
47
+
48
+ ```bash
49
+ brew tap gumadeiras/tap
50
+ brew install bdsc-cli
51
+ ```
52
+
53
+ Or install the release wheel directly with `pipx`:
54
+
55
+ ```bash
56
+ pipx install 'bdsc-cli @ https://github.com/gumadeiras/bdsc-cli/releases/download/v0.2.1/bdsc_cli-0.2.1-py3-none-any.whl'
57
+ ```
58
+
59
+ Or with plain `pip`:
60
+
61
+ ```bash
62
+ python3 -m pip install 'bdsc-cli @ https://github.com/gumadeiras/bdsc-cli/releases/download/v0.2.1/bdsc_cli-0.2.1-py3-none-any.whl'
63
+ ```
64
+
65
+ Source install:
66
+
67
+ ```bash
68
+ git clone https://github.com/gumadeiras/bdsc-cli.git
69
+ cd bdsc-cli
70
+ python3 -m pip install .
71
+ ```
72
+
73
+ Repo-local dev install:
74
+
75
+ ```bash
76
+ cd ~/git/bdsc-cli
77
+ python3 -m venv .venv
78
+ . .venv/bin/activate
79
+ python -m pip install -e .
80
+ ```
81
+
82
+ Check the CLI:
83
+
84
+ ```bash
85
+ bdsc --help
86
+ ```
87
+
88
+ Build release artifacts locally:
89
+
90
+ ```bash
91
+ python -m pip install -e .[release]
92
+ python -m build
93
+ python -m twine check dist/*
94
+ python scripts/render_homebrew_formula.py dist/bdsc_cli-$(python - <<'PY'
95
+ from bdsc_cli import __version__
96
+ print(__version__)
97
+ PY
98
+ ).tar.gz
99
+ ```
100
+
101
+ PyPI note:
102
+
103
+ - the GitHub release is live
104
+ - PyPI trusted publishing is not configured yet for `bdsc-cli`
105
+ - `pip install bdsc-cli` will work after that publisher is added
106
+
107
+ ## Quickstart
108
+
109
+ Create a local cache and index:
110
+
111
+ ```bash
112
+ bdsc sync
113
+ ```
114
+
115
+ Then query it:
116
+
117
+ ```bash
118
+ bdsc find Chronos
119
+ bdsc find 'Or56a Lexa'
120
+ bdsc report optogenetics
121
+ bdsc find --gene Or56a --property lexA
122
+ bdsc find --gene Or42b --driver-family lexA
123
+ bdsc find RRID:BDSC_77118
124
+ bdsc find FBti0195688
125
+ bdsc stock 77118
126
+ ```
127
+
128
+ ## Usage
129
+
130
+ Default state directory:
131
+
132
+ ```text
133
+ ~/.local/share/bdsc-cli
134
+ ```
135
+
136
+ Sync datasets and build the local index:
137
+
138
+ ```bash
139
+ bdsc sync
140
+ ```
141
+
142
+ Use `find` for nearly all interactive querying:
143
+
144
+ ```bash
145
+ bdsc find Chronos
146
+ bdsc find Chronis
147
+ bdsc find 'Or56a Lexa'
148
+ bdsc find FBgn0003996 --json
149
+ bdsc find RRID:BDSC_77118
150
+ bdsc find FBti0195688
151
+ bdsc find --kind property VALIUM20
152
+ bdsc find --kind property-exact lexA
153
+ bdsc find --kind driver-family QF
154
+ bdsc find --kind relationship RNAi
155
+ bdsc find --gene Or56a --property lexA
156
+ bdsc find --gene Or42b --driver-family lexA
157
+ bdsc find --gene Or42b --driver-family qf
158
+ bdsc find --dataset genes --property olfactory --relationship coding --jsonl
159
+ ```
160
+
161
+ Use canned reports for common retrieval buckets:
162
+
163
+ ```bash
164
+ bdsc report olfactory
165
+ bdsc report drivers --jsonl
166
+ bdsc report optogenetics --limit 50
167
+ ```
168
+
169
+ Inspect cache/index status:
170
+
171
+ ```bash
172
+ bdsc status
173
+ ```
174
+
175
+ Use a custom cache/index location:
176
+
177
+ ```bash
178
+ bdsc sync --state-dir ./data
179
+ bdsc find Chronos --state-dir ./data
180
+ ```
181
+
182
+ Structured output for scripts or agents:
183
+
184
+ ```bash
185
+ bdsc status --json
186
+ bdsc find Chronos --json
187
+ bdsc find FBgn0003996 --dataset genes --json
188
+ bdsc find --gene Or56a --property lexA --json
189
+ bdsc export components --limit 5 --format jsonl
190
+ bdsc stock 77118 --json
191
+ ```
192
+
193
+ ## Commands
194
+
195
+ - `bdsc sync`: download the BDSC CSV datasets; builds the index by default
196
+ - `bdsc build-index`: rebuild the SQLite index from previously downloaded CSVs
197
+ - `bdsc status`: show local dataset freshness and index metadata
198
+ - `bdsc find [query]`: primary query command; free-text lookup or compound filters
199
+ - `bdsc report <name>`: canned reports for `olfactory`, `drivers`, `optogenetics`
200
+ - `bdsc export <dataset>`: stream normalized rows as `jsonl`, `csv`, or `tsv`
201
+ - `bdsc terms <scope>`: inspect available property/relationship vocab
202
+ - `bdsc stock <stknum>`: local stock details
203
+ - legacy compatibility shims still exist for `search`, `gene`, `component`, `fbid`, `rrid`, `property`, `property-exact`, `driver-family`, `relationship`, `lookup`, `filter`, `live-search`
204
+
205
+ ## Find
206
+
207
+ Use `find` when the caller does not want to choose a dedicated query command up
208
+ front.
209
+
210
+ Auto-detect rules:
211
+
212
+ - digits -> `stock`
213
+ - `RRID:BDSC_*` or `BDSC_*` -> `rrid`
214
+ - `FBgn...` -> `gene`
215
+ - `FBti...` / `FBal...` / similar `FB..` ids in the component table -> `fbid`
216
+ - transgene/component-like text (`P{...}`, brackets, `attP`, `CyO`) -> `component`
217
+ - multi-term or dotted construct fragments -> local full-text `search`
218
+ - `--kind property` when you want property-driven lookup explicitly
219
+ - single bare terms -> `gene`, then local full-text `search` fallback if no gene hits
220
+
221
+ Examples:
222
+
223
+ ```bash
224
+ bdsc find Chronos
225
+ bdsc find RRID:BDSC_77118
226
+ bdsc find --kind component 'P{10XUAS-Chronos'
227
+ bdsc find --kind property VALIUM20
228
+ bdsc find --kind property-exact lexA
229
+ bdsc find --kind driver-family qf
230
+ ```
231
+
232
+ ## Export
233
+
234
+ Use `export` when another tool wants direct normalized rows instead of
235
+ search-oriented output.
236
+
237
+ Datasets:
238
+
239
+ - `stocks`
240
+ - `components`
241
+ - `genes`
242
+ - `properties`
243
+
244
+ Examples:
245
+
246
+ ```bash
247
+ bdsc export stocks --limit 3
248
+ bdsc export genes --query Chronos --kind gene
249
+ bdsc export components --query FBti0195688 --kind fbid --format jsonl
250
+ bdsc export properties --query VALIUM20 --kind property --format tsv
251
+ bdsc export components --gene Or56a --property lexA --format jsonl
252
+ bdsc export components --gene Or42b --driver-family qf --format jsonl
253
+ bdsc export genes --property olfactory --relationship coding --format csv
254
+ bdsc export components --format tsv --output components.tsv
255
+ bdsc export genes --format csv --output genes.csv
256
+ bdsc export properties --limit 20 --format jsonl
257
+ ```
258
+
259
+ `export --query` uses the same lookup kinds as `find --kind`:
260
+
261
+ - `stock`
262
+ - `rrid`
263
+ - `gene`
264
+ - `fbid`
265
+ - `component`
266
+ - `property`
267
+ - `property-exact`
268
+ - `driver-family`
269
+ - `relationship`
270
+ - `search`
271
+ - `auto`
272
+
273
+ You can also stack explicit filter flags on `export`; multiple flags combine as
274
+ AND:
275
+
276
+ - `--stock`
277
+ - `--rrid`
278
+ - `--gene`
279
+ - `--component`
280
+ - `--fbid`
281
+ - `--property`
282
+ - `--property-exact`
283
+ - `--driver-family`
284
+ - `--relationship`
285
+ - `--search`
286
+
287
+ ## Compound Find
288
+
289
+ `find` also subsumes compound filters. Default dataset: `components`.
290
+
291
+ Examples:
292
+
293
+ ```bash
294
+ bdsc find --gene Or56a --property lexA
295
+ bdsc find --gene Or67d --property qf
296
+ bdsc find --gene Or42b --driver-family lexA
297
+ bdsc find --gene Or56a --property-exact lexA
298
+ bdsc find --dataset stocks --property optogenetic
299
+ bdsc find --dataset genes --property olfactory --relationship coding --jsonl
300
+ ```
301
+
302
+ ## Reports
303
+
304
+ Use `report` for curated high-level buckets that would otherwise need multiple
305
+ queries or OR filters.
306
+
307
+ Reports:
308
+
309
+ - `olfactory`: receptor-family genes (`Or*`, `Orco`, `Ir*`, `Obp*`)
310
+ - `drivers`: GAL4 / lexA / QF / split-driver / FLP-like driver surfaces
311
+ - `optogenetics`: common optogenetic effectors plus optogenetic-tagged properties
312
+
313
+ Examples:
314
+
315
+ ```bash
316
+ bdsc report olfactory
317
+ bdsc report olfactory --dataset genes --jsonl
318
+ bdsc report drivers --limit 50 --json
319
+ bdsc report optogenetics --dataset components --jsonl
320
+ ```
321
+
322
+ ## Terms
323
+
324
+ Use `terms` when you need to discover the vocabulary before filtering.
325
+
326
+ Scopes:
327
+
328
+ - `properties`
329
+ - `property-descriptions`
330
+ - `relationships`
331
+
332
+ Examples:
333
+
334
+ ```bash
335
+ bdsc terms properties --limit 20
336
+ bdsc terms properties --query VALIUM --json
337
+ bdsc terms relationships --limit 20
338
+ bdsc terms property-descriptions --query optogenetic --jsonl
339
+ ```
340
+
341
+ ## Notes
342
+
343
+ - `sync` uses conditional HTTP headers when possible (`ETag`,
344
+ `If-Modified-Since`) to avoid re-downloading unchanged files.
345
+ - Local lookup is built from the public CSV dumps, not the private site search
346
+ endpoints.
347
+ - `search` now uses a two-stage index: exact/prefix FTS first, trigram fuzzy
348
+ fallback second. Typos and loose spacing/punctuation usually still find the
349
+ intended stock without having the exact BDSC string.
350
+ - `find` is the intended interactive entrypoint; dedicated legacy query
351
+ commands still work but are no longer the main documented path.
352
+ - direct lookup paths also rerank fuzzy candidates when exact/prefix matching
353
+ misses.
354
+ - use `property-exact` or `driver-family` when `property` is too broad for a
355
+ reliable LexA/QF/GAL4-style answer.
356
+ - tag pushes like `vX.Y.Z` run the release workflow: build artifacts, create a
357
+ GitHub release, and publish to PyPI.
358
+ - `scripts/render_homebrew_formula.py` renders a Homebrew formula from a built
359
+ sdist; use it when updating a tap after a release.
360
+ - The live endpoint is undocumented and may change without notice.
361
+ - BDSC data is large enough that the first full sync/index can take a few
362
+ minutes depending on network and disk speed.
@@ -0,0 +1,341 @@
1
+ # bdsc-cli
2
+
3
+ Small CLI for syncing public Bloomington Drosophila Stock Center datasets and
4
+ querying them locally.
5
+
6
+ Repo:
7
+
8
+ - https://github.com/gumadeiras/bdsc-cli
9
+
10
+ Primary source:
11
+
12
+ - https://bdsc.indiana.edu/stocks/stockdata.html
13
+
14
+ What it does:
15
+
16
+ - syncs BDSC CSV datasets into a local cache
17
+ - builds a local SQLite index
18
+ - supports local text search and stock lookups
19
+ - exposes optional live search against BDSC's current web endpoint
20
+
21
+ No third-party Python dependencies.
22
+
23
+ ## Install
24
+
25
+ Another computer:
26
+
27
+ ```bash
28
+ brew tap gumadeiras/tap
29
+ brew install bdsc-cli
30
+ ```
31
+
32
+ Or install the release wheel directly with `pipx`:
33
+
34
+ ```bash
35
+ pipx install 'bdsc-cli @ https://github.com/gumadeiras/bdsc-cli/releases/download/v0.2.1/bdsc_cli-0.2.1-py3-none-any.whl'
36
+ ```
37
+
38
+ Or with plain `pip`:
39
+
40
+ ```bash
41
+ python3 -m pip install 'bdsc-cli @ https://github.com/gumadeiras/bdsc-cli/releases/download/v0.2.1/bdsc_cli-0.2.1-py3-none-any.whl'
42
+ ```
43
+
44
+ Source install:
45
+
46
+ ```bash
47
+ git clone https://github.com/gumadeiras/bdsc-cli.git
48
+ cd bdsc-cli
49
+ python3 -m pip install .
50
+ ```
51
+
52
+ Repo-local dev install:
53
+
54
+ ```bash
55
+ cd ~/git/bdsc-cli
56
+ python3 -m venv .venv
57
+ . .venv/bin/activate
58
+ python -m pip install -e .
59
+ ```
60
+
61
+ Check the CLI:
62
+
63
+ ```bash
64
+ bdsc --help
65
+ ```
66
+
67
+ Build release artifacts locally:
68
+
69
+ ```bash
70
+ python -m pip install -e .[release]
71
+ python -m build
72
+ python -m twine check dist/*
73
+ python scripts/render_homebrew_formula.py dist/bdsc_cli-$(python - <<'PY'
74
+ from bdsc_cli import __version__
75
+ print(__version__)
76
+ PY
77
+ ).tar.gz
78
+ ```
79
+
80
+ PyPI note:
81
+
82
+ - the GitHub release is live
83
+ - PyPI trusted publishing is not configured yet for `bdsc-cli`
84
+ - `pip install bdsc-cli` will work after that publisher is added
85
+
86
+ ## Quickstart
87
+
88
+ Create a local cache and index:
89
+
90
+ ```bash
91
+ bdsc sync
92
+ ```
93
+
94
+ Then query it:
95
+
96
+ ```bash
97
+ bdsc find Chronos
98
+ bdsc find 'Or56a Lexa'
99
+ bdsc report optogenetics
100
+ bdsc find --gene Or56a --property lexA
101
+ bdsc find --gene Or42b --driver-family lexA
102
+ bdsc find RRID:BDSC_77118
103
+ bdsc find FBti0195688
104
+ bdsc stock 77118
105
+ ```
106
+
107
+ ## Usage
108
+
109
+ Default state directory:
110
+
111
+ ```text
112
+ ~/.local/share/bdsc-cli
113
+ ```
114
+
115
+ Sync datasets and build the local index:
116
+
117
+ ```bash
118
+ bdsc sync
119
+ ```
120
+
121
+ Use `find` for nearly all interactive querying:
122
+
123
+ ```bash
124
+ bdsc find Chronos
125
+ bdsc find Chronis
126
+ bdsc find 'Or56a Lexa'
127
+ bdsc find FBgn0003996 --json
128
+ bdsc find RRID:BDSC_77118
129
+ bdsc find FBti0195688
130
+ bdsc find --kind property VALIUM20
131
+ bdsc find --kind property-exact lexA
132
+ bdsc find --kind driver-family QF
133
+ bdsc find --kind relationship RNAi
134
+ bdsc find --gene Or56a --property lexA
135
+ bdsc find --gene Or42b --driver-family lexA
136
+ bdsc find --gene Or42b --driver-family qf
137
+ bdsc find --dataset genes --property olfactory --relationship coding --jsonl
138
+ ```
139
+
140
+ Use canned reports for common retrieval buckets:
141
+
142
+ ```bash
143
+ bdsc report olfactory
144
+ bdsc report drivers --jsonl
145
+ bdsc report optogenetics --limit 50
146
+ ```
147
+
148
+ Inspect cache/index status:
149
+
150
+ ```bash
151
+ bdsc status
152
+ ```
153
+
154
+ Use a custom cache/index location:
155
+
156
+ ```bash
157
+ bdsc sync --state-dir ./data
158
+ bdsc find Chronos --state-dir ./data
159
+ ```
160
+
161
+ Structured output for scripts or agents:
162
+
163
+ ```bash
164
+ bdsc status --json
165
+ bdsc find Chronos --json
166
+ bdsc find FBgn0003996 --dataset genes --json
167
+ bdsc find --gene Or56a --property lexA --json
168
+ bdsc export components --limit 5 --format jsonl
169
+ bdsc stock 77118 --json
170
+ ```
171
+
172
+ ## Commands
173
+
174
+ - `bdsc sync`: download the BDSC CSV datasets; builds the index by default
175
+ - `bdsc build-index`: rebuild the SQLite index from previously downloaded CSVs
176
+ - `bdsc status`: show local dataset freshness and index metadata
177
+ - `bdsc find [query]`: primary query command; free-text lookup or compound filters
178
+ - `bdsc report <name>`: canned reports for `olfactory`, `drivers`, `optogenetics`
179
+ - `bdsc export <dataset>`: stream normalized rows as `jsonl`, `csv`, or `tsv`
180
+ - `bdsc terms <scope>`: inspect available property/relationship vocab
181
+ - `bdsc stock <stknum>`: local stock details
182
+ - legacy compatibility shims still exist for `search`, `gene`, `component`, `fbid`, `rrid`, `property`, `property-exact`, `driver-family`, `relationship`, `lookup`, `filter`, `live-search`
183
+
184
+ ## Find
185
+
186
+ Use `find` when the caller does not want to choose a dedicated query command up
187
+ front.
188
+
189
+ Auto-detect rules:
190
+
191
+ - digits -> `stock`
192
+ - `RRID:BDSC_*` or `BDSC_*` -> `rrid`
193
+ - `FBgn...` -> `gene`
194
+ - `FBti...` / `FBal...` / similar `FB..` ids in the component table -> `fbid`
195
+ - transgene/component-like text (`P{...}`, brackets, `attP`, `CyO`) -> `component`
196
+ - multi-term or dotted construct fragments -> local full-text `search`
197
+ - `--kind property` when you want property-driven lookup explicitly
198
+ - single bare terms -> `gene`, then local full-text `search` fallback if no gene hits
199
+
200
+ Examples:
201
+
202
+ ```bash
203
+ bdsc find Chronos
204
+ bdsc find RRID:BDSC_77118
205
+ bdsc find --kind component 'P{10XUAS-Chronos'
206
+ bdsc find --kind property VALIUM20
207
+ bdsc find --kind property-exact lexA
208
+ bdsc find --kind driver-family qf
209
+ ```
210
+
211
+ ## Export
212
+
213
+ Use `export` when another tool wants direct normalized rows instead of
214
+ search-oriented output.
215
+
216
+ Datasets:
217
+
218
+ - `stocks`
219
+ - `components`
220
+ - `genes`
221
+ - `properties`
222
+
223
+ Examples:
224
+
225
+ ```bash
226
+ bdsc export stocks --limit 3
227
+ bdsc export genes --query Chronos --kind gene
228
+ bdsc export components --query FBti0195688 --kind fbid --format jsonl
229
+ bdsc export properties --query VALIUM20 --kind property --format tsv
230
+ bdsc export components --gene Or56a --property lexA --format jsonl
231
+ bdsc export components --gene Or42b --driver-family qf --format jsonl
232
+ bdsc export genes --property olfactory --relationship coding --format csv
233
+ bdsc export components --format tsv --output components.tsv
234
+ bdsc export genes --format csv --output genes.csv
235
+ bdsc export properties --limit 20 --format jsonl
236
+ ```
237
+
238
+ `export --query` uses the same lookup kinds as `find --kind`:
239
+
240
+ - `stock`
241
+ - `rrid`
242
+ - `gene`
243
+ - `fbid`
244
+ - `component`
245
+ - `property`
246
+ - `property-exact`
247
+ - `driver-family`
248
+ - `relationship`
249
+ - `search`
250
+ - `auto`
251
+
252
+ You can also stack explicit filter flags on `export`; multiple flags combine as
253
+ AND:
254
+
255
+ - `--stock`
256
+ - `--rrid`
257
+ - `--gene`
258
+ - `--component`
259
+ - `--fbid`
260
+ - `--property`
261
+ - `--property-exact`
262
+ - `--driver-family`
263
+ - `--relationship`
264
+ - `--search`
265
+
266
+ ## Compound Find
267
+
268
+ `find` also subsumes compound filters. Default dataset: `components`.
269
+
270
+ Examples:
271
+
272
+ ```bash
273
+ bdsc find --gene Or56a --property lexA
274
+ bdsc find --gene Or67d --property qf
275
+ bdsc find --gene Or42b --driver-family lexA
276
+ bdsc find --gene Or56a --property-exact lexA
277
+ bdsc find --dataset stocks --property optogenetic
278
+ bdsc find --dataset genes --property olfactory --relationship coding --jsonl
279
+ ```
280
+
281
+ ## Reports
282
+
283
+ Use `report` for curated high-level buckets that would otherwise need multiple
284
+ queries or OR filters.
285
+
286
+ Reports:
287
+
288
+ - `olfactory`: receptor-family genes (`Or*`, `Orco`, `Ir*`, `Obp*`)
289
+ - `drivers`: GAL4 / lexA / QF / split-driver / FLP-like driver surfaces
290
+ - `optogenetics`: common optogenetic effectors plus optogenetic-tagged properties
291
+
292
+ Examples:
293
+
294
+ ```bash
295
+ bdsc report olfactory
296
+ bdsc report olfactory --dataset genes --jsonl
297
+ bdsc report drivers --limit 50 --json
298
+ bdsc report optogenetics --dataset components --jsonl
299
+ ```
300
+
301
+ ## Terms
302
+
303
+ Use `terms` when you need to discover the vocabulary before filtering.
304
+
305
+ Scopes:
306
+
307
+ - `properties`
308
+ - `property-descriptions`
309
+ - `relationships`
310
+
311
+ Examples:
312
+
313
+ ```bash
314
+ bdsc terms properties --limit 20
315
+ bdsc terms properties --query VALIUM --json
316
+ bdsc terms relationships --limit 20
317
+ bdsc terms property-descriptions --query optogenetic --jsonl
318
+ ```
319
+
320
+ ## Notes
321
+
322
+ - `sync` uses conditional HTTP headers when possible (`ETag`,
323
+ `If-Modified-Since`) to avoid re-downloading unchanged files.
324
+ - Local lookup is built from the public CSV dumps, not the private site search
325
+ endpoints.
326
+ - `search` now uses a two-stage index: exact/prefix FTS first, trigram fuzzy
327
+ fallback second. Typos and loose spacing/punctuation usually still find the
328
+ intended stock without having the exact BDSC string.
329
+ - `find` is the intended interactive entrypoint; dedicated legacy query
330
+ commands still work but are no longer the main documented path.
331
+ - direct lookup paths also rerank fuzzy candidates when exact/prefix matching
332
+ misses.
333
+ - use `property-exact` or `driver-family` when `property` is too broad for a
334
+ reliable LexA/QF/GAL4-style answer.
335
+ - tag pushes like `vX.Y.Z` run the release workflow: build artifacts, create a
336
+ GitHub release, and publish to PyPI.
337
+ - `scripts/render_homebrew_formula.py` renders a Homebrew formula from a built
338
+ sdist; use it when updating a tap after a release.
339
+ - The live endpoint is undocumented and may change without notice.
340
+ - BDSC data is large enough that the first full sync/index can take a few
341
+ minutes depending on network and disk speed.