A loose federation of distributed, typed datasets
1<!DOCTYPE html>
2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
3
4<meta charset="utf-8">
5<meta name="generator" content="quarto-1.7.34">
6
7<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
8
9
10<title>index – atdata</title>
11<style>
12code{white-space: pre-wrap;}
13span.smallcaps{font-variant: small-caps;}
14div.columns{display: flex; gap: min(4vw, 1.5em);}
15div.column{flex: auto; overflow-x: auto;}
16div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
17ul.task-list{list-style: none;}
18ul.task-list li input[type="checkbox"] {
19 width: 0.8em;
20 margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
21 vertical-align: middle;
22}
23</style>
24
25
26<script src="../site_libs/quarto-nav/quarto-nav.js"></script>
27<script src="../site_libs/quarto-nav/headroom.min.js"></script>
28<script src="../site_libs/clipboard/clipboard.min.js"></script>
29<script src="../site_libs/quarto-search/autocomplete.umd.js"></script>
30<script src="../site_libs/quarto-search/fuse.min.js"></script>
31<script src="../site_libs/quarto-search/quarto-search.js"></script>
32<meta name="quarto:offset" content="../">
33<script src="../site_libs/quarto-html/quarto.js" type="module"></script>
34<script src="../site_libs/quarto-html/tabsets/tabsets.js" type="module"></script>
35<script src="../site_libs/quarto-html/popper.min.js"></script>
36<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
37<script src="../site_libs/quarto-html/anchor.min.js"></script>
38<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
39<link href="../site_libs/quarto-html/quarto-syntax-highlighting-9582434199d49cc9e91654cdeeb4866b.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles">
40<link href="../site_libs/quarto-html/quarto-syntax-highlighting-dark-8dcd8563ea6803ab7cbb3d71ca5772e1.css" rel="stylesheet" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles">
41<link href="../site_libs/quarto-html/quarto-syntax-highlighting-9582434199d49cc9e91654cdeeb4866b.css" rel="stylesheet" class="quarto-color-scheme-extra" id="quarto-text-highlighting-styles">
42<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
43<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
44<link href="../site_libs/bootstrap/bootstrap-62bce24ca844314e7bb1a34dbdfe05cc.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light">
45<link href="../site_libs/bootstrap/bootstrap-dark-7964ffd8887b0991fe8d71c6c8bc75d6.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme quarto-color-alternate" id="quarto-bootstrap" data-mode="dark">
46<link href="../site_libs/bootstrap/bootstrap-62bce24ca844314e7bb1a34dbdfe05cc.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme-extra" id="quarto-bootstrap" data-mode="light">
47<script id="quarto-search-options" type="application/json">{
48 "location": "navbar",
49 "copy-button": false,
50 "collapse-after": 3,
51 "panel-placement": "end",
52 "type": "overlay",
53 "limit": 50,
54 "keyboard-shortcut": [
55 "f",
56 "/",
57 "s"
58 ],
59 "show-item-context": false,
60 "language": {
61 "search-no-results-text": "No results",
62 "search-matching-documents-text": "matching documents",
63 "search-copy-link-title": "Copy link to search",
64 "search-hide-matches-text": "Hide additional matches",
65 "search-more-match-text": "more match in this document",
66 "search-more-matches-text": "more matches in this document",
67 "search-clear-button-title": "Clear",
68 "search-text-placeholder": "",
69 "search-detached-cancel-button-title": "Cancel",
70 "search-submit-button-title": "Submit",
71 "search-label": "Search"
72 }
73}</script>
74
75
76<link rel="stylesheet" href="../assets/styles.css">
77</head>
78
79<body class="nav-fixed quarto-light"><script id="quarto-html-before-body" type="application/javascript">
80 const toggleBodyColorMode = (bsSheetEl) => {
81 const mode = bsSheetEl.getAttribute("data-mode");
82 const bodyEl = window.document.querySelector("body");
83 if (mode === "dark") {
84 bodyEl.classList.add("quarto-dark");
85 bodyEl.classList.remove("quarto-light");
86 } else {
87 bodyEl.classList.add("quarto-light");
88 bodyEl.classList.remove("quarto-dark");
89 }
90 }
91 const toggleBodyColorPrimary = () => {
92 const bsSheetEl = window.document.querySelector("link#quarto-bootstrap:not([rel=disabled-stylesheet])");
93 if (bsSheetEl) {
94 toggleBodyColorMode(bsSheetEl);
95 }
96 }
97 const setColorSchemeToggle = (alternate) => {
98 const toggles = window.document.querySelectorAll('.quarto-color-scheme-toggle');
99 for (let i=0; i < toggles.length; i++) {
100 const toggle = toggles[i];
101 if (toggle) {
102 if (alternate) {
103 toggle.classList.add("alternate");
104 } else {
105 toggle.classList.remove("alternate");
106 }
107 }
108 }
109 };
110 const toggleColorMode = (alternate) => {
111 // Switch the stylesheets
112 const primaryStylesheets = window.document.querySelectorAll('link.quarto-color-scheme:not(.quarto-color-alternate)');
113 const alternateStylesheets = window.document.querySelectorAll('link.quarto-color-scheme.quarto-color-alternate');
114 manageTransitions('#quarto-margin-sidebar .nav-link', false);
115 if (alternate) {
116 // note: dark is layered on light, we don't disable primary!
117 enableStylesheet(alternateStylesheets);
118 for (const sheetNode of alternateStylesheets) {
119 if (sheetNode.id === "quarto-bootstrap") {
120 toggleBodyColorMode(sheetNode);
121 }
122 }
123 } else {
124 disableStylesheet(alternateStylesheets);
125 enableStylesheet(primaryStylesheets)
126 toggleBodyColorPrimary();
127 }
128 manageTransitions('#quarto-margin-sidebar .nav-link', true);
129 // Switch the toggles
130 setColorSchemeToggle(alternate)
131 // Hack to workaround the fact that safari doesn't
132 // properly recolor the scrollbar when toggling (#1455)
133 if (navigator.userAgent.indexOf('Safari') > 0 && navigator.userAgent.indexOf('Chrome') == -1) {
134 manageTransitions("body", false);
135 window.scrollTo(0, 1);
136 setTimeout(() => {
137 window.scrollTo(0, 0);
138 manageTransitions("body", true);
139 }, 40);
140 }
141 }
142 const disableStylesheet = (stylesheets) => {
143 for (let i=0; i < stylesheets.length; i++) {
144 const stylesheet = stylesheets[i];
145 stylesheet.rel = 'disabled-stylesheet';
146 }
147 }
148 const enableStylesheet = (stylesheets) => {
149 for (let i=0; i < stylesheets.length; i++) {
150 const stylesheet = stylesheets[i];
151 if(stylesheet.rel !== 'stylesheet') { // for Chrome, which will still FOUC without this check
152 stylesheet.rel = 'stylesheet';
153 }
154 }
155 }
156 const manageTransitions = (selector, allowTransitions) => {
157 const els = window.document.querySelectorAll(selector);
158 for (let i=0; i < els.length; i++) {
159 const el = els[i];
160 if (allowTransitions) {
161 el.classList.remove('notransition');
162 } else {
163 el.classList.add('notransition');
164 }
165 }
166 }
167 const isFileUrl = () => {
168 return window.location.protocol === 'file:';
169 }
170 const hasAlternateSentinel = () => {
171 let styleSentinel = getColorSchemeSentinel();
172 if (styleSentinel !== null) {
173 return styleSentinel === "alternate";
174 } else {
175 return false;
176 }
177 }
178 const setStyleSentinel = (alternate) => {
179 const value = alternate ? "alternate" : "default";
180 if (!isFileUrl()) {
181 window.localStorage.setItem("quarto-color-scheme", value);
182 } else {
183 localAlternateSentinel = value;
184 }
185 }
186 const getColorSchemeSentinel = () => {
187 if (!isFileUrl()) {
188 const storageValue = window.localStorage.getItem("quarto-color-scheme");
189 return storageValue != null ? storageValue : localAlternateSentinel;
190 } else {
191 return localAlternateSentinel;
192 }
193 }
194 const toggleGiscusIfUsed = (isAlternate, darkModeDefault) => {
195 const baseTheme = document.querySelector('#giscus-base-theme')?.value ?? 'light';
196 const alternateTheme = document.querySelector('#giscus-alt-theme')?.value ?? 'dark';
197 let newTheme = '';
198 if(authorPrefersDark) {
199 newTheme = isAlternate ? baseTheme : alternateTheme;
200 } else {
201 newTheme = isAlternate ? alternateTheme : baseTheme;
202 }
203 const changeGiscusTheme = () => {
204 // From: https://github.com/giscus/giscus/issues/336
205 const sendMessage = (message) => {
206 const iframe = document.querySelector('iframe.giscus-frame');
207 if (!iframe) return;
208 iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
209 }
210 sendMessage({
211 setConfig: {
212 theme: newTheme
213 }
214 });
215 }
216 const isGiscussLoaded = window.document.querySelector('iframe.giscus-frame') !== null;
217 if (isGiscussLoaded) {
218 changeGiscusTheme();
219 }
220 };
221 const authorPrefersDark = false;
222 const darkModeDefault = authorPrefersDark;
223 document.querySelector('link#quarto-text-highlighting-styles.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
224 document.querySelector('link#quarto-bootstrap.quarto-color-scheme-extra').rel = 'disabled-stylesheet';
225 let localAlternateSentinel = darkModeDefault ? 'alternate' : 'default';
226 // Dark / light mode switch
227 window.quartoToggleColorScheme = () => {
228 // Read the current dark / light value
229 let toAlternate = !hasAlternateSentinel();
230 toggleColorMode(toAlternate);
231 setStyleSentinel(toAlternate);
232 toggleGiscusIfUsed(toAlternate, darkModeDefault);
233 window.dispatchEvent(new Event('resize'));
234 };
235 // Switch to dark mode if need be
236 if (hasAlternateSentinel()) {
237 toggleColorMode(true);
238 } else {
239 toggleColorMode(false);
240 }
241 </script>
242
243<div id="quarto-search-results"></div>
244 <header id="quarto-header" class="headroom fixed-top">
245 <nav class="navbar navbar-expand-lg " data-bs-theme="dark">
246 <div class="navbar-container container-fluid">
247 <div class="navbar-brand-container mx-auto">
248 <a class="navbar-brand" href="../index.html">
249 <span class="navbar-title">atdata</span>
250 </a>
251 </div>
252 <div id="quarto-search" class="" title="Search"></div>
253 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" role="menu" aria-expanded="false" aria-label="Toggle navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
254 <span class="navbar-toggler-icon"></span>
255</button>
256 <div class="collapse navbar-collapse" id="navbarCollapse">
257 <ul class="navbar-nav navbar-nav-scroll me-auto">
258 <li class="nav-item">
259 <a class="nav-link" href="../index.html">
260<span class="menu-text">Guide</span></a>
261 </li>
262 <li class="nav-item dropdown ">
263 <a class="nav-link dropdown-toggle" href="#" id="nav-menu-tutorials" role="link" data-bs-toggle="dropdown" aria-expanded="false">
264 <span class="menu-text">Tutorials</span>
265 </a>
266 <ul class="dropdown-menu" aria-labelledby="nav-menu-tutorials">
267 <li>
268 <a class="dropdown-item" href="../tutorials/quickstart.html">
269 <span class="dropdown-text">Quick Start</span></a>
270 </li>
271 <li>
272 <a class="dropdown-item" href="../tutorials/local-workflow.html">
273 <span class="dropdown-text">Local Workflow</span></a>
274 </li>
275 <li>
276 <a class="dropdown-item" href="../tutorials/atmosphere.html">
277 <span class="dropdown-text">Atmosphere Publishing</span></a>
278 </li>
279 <li>
280 <a class="dropdown-item" href="../tutorials/promotion.html">
281 <span class="dropdown-text">Promotion Workflow</span></a>
282 </li>
283 </ul>
284 </li>
285 <li class="nav-item dropdown ">
286 <a class="nav-link dropdown-toggle" href="#" id="nav-menu-reference" role="link" data-bs-toggle="dropdown" aria-expanded="false">
287 <span class="menu-text">Reference</span>
288 </a>
289 <ul class="dropdown-menu" aria-labelledby="nav-menu-reference">
290 <li>
291 <a class="dropdown-item" href="../reference/architecture.html">
292 <span class="dropdown-text">Architecture Overview</span></a>
293 </li>
294 <li>
295 <a class="dropdown-item" href="../reference/packable-samples.html">
296 <span class="dropdown-text">Packable Samples</span></a>
297 </li>
298 <li>
299 <a class="dropdown-item" href="../reference/datasets.html">
300 <span class="dropdown-text">Datasets</span></a>
301 </li>
302 <li>
303 <a class="dropdown-item" href="../reference/lenses.html">
304 <span class="dropdown-text">Lenses</span></a>
305 </li>
306 <li>
307 <a class="dropdown-item" href="../reference/local-storage.html">
308 <span class="dropdown-text">Local Storage</span></a>
309 </li>
310 <li>
311 <a class="dropdown-item" href="../reference/atmosphere.html">
312 <span class="dropdown-text">Atmosphere</span></a>
313 </li>
314 <li>
315 <a class="dropdown-item" href="../reference/promotion.html">
316 <span class="dropdown-text">Promotion</span></a>
317 </li>
318 <li>
319 <a class="dropdown-item" href="../reference/load-dataset.html">
320 <span class="dropdown-text">load_dataset API</span></a>
321 </li>
322 <li>
323 <a class="dropdown-item" href="../reference/protocols.html">
324 <span class="dropdown-text">Protocols</span></a>
325 </li>
326 <li>
327 <a class="dropdown-item" href="../reference/uri-spec.html">
328 <span class="dropdown-text">URI Specification</span></a>
329 </li>
330 <li>
331 <a class="dropdown-item" href="../reference/troubleshooting.html">
332 <span class="dropdown-text">Troubleshooting & FAQ</span></a>
333 </li>
334 <li>
335 <a class="dropdown-item" href="../reference/deployment.html">
336 <span class="dropdown-text">Deployment Guide</span></a>
337 </li>
338 </ul>
339 </li>
340 <li class="nav-item">
341 <a class="nav-link active" href="../api/index.html" aria-current="page">
342<span class="menu-text">API</span></a>
343 </li>
344</ul>
345 <ul class="navbar-nav navbar-nav-scroll ms-auto">
346 <li class="nav-item compact">
347 <a class="nav-link" href="https://github.com/your-org/atdata"> <i class="bi bi-github" role="img">
348</i>
349<span class="menu-text"></span></a>
350 </li>
351</ul>
352 </div> <!-- /navcollapse -->
353 <div class="quarto-navbar-tools">
354 <a href="" class="quarto-color-scheme-toggle quarto-navigation-tool px-1" onclick="window.quartoToggleColorScheme(); return false;" title="Toggle dark mode"><i class="bi"></i></a>
355</div>
356 </div> <!-- /container-fluid -->
357 </nav>
358</header>
359<!-- content -->
360<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
361<!-- sidebar -->
362<!-- margin-sidebar -->
363 <div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
364 <nav id="TOC" role="doc-toc" class="toc-active">
365 <h2 id="toc-title">On this page</h2>
366
367 <ul>
368 <li><a href="#api-reference" id="toc-api-reference" class="nav-link active" data-scroll-target="#api-reference">API Reference</a>
369 <ul class="collapse">
370 <li><a href="#core" id="toc-core" class="nav-link" data-scroll-target="#core">Core</a></li>
371 <li><a href="#protocols" id="toc-protocols" class="nav-link" data-scroll-target="#protocols">Protocols</a></li>
372 <li><a href="#data-sources" id="toc-data-sources" class="nav-link" data-scroll-target="#data-sources">Data Sources</a></li>
373 <li><a href="#local-storage" id="toc-local-storage" class="nav-link" data-scroll-target="#local-storage">Local Storage</a></li>
374 <li><a href="#atmosphere" id="toc-atmosphere" class="nav-link" data-scroll-target="#atmosphere">Atmosphere</a></li>
375 <li><a href="#promotion" id="toc-promotion" class="nav-link" data-scroll-target="#promotion">Promotion</a></li>
376 </ul></li>
377 </ul>
378<div class="toc-actions"><ul><li><a href="https://github.com/your-org/atdata/edit/main/api/index.qmd" class="toc-action"><i class="bi bi-github"></i>Edit this page</a></li><li><a href="https://github.com/your-org/atdata/issues/new" class="toc-action"><i class="bi empty"></i>Report an issue</a></li></ul></div></nav>
379 </div>
380<!-- main -->
381<main class="content" id="quarto-document-content"><header id="title-block-header" class="quarto-title-block"></header>
382
383
384
385
386
387<section id="api-reference" class="level1 doc doc-index">
388<h1 class="doc doc-index">API Reference</h1>
389<section id="core" class="level2">
390<h2 class="anchored" data-anchor-id="core">Core</h2>
391<p>Core types, decorators, and dataset classes</p>
392<table class="caption-top table">
393<tbody>
394<tr class="odd">
395<td><a href="../api/packable.html#atdata.packable">packable</a></td>
396<td>Decorator to convert a regular class into a <code>PackableSample</code>.</td>
397</tr>
398<tr class="even">
399<td><a href="../api/PackableSample.html#atdata.PackableSample">PackableSample</a></td>
400<td>Base class for samples that can be serialized with msgpack.</td>
401</tr>
402<tr class="odd">
403<td><a href="../api/DictSample.html#atdata.DictSample">DictSample</a></td>
404<td>Dynamic sample type providing dict-like access to raw msgpack data.</td>
405</tr>
406<tr class="even">
407<td><a href="../api/Dataset.html#atdata.Dataset">Dataset</a></td>
408<td>A typed dataset built on WebDataset with lens transformations.</td>
409</tr>
410<tr class="odd">
411<td><a href="../api/SampleBatch.html#atdata.SampleBatch">SampleBatch</a></td>
412<td>A batch of samples with automatic attribute aggregation.</td>
413</tr>
414<tr class="even">
415<td><a href="../api/Lens.html#atdata.Lens">Lens</a></td>
416<td>A bidirectional transformation between two sample types.</td>
417</tr>
418<tr class="odd">
419<td><a href="lens.qmd#atdata.lens">lens</a></td>
420<td>Lens-based type transformations for datasets.</td>
421</tr>
422<tr class="even">
423<td><a href="../api/load_dataset.html#atdata.load_dataset">load_dataset</a></td>
424<td>Load a dataset from local files, remote URLs, or an index.</td>
425</tr>
426<tr class="odd">
427<td><a href="../api/DatasetDict.html#atdata.DatasetDict">DatasetDict</a></td>
428<td>A dictionary of split names to Dataset instances.</td>
429</tr>
430</tbody>
431</table>
432</section>
433<section id="protocols" class="level2">
434<h2 class="anchored" data-anchor-id="protocols">Protocols</h2>
435<p>Abstract protocols for storage backends</p>
436<table class="caption-top table">
437<tbody>
438<tr class="odd">
439<td><a href="../api/Packable-protocol.html#atdata.Packable">Packable</a></td>
440<td>Structural protocol for packable sample types.</td>
441</tr>
442<tr class="even">
443<td><a href="../api/IndexEntry.html#atdata.IndexEntry">IndexEntry</a></td>
444<td>Common interface for index entries (local or atmosphere).</td>
445</tr>
446<tr class="odd">
447<td><a href="../api/AbstractIndex.html#atdata.AbstractIndex">AbstractIndex</a></td>
448<td>Protocol for index operations - implemented by LocalIndex and AtmosphereIndex.</td>
449</tr>
450<tr class="even">
451<td><a href="../api/AbstractDataStore.html#atdata.AbstractDataStore">AbstractDataStore</a></td>
452<td>Protocol for data storage operations.</td>
453</tr>
454<tr class="odd">
455<td><a href="../api/DataSource.html#atdata.DataSource">DataSource</a></td>
456<td>Protocol for data sources that provide streams to Dataset.</td>
457</tr>
458</tbody>
459</table>
460</section>
461<section id="data-sources" class="level2">
462<h2 class="anchored" data-anchor-id="data-sources">Data Sources</h2>
463<p>Data source implementations for streaming</p>
464<table class="caption-top table">
465<tbody>
466<tr class="odd">
467<td><a href="../api/URLSource.html#atdata.URLSource">URLSource</a></td>
468<td>Data source for WebDataset-compatible URLs.</td>
469</tr>
470<tr class="even">
471<td><a href="../api/S3Source.html#atdata.S3Source">S3Source</a></td>
472<td>Data source for S3-compatible storage with explicit credentials.</td>
473</tr>
474<tr class="odd">
475<td><a href="../api/BlobSource.html#atdata.BlobSource">BlobSource</a></td>
476<td>Data source for ATProto PDS blob storage.</td>
477</tr>
478</tbody>
479</table>
480</section>
481<section id="local-storage" class="level2">
482<h2 class="anchored" data-anchor-id="local-storage">Local Storage</h2>
483<p>Local Redis/S3 storage backend</p>
484<table class="caption-top table">
485<tbody>
486<tr class="odd">
487<td><a href="../api/local.Index.html#atdata.local.Index">local.Index</a></td>
488<td>Redis-backed index for tracking datasets in a repository.</td>
489</tr>
490<tr class="even">
491<td><a href="../api/local.LocalDatasetEntry.html#atdata.local.LocalDatasetEntry">local.LocalDatasetEntry</a></td>
492<td>Index entry for a dataset stored in the local repository.</td>
493</tr>
494<tr class="odd">
495<td><a href="../api/local.S3DataStore.html#atdata.local.S3DataStore">local.S3DataStore</a></td>
496<td>S3-compatible data store implementing AbstractDataStore protocol.</td>
497</tr>
498</tbody>
499</table>
500</section>
501<section id="atmosphere" class="level2">
502<h2 class="anchored" data-anchor-id="atmosphere">Atmosphere</h2>
503<p>ATProto federation</p>
504<table class="caption-top table">
505<tbody>
506<tr class="odd">
507<td><a href="../api/AtmosphereClient.html#atdata.atmosphere.AtmosphereClient">AtmosphereClient</a></td>
508<td>ATProto client wrapper for atdata operations.</td>
509</tr>
510<tr class="even">
511<td><a href="../api/AtmosphereIndex.html#atdata.atmosphere.AtmosphereIndex">AtmosphereIndex</a></td>
512<td>ATProto index implementing AbstractIndex protocol.</td>
513</tr>
514<tr class="odd">
515<td><a href="../api/AtmosphereIndexEntry.html#atdata.atmosphere.AtmosphereIndexEntry">AtmosphereIndexEntry</a></td>
516<td>Entry wrapper for ATProto dataset records implementing IndexEntry protocol.</td>
517</tr>
518<tr class="even">
519<td><a href="../api/PDSBlobStore.html#atdata.atmosphere.PDSBlobStore">PDSBlobStore</a></td>
520<td>PDS blob store implementing AbstractDataStore protocol.</td>
521</tr>
522<tr class="odd">
523<td><a href="../api/SchemaPublisher.html#atdata.atmosphere.SchemaPublisher">SchemaPublisher</a></td>
524<td>Publishes PackableSample schemas to ATProto.</td>
525</tr>
526<tr class="even">
527<td><a href="../api/SchemaLoader.html#atdata.atmosphere.SchemaLoader">SchemaLoader</a></td>
528<td>Loads PackableSample schemas from ATProto.</td>
529</tr>
530<tr class="odd">
531<td><a href="../api/DatasetPublisher.html#atdata.atmosphere.DatasetPublisher">DatasetPublisher</a></td>
532<td>Publishes dataset index records to ATProto.</td>
533</tr>
534<tr class="even">
535<td><a href="../api/DatasetLoader.html#atdata.atmosphere.DatasetLoader">DatasetLoader</a></td>
536<td>Loads dataset records from ATProto.</td>
537</tr>
538<tr class="odd">
539<td><a href="../api/LensPublisher.html#atdata.atmosphere.LensPublisher">LensPublisher</a></td>
540<td>Publishes Lens transformation records to ATProto.</td>
541</tr>
542<tr class="even">
543<td><a href="../api/LensLoader.html#atdata.atmosphere.LensLoader">LensLoader</a></td>
544<td>Loads lens records from ATProto.</td>
545</tr>
546<tr class="odd">
547<td><a href="../api/AtUri.html#atdata.atmosphere.AtUri">AtUri</a></td>
548<td>Parsed AT Protocol URI.</td>
549</tr>
550</tbody>
551</table>
552</section>
553<section id="promotion" class="level2">
554<h2 class="anchored" data-anchor-id="promotion">Promotion</h2>
555<p>Local to atmosphere migration</p>
556<table class="caption-top table">
557<tbody>
558<tr class="odd">
559<td><a href="../api/promote_to_atmosphere.html#atdata.promote.promote_to_atmosphere">promote_to_atmosphere</a></td>
560<td>Promote a local dataset to the atmosphere network.</td>
561</tr>
562</tbody>
563</table>
564
565
566</section>
567</section>
568
569</main> <!-- /main -->
570<script id="quarto-html-after-body" type="application/javascript">
571 window.document.addEventListener("DOMContentLoaded", function (event) {
572 // Ensure there is a toggle, if there isn't float one in the top right
573 if (window.document.querySelector('.quarto-color-scheme-toggle') === null) {
574 const a = window.document.createElement('a');
575 a.classList.add('top-right');
576 a.classList.add('quarto-color-scheme-toggle');
577 a.href = "";
578 a.onclick = function() { try { window.quartoToggleColorScheme(); } catch {} return false; };
579 const i = window.document.createElement("i");
580 i.classList.add('bi');
581 a.appendChild(i);
582 window.document.body.appendChild(a);
583 }
584 setColorSchemeToggle(hasAlternateSentinel())
585 const icon = "";
586 const anchorJS = new window.AnchorJS();
587 anchorJS.options = {
588 placement: 'right',
589 icon: icon
590 };
591 anchorJS.add('.anchored');
592 const isCodeAnnotation = (el) => {
593 for (const clz of el.classList) {
594 if (clz.startsWith('code-annotation-')) {
595 return true;
596 }
597 }
598 return false;
599 }
600 const onCopySuccess = function(e) {
601 // button target
602 const button = e.trigger;
603 // don't keep focus
604 button.blur();
605 // flash "checked"
606 button.classList.add('code-copy-button-checked');
607 var currentTitle = button.getAttribute("title");
608 button.setAttribute("title", "Copied!");
609 let tooltip;
610 if (window.bootstrap) {
611 button.setAttribute("data-bs-toggle", "tooltip");
612 button.setAttribute("data-bs-placement", "left");
613 button.setAttribute("data-bs-title", "Copied!");
614 tooltip = new bootstrap.Tooltip(button,
615 { trigger: "manual",
616 customClass: "code-copy-button-tooltip",
617 offset: [0, -8]});
618 tooltip.show();
619 }
620 setTimeout(function() {
621 if (tooltip) {
622 tooltip.hide();
623 button.removeAttribute("data-bs-title");
624 button.removeAttribute("data-bs-toggle");
625 button.removeAttribute("data-bs-placement");
626 }
627 button.setAttribute("title", currentTitle);
628 button.classList.remove('code-copy-button-checked');
629 }, 1000);
630 // clear code selection
631 e.clearSelection();
632 }
633 const getTextToCopy = function(trigger) {
634 const codeEl = trigger.previousElementSibling.cloneNode(true);
635 for (const childEl of codeEl.children) {
636 if (isCodeAnnotation(childEl)) {
637 childEl.remove();
638 }
639 }
640 return codeEl.innerText;
641 }
642 const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
643 text: getTextToCopy
644 });
645 clipboard.on('success', onCopySuccess);
646 if (window.document.getElementById('quarto-embedded-source-code-modal')) {
647 const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
648 text: getTextToCopy,
649 container: window.document.getElementById('quarto-embedded-source-code-modal')
650 });
651 clipboardModal.on('success', onCopySuccess);
652 }
653 var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
654 var mailtoRegex = new RegExp(/^mailto:/);
655 var filterRegex = new RegExp("https:\/\/github\.com\/your-org\/atdata");
656 var isInternal = (href) => {
657 return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
658 }
659 // Inspect non-navigation links and adorn them if external
660 var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
661 for (var i=0; i<links.length; i++) {
662 const link = links[i];
663 if (!isInternal(link.href)) {
664 // undo the damage that might have been done by quarto-nav.js in the case of
665 // links that we want to consider external
666 if (link.dataset.originalHref !== undefined) {
667 link.href = link.dataset.originalHref;
668 }
669 }
670 }
671 function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
672 const config = {
673 allowHTML: true,
674 maxWidth: 500,
675 delay: 100,
676 arrow: false,
677 appendTo: function(el) {
678 return el.parentElement;
679 },
680 interactive: true,
681 interactiveBorder: 10,
682 theme: 'quarto',
683 placement: 'bottom-start',
684 };
685 if (contentFn) {
686 config.content = contentFn;
687 }
688 if (onTriggerFn) {
689 config.onTrigger = onTriggerFn;
690 }
691 if (onUntriggerFn) {
692 config.onUntrigger = onUntriggerFn;
693 }
694 window.tippy(el, config);
695 }
696 const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
697 for (var i=0; i<noterefs.length; i++) {
698 const ref = noterefs[i];
699 tippyHover(ref, function() {
700 // use id or data attribute instead here
701 let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
702 try { href = new URL(href).hash; } catch {}
703 const id = href.replace(/^#\/?/, "");
704 const note = window.document.getElementById(id);
705 if (note) {
706 return note.innerHTML;
707 } else {
708 return "";
709 }
710 });
711 }
712 const xrefs = window.document.querySelectorAll('a.quarto-xref');
713 const processXRef = (id, note) => {
714 // Strip column container classes
715 const stripColumnClz = (el) => {
716 el.classList.remove("page-full", "page-columns");
717 if (el.children) {
718 for (const child of el.children) {
719 stripColumnClz(child);
720 }
721 }
722 }
723 stripColumnClz(note)
724 if (id === null || id.startsWith('sec-')) {
725 // Special case sections, only their first couple elements
726 const container = document.createElement("div");
727 if (note.children && note.children.length > 2) {
728 container.appendChild(note.children[0].cloneNode(true));
729 for (let i = 1; i < note.children.length; i++) {
730 const child = note.children[i];
731 if (child.tagName === "P" && child.innerText === "") {
732 continue;
733 } else {
734 container.appendChild(child.cloneNode(true));
735 break;
736 }
737 }
738 if (window.Quarto?.typesetMath) {
739 window.Quarto.typesetMath(container);
740 }
741 return container.innerHTML
742 } else {
743 if (window.Quarto?.typesetMath) {
744 window.Quarto.typesetMath(note);
745 }
746 return note.innerHTML;
747 }
748 } else {
749 // Remove any anchor links if they are present
750 const anchorLink = note.querySelector('a.anchorjs-link');
751 if (anchorLink) {
752 anchorLink.remove();
753 }
754 if (window.Quarto?.typesetMath) {
755 window.Quarto.typesetMath(note);
756 }
757 if (note.classList.contains("callout")) {
758 return note.outerHTML;
759 } else {
760 return note.innerHTML;
761 }
762 }
763 }
764 for (var i=0; i<xrefs.length; i++) {
765 const xref = xrefs[i];
766 tippyHover(xref, undefined, function(instance) {
767 instance.disable();
768 let url = xref.getAttribute('href');
769 let hash = undefined;
770 if (url.startsWith('#')) {
771 hash = url;
772 } else {
773 try { hash = new URL(url).hash; } catch {}
774 }
775 if (hash) {
776 const id = hash.replace(/^#\/?/, "");
777 const note = window.document.getElementById(id);
778 if (note !== null) {
779 try {
780 const html = processXRef(id, note.cloneNode(true));
781 instance.setContent(html);
782 } finally {
783 instance.enable();
784 instance.show();
785 }
786 } else {
787 // See if we can fetch this
788 fetch(url.split('#')[0])
789 .then(res => res.text())
790 .then(html => {
791 const parser = new DOMParser();
792 const htmlDoc = parser.parseFromString(html, "text/html");
793 const note = htmlDoc.getElementById(id);
794 if (note !== null) {
795 const html = processXRef(id, note);
796 instance.setContent(html);
797 }
798 }).finally(() => {
799 instance.enable();
800 instance.show();
801 });
802 }
803 } else {
804 // See if we can fetch a full url (with no hash to target)
805 // This is a special case and we should probably do some content thinning / targeting
806 fetch(url)
807 .then(res => res.text())
808 .then(html => {
809 const parser = new DOMParser();
810 const htmlDoc = parser.parseFromString(html, "text/html");
811 const note = htmlDoc.querySelector('main.content');
812 if (note !== null) {
813 // This should only happen for chapter cross references
814 // (since there is no id in the URL)
815 // remove the first header
816 if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
817 note.children[0].remove();
818 }
819 const html = processXRef(null, note);
820 instance.setContent(html);
821 }
822 }).finally(() => {
823 instance.enable();
824 instance.show();
825 });
826 }
827 }, function(instance) {
828 });
829 }
830 let selectedAnnoteEl;
831 const selectorForAnnotation = ( cell, annotation) => {
832 let cellAttr = 'data-code-cell="' + cell + '"';
833 let lineAttr = 'data-code-annotation="' + annotation + '"';
834 const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
835 return selector;
836 }
837 const selectCodeLines = (annoteEl) => {
838 const doc = window.document;
839 const targetCell = annoteEl.getAttribute("data-target-cell");
840 const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
841 const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
842 const lines = annoteSpan.getAttribute("data-code-lines").split(",");
843 const lineIds = lines.map((line) => {
844 return targetCell + "-" + line;
845 })
846 let top = null;
847 let height = null;
848 let parent = null;
849 if (lineIds.length > 0) {
850 //compute the position of the single el (top and bottom and make a div)
851 const el = window.document.getElementById(lineIds[0]);
852 top = el.offsetTop;
853 height = el.offsetHeight;
854 parent = el.parentElement.parentElement;
855 if (lineIds.length > 1) {
856 const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
857 const bottom = lastEl.offsetTop + lastEl.offsetHeight;
858 height = bottom - top;
859 }
860 if (top !== null && height !== null && parent !== null) {
861 // cook up a div (if necessary) and position it
862 let div = window.document.getElementById("code-annotation-line-highlight");
863 if (div === null) {
864 div = window.document.createElement("div");
865 div.setAttribute("id", "code-annotation-line-highlight");
866 div.style.position = 'absolute';
867 parent.appendChild(div);
868 }
869 div.style.top = top - 2 + "px";
870 div.style.height = height + 4 + "px";
871 div.style.left = 0;
872 let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
873 if (gutterDiv === null) {
874 gutterDiv = window.document.createElement("div");
875 gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
876 gutterDiv.style.position = 'absolute';
877 const codeCell = window.document.getElementById(targetCell);
878 const gutter = codeCell.querySelector('.code-annotation-gutter');
879 gutter.appendChild(gutterDiv);
880 }
881 gutterDiv.style.top = top - 2 + "px";
882 gutterDiv.style.height = height + 4 + "px";
883 }
884 selectedAnnoteEl = annoteEl;
885 }
886 };
887 const unselectCodeLines = () => {
888 const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
889 elementsIds.forEach((elId) => {
890 const div = window.document.getElementById(elId);
891 if (div) {
892 div.remove();
893 }
894 });
895 selectedAnnoteEl = undefined;
896 };
897 // Handle positioning of the toggle
898 window.addEventListener(
899 "resize",
900 throttle(() => {
901 elRect = undefined;
902 if (selectedAnnoteEl) {
903 selectCodeLines(selectedAnnoteEl);
904 }
905 }, 10)
906 );
907 function throttle(fn, ms) {
908 let throttle = false;
909 let timer;
910 return (...args) => {
911 if(!throttle) { // first call gets through
912 fn.apply(this, args);
913 throttle = true;
914 } else { // all the others get throttled
915 if(timer) clearTimeout(timer); // cancel #2
916 timer = setTimeout(() => {
917 fn.apply(this, args);
918 timer = throttle = false;
919 }, ms);
920 }
921 };
922 }
923 // Attach click handler to the DT
924 const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
925 for (const annoteDlNode of annoteDls) {
926 annoteDlNode.addEventListener('click', (event) => {
927 const clickedEl = event.target;
928 if (clickedEl !== selectedAnnoteEl) {
929 unselectCodeLines();
930 const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
931 if (activeEl) {
932 activeEl.classList.remove('code-annotation-active');
933 }
934 selectCodeLines(clickedEl);
935 clickedEl.classList.add('code-annotation-active');
936 } else {
937 // Unselect the line
938 unselectCodeLines();
939 clickedEl.classList.remove('code-annotation-active');
940 }
941 });
942 }
943 const findCites = (el) => {
944 const parentEl = el.parentElement;
945 if (parentEl) {
946 const cites = parentEl.dataset.cites;
947 if (cites) {
948 return {
949 el,
950 cites: cites.split(' ')
951 };
952 } else {
953 return findCites(el.parentElement)
954 }
955 } else {
956 return undefined;
957 }
958 };
959 var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
960 for (var i=0; i<bibliorefs.length; i++) {
961 const ref = bibliorefs[i];
962 const citeInfo = findCites(ref);
963 if (citeInfo) {
964 tippyHover(citeInfo.el, function() {
965 var popup = window.document.createElement('div');
966 citeInfo.cites.forEach(function(cite) {
967 var citeDiv = window.document.createElement('div');
968 citeDiv.classList.add('hanging-indent');
969 citeDiv.classList.add('csl-entry');
970 var biblioDiv = window.document.getElementById('ref-' + cite);
971 if (biblioDiv) {
972 citeDiv.innerHTML = biblioDiv.innerHTML;
973 }
974 popup.appendChild(citeDiv);
975 });
976 return popup.innerHTML;
977 });
978 }
979 }
980 });
981 </script>
982</div> <!-- /content -->
983<footer class="footer">
984 <div class="nav-footer">
985 <div class="nav-footer-left">
986<p>Built with <a href="https://quarto.org/">Quarto</a></p>
987</div>
988 <div class="nav-footer-center">
989
990 <div class="toc-actions d-sm-block d-md-none"><ul><li><a href="https://github.com/your-org/atdata/edit/main/api/index.qmd" class="toc-action"><i class="bi bi-github"></i>Edit this page</a></li><li><a href="https://github.com/your-org/atdata/issues/new" class="toc-action"><i class="bi empty"></i>Report an issue</a></li></ul></div></div>
991 <div class="nav-footer-right">
992<p>MIT License</p>
993</div>
994 </div>
995</footer>
996
997
998
999
1000</body></html>