Nicolas Bader commited on
Commit
b5d6820
·
1 Parent(s): fe79386

Initial HF Space setup (minimal marimo app)

Browse files
Files changed (5) hide show
  1. 01_naming_convention.py +85 -0
  2. Dockerfile +22 -0
  3. README.md +1 -0
  4. canvod_nordic.css +688 -0
  5. requirements.txt +1 -0
01_naming_convention.py ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import marimo
2
+
3
+ __generated_with = "0.21.1"
4
+ app = marimo.App(
5
+ width="medium",
6
+ app_title="Naming Convention & Validation",
7
+ css_file="canvod_nordic.css",
8
+ )
9
+
10
+
11
+ @app.cell
12
+ def _():
13
+ import marimo as mo
14
+ return (mo, )
15
+
16
+
17
+ @app.cell
18
+ def _(mo):
19
+ mo.md(r"""
20
+ # Naming Convention and File Validation
21
+
22
+ GNSS-Transmissometry campaigns generate thousands of files across
23
+ multiple receivers, days, and sampling intervals. Without a strict
24
+ naming convention, duplicate or misattributed files can silently
25
+ corrupt a dataset.
26
+
27
+ The **canvod-virtualiconvname** package is the single source of truth for
28
+ GNSS filename conventions in canvodpy. It provides:
29
+
30
+ 1. **`CanVODFilename`** — a structured parser for the IGS-derived
31
+ long-name convention
32
+ 2. **`BUILTIN_PATTERNS`** — regex patterns for recognising RINEX v2,
33
+ RINEX v3, Septentrio SBF, and canVOD filenames
34
+ 3. **`FilenameMapper`** — maps physical files on disk to canonical names
35
+ 4. **`DataDirectoryValidator`** — pre-pipeline hard gate that rejects
36
+ unmapped files and temporal overlaps before any data is read
37
+
38
+ The naming convention encodes station identity, receiver role, time window,
39
+ sampling rate, and file type into a single, self-describing filename.
40
+ This eliminates ambiguity when ingesting data from multiple receivers
41
+ and time periods.
42
+
43
+ ---
44
+ """)
45
+ return
46
+
47
+
48
+ @app.cell
49
+ def _(mo):
50
+ mo.md(r"""
51
+ ## The canVOD filename convention
52
+
53
+ ```
54
+ ROSA01TUW_R_20250010000_15M_05S_AA.rnx
55
+ ^^^|^|^^^ ^^^^|^^^|^^^^ ^^^ ^^^ ^^
56
+ SIT T NN AGC YYYY DOY HHMM PER SMP PH TYPE
57
+ ```
58
+
59
+ | Field | Chars | Description | Example |
60
+ |-------|-------|-------------|---------|
61
+ | **SIT** | 3 | Site identifier (uppercase) | `ROS` |
62
+ | **T** | 1 | Receiver type: `R`=reference, `A`=active (canopy) | `A` |
63
+ | **NN** | 2 | Receiver number (01--99) | `01` |
64
+ | **AGC** | 3 | Operating agency (uppercase) | `TUW` |
65
+ | `_R_` | 3 | Separator (RINEX convention) | |
66
+ | **YYYY** | 4 | Year | `2025` |
67
+ | **DOY** | 3 | Day of year (001--366) | `001` |
68
+ | **HHMM** | 4 | Start hour and minute (UTC) | `0000` |
69
+ | **PER** | 3 | File duration (`15M`, `01H`, `01D`) | `15M` |
70
+ | **SMP** | 3 | Sampling interval (`05S`, `01S`) | `05S` |
71
+ | **PH** | 2 | Reserved; ignored during parsing | `AA` |
72
+ | **TYPE** | 3+ | File extension (`rnx`, `sbf`, `nmea`) | `rnx` |
73
+
74
+ This convention extends the
75
+ [IGS long-name standard](http://acc.igs.org/misc/rinex304.pdf)
76
+ (page 14f) with a receiver-type field (`T`) that distinguishes
77
+ reference and canopy receivers at the same site.
78
+
79
+ ![IGS long-name convention](public/IGS_long_name_convention.png)
80
+ """)
81
+ return
82
+
83
+
84
+ if __name__ == "__main__":
85
+ app.run()
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1.4
2
+ FROM python:3.13-slim
3
+
4
+ COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
5
+ ENV UV_SYSTEM_PYTHON=1 \
6
+ PYTHONDONTWRITEBYTECODE=1 \
7
+ PYTHONUNBUFFERED=1
8
+
9
+ WORKDIR /app
10
+
11
+ RUN useradd -m -u 1000 user
12
+
13
+ COPY requirements.txt /app/requirements.txt
14
+ RUN uv pip install -r /app/requirements.txt
15
+
16
+ COPY --chown=user:user . /app
17
+
18
+ USER user
19
+
20
+ EXPOSE 7860
21
+
22
+ CMD ["marimo", "run", "/app/01_naming_convention.py", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -4,6 +4,7 @@ emoji: ⚡
4
  colorFrom: yellow
5
  colorTo: yellow
6
  sdk: docker
 
7
  pinned: false
8
  ---
9
 
 
4
  colorFrom: yellow
5
  colorTo: yellow
6
  sdk: docker
7
+ app_port: 7860
8
  pinned: false
9
  ---
10
 
canvod_nordic.css ADDED
@@ -0,0 +1,688 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* =========================================================
2
+ canVODpy Nordic — marimo theme
3
+ Mirrors the zensical docs design language
4
+ 5-color Nordic Green palette + Space Grotesk / Fira Code
5
+ ========================================================= */
6
+
7
+ @import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Fira+Code:wght@300..700&display=swap");
8
+
9
+ /* ---------- Palette tokens (always available) ---------- */
10
+ :root {
11
+ --g1: #E1E6B9;
12
+ --g2: #C4D7A4;
13
+ --g3: #ABC8A4;
14
+ --g4: #375D3B;
15
+ --g5: #183128;
16
+
17
+ --monospace-font: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
18
+ --text-font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
19
+ --heading-font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
20
+ --radius: 12px;
21
+ }
22
+
23
+ /* ==========================================================
24
+ LIGHT MODE
25
+ Match marimo's own selector specificity: .light,.light-theme,:root
26
+ ========================================================== */
27
+ .light, .light-theme, :root {
28
+ --background: var(--g1);
29
+ --foreground: var(--g5);
30
+ --muted: var(--g2);
31
+ --muted-foreground: var(--g4);
32
+ --popover: var(--g1);
33
+ --popover-foreground: var(--g5);
34
+ --card: var(--g2);
35
+ --card-foreground: var(--g5);
36
+ --border: #96B07A;
37
+ --input: #96B07A;
38
+ --primary: var(--g4);
39
+ --primary-foreground: var(--g1);
40
+ --secondary: var(--g2);
41
+ --secondary-foreground: var(--g5);
42
+ --accent: var(--g3);
43
+ --accent-foreground: var(--g5);
44
+ --ring: var(--g3);
45
+
46
+ --destructive: #8B3A3A;
47
+ --destructive-foreground: var(--g1);
48
+ --error: #8B3A3A;
49
+ --error-foreground: var(--g1);
50
+ --success: var(--g4);
51
+ --success-foreground: var(--g1);
52
+
53
+ --action: var(--g2);
54
+ --action-hover: var(--g3);
55
+ --action-foreground: var(--g5);
56
+
57
+ --link: var(--g4);
58
+ --link-visited: var(--g4);
59
+ --stale: hsla(90, 30%, 60%, 0.25);
60
+
61
+ --base-shadow: hsla(80, 20%, 50%, 0.15);
62
+ --base-shadow-darker: hsla(80, 30%, 40%, 0.2);
63
+ --base-shadow-opacity: 8%;
64
+
65
+ /* -- Radix gray → green-tinted cream (higher contrast) -- */
66
+ --gray-1: #E4E8B8;
67
+ --gray-2: #CBD4A0;
68
+ --gray-3: #BFCA96;
69
+ --gray-4: #C4CC9C;
70
+ --gray-5: #B8C490;
71
+ --gray-6: #ABC886;
72
+ --gray-7: #96B07A;
73
+ --gray-8: #7D9568;
74
+ --gray-9: #5A7A4A;
75
+ --gray-10: #4D6B3F;
76
+ --gray-11: #375D3B;
77
+ --gray-12: #183128;
78
+
79
+ /* -- Radix slate → same as gray -- */
80
+ --slate-1: #E8ECBF;
81
+ --slate-2: #D6DDB0;
82
+ --slate-3: #CDD5A6;
83
+ --slate-4: #C4CC9C;
84
+ --slate-5: #B8C490;
85
+ --slate-6: #ABC886;
86
+ --slate-7: #96B07A;
87
+ --slate-8: #7D9568;
88
+ --slate-9: #5A7A4A;
89
+ --slate-10: #4D6B3F;
90
+ --slate-11: #375D3B;
91
+ --slate-12: #183128;
92
+
93
+ /* -- Radix sage → same as gray -- */
94
+ --sage-1: #E8ECBF;
95
+ --sage-2: #D6DDB0;
96
+ --sage-3: #CDD5A6;
97
+ --sage-4: #C4CC9C;
98
+ --sage-5: #B8C490;
99
+ --sage-6: #ABC886;
100
+ --sage-7: #96B07A;
101
+ --sage-8: #7D9568;
102
+ --sage-9: #5A7A4A;
103
+ --sage-10: #4D6B3F;
104
+ --sage-11: #375D3B;
105
+ --sage-12: #183128;
106
+
107
+ /* -- Radix amber → green (kill yellow) -- */
108
+ --amber-1: #EAECCC;
109
+ --amber-2: #DDE2B8;
110
+ --amber-3: #D0D8A8;
111
+ --amber-4: #C0CC96;
112
+ --amber-5: #B0C084;
113
+ --amber-6: #9DB474;
114
+ --amber-7: #88A262;
115
+ --amber-8: #6E8A4E;
116
+ --amber-9: #5A7A3E;
117
+ --amber-10: #4D6B34;
118
+ --amber-11: #3D5A2A;
119
+ --amber-12: #D4DCAC;
120
+
121
+ /* -- Radix yellow → green (kill yellow) -- */
122
+ --yellow-1: #EAECCC;
123
+ --yellow-2: #DDE2B8;
124
+ --yellow-3: #D0D8A8;
125
+ --yellow-4: #C0CC96;
126
+ --yellow-5: #B0C084;
127
+ --yellow-6: #9DB474;
128
+ --yellow-7: #88A262;
129
+ --yellow-8: #6E8A4E;
130
+ --yellow-9: #5A7A3E;
131
+ --yellow-10: #4D6B34;
132
+ --yellow-11: #3D5A2A;
133
+ --yellow-12: #D4DCAC;
134
+
135
+ /* -- Radix orange → green (kill orange) -- */
136
+ --orange-1: #EAECCC;
137
+ --orange-2: #DDE2B8;
138
+ --orange-3: #D0D8A8;
139
+ --orange-4: #C0CC96;
140
+ --orange-5: #B0C084;
141
+ --orange-6: #9DB474;
142
+ --orange-7: #88A262;
143
+ --orange-8: #6E8A4E;
144
+ --orange-9: #5A7A3E;
145
+ --orange-10: #4D6B34;
146
+ --orange-11: #3D5A2A;
147
+ --orange-12: #D4DCAC;
148
+
149
+ /* -- Radix lime → Nordic green (table odd rows use --lime-2) -- */
150
+ --lime-1: #E8ECBF;
151
+ --lime-2: #D6DDB0;
152
+ --lime-3: #CDD5A6;
153
+ --lime-4: #C0CC96;
154
+ --lime-5: #B0C084;
155
+ --lime-6: #9DB474;
156
+ --lime-7: #88A262;
157
+ --lime-8: #6E8A4E;
158
+ --lime-9: #5A7A3E;
159
+ --lime-10: #4D6B34;
160
+ --lime-11: #3D5A2A;
161
+ --lime-12: #2A4020;
162
+
163
+ /* -- Radix grass → Nordic green (success backgrounds) -- */
164
+ --grass-1: #E8ECBF;
165
+ --grass-2: #D6DDB0;
166
+ --grass-3: #CDD5A6;
167
+ --grass-4: #C0CC96;
168
+ --grass-5: #B0C084;
169
+ --grass-6: #9DB474;
170
+ --grass-7: #88A262;
171
+ --grass-8: #6E8A4E;
172
+ --grass-9: #5A7A3E;
173
+ --grass-10: #4D6B34;
174
+ --grass-11: #3D5A2A;
175
+ --grass-12: #2A4020;
176
+
177
+ /* -- Radix green → Nordic green -- */
178
+ --green-1: #E8ECBF;
179
+ --green-2: #D6DDB0;
180
+ --green-3: #CDD5A6;
181
+ --green-4: #C0CC96;
182
+ --green-5: #B0C084;
183
+ --green-6: #9DB474;
184
+ --green-7: #88A262;
185
+ --green-8: #6E8A4E;
186
+ --green-9: #5A7A3E;
187
+ --green-10: #4D6B34;
188
+ --green-11: #3D5A2A;
189
+ --green-12: #2A4020;
190
+ }
191
+
192
+ /* ========== LIGHT-MODE element overrides ========== */
193
+
194
+ .cm-editor {
195
+ background-color: var(--gray-2) !important;
196
+ }
197
+ .cm-gutters {
198
+ background-color: var(--gray-2) !important;
199
+ border-right-color: var(--gray-4) !important;
200
+ }
201
+ .cm-activeLine {
202
+ background-color: hsla(90, 40%, 55%, 0.12) !important;
203
+ }
204
+ .cm-activeLineGutter {
205
+ background-color: hsla(90, 40%, 55%, 0.18) !important;
206
+ }
207
+ .cm-editor .cm-selectionBackground,
208
+ .cm-editor.cm-focused .cm-selectionBackground,
209
+ ::selection {
210
+ background-color: hsla(100, 50%, 45%, 0.25) !important;
211
+ }
212
+ .marimo-cell {
213
+ border-color: var(--gray-5) !important;
214
+ }
215
+ .marimo-cell:hover {
216
+ border-color: var(--gray-7) !important;
217
+ }
218
+
219
+ /* Matching brackets — green */
220
+ .cm-editor.cm-focused .cm-matchingBracket {
221
+ background-color: hsla(90, 50%, 50%, 0.25) !important;
222
+ outline: 1px solid hsla(90, 50%, 50%, 0.35) !important;
223
+ }
224
+ .cm-editor .cm-searchMatch {
225
+ background-color: hsla(90, 60%, 50%, 0.3) !important;
226
+ outline: 1px solid hsla(90, 60%, 50%, 0.4) !important;
227
+ }
228
+ .cm-editor .cm-selectionMatch {
229
+ background-color: hsla(90, 40%, 50%, 0.15) !important;
230
+ }
231
+
232
+ /* Markdown output — transparent, not white */
233
+ [data-cell-id] > div,
234
+ .output-area {
235
+ background-color: transparent !important;
236
+ }
237
+
238
+ /* Tables */
239
+ table, th, td {
240
+ border-color: var(--gray-5) !important;
241
+ }
242
+ th {
243
+ background-color: var(--gray-4) !important;
244
+ }
245
+
246
+ /* Code blocks in rendered markdown */
247
+ pre, code {
248
+ background-color: var(--gray-2) !important;
249
+ }
250
+
251
+ /* Table row striping — force green palette */
252
+ table tbody tr:nth-child(odd),
253
+ table.dataframe tbody tr:nth-child(odd) {
254
+ background-color: var(--gray-2) !important;
255
+ }
256
+ table tbody tr:nth-child(even),
257
+ table.dataframe tbody tr:nth-child(even) {
258
+ background-color: var(--gray-1) !important;
259
+ }
260
+ table tbody tr:hover {
261
+ background-color: var(--gray-3) !important;
262
+ }
263
+
264
+ /* ==========================================================
265
+ DARK MODE
266
+ ========================================================== */
267
+ .dark, .dark-theme, body.dark-theme {
268
+ --background: #0d0d0d;
269
+ --foreground: var(--g1);
270
+ --muted: #3a3a3a;
271
+ --muted-foreground: var(--g2);
272
+ --popover: #2a2a2a;
273
+ --popover-foreground: var(--g1);
274
+ --card: #2a2a2a;
275
+ --card-foreground: var(--g1);
276
+ --border: #444444;
277
+ --input: #444444;
278
+ --primary: var(--g3);
279
+ --primary-foreground: #0d0d0d;
280
+ --secondary: #3a3a3a;
281
+ --secondary-foreground: var(--g1);
282
+ --accent: #3a3a3a;
283
+ --accent-foreground: var(--g1);
284
+ --ring: #444444;
285
+
286
+ --destructive: #C47070;
287
+ --destructive-foreground: var(--g5);
288
+ --error: #C47070;
289
+ --error-foreground: var(--g5);
290
+ --success: var(--g3);
291
+ --success-foreground: #0d0d0d;
292
+
293
+ --action: #2d4a2d;
294
+ --action-hover: #3a5a3a;
295
+ --action-foreground: var(--g1);
296
+
297
+ --link: var(--g3);
298
+ --link-visited: var(--g2);
299
+ --stale: #3a3a3a;
300
+
301
+ --base-shadow: hsla(0, 0%, 0%, 0.3);
302
+ --base-shadow-darker: hsla(0, 0%, 0%, 0.5);
303
+ --base-shadow-opacity: 5%;
304
+
305
+ /* -- Radix gray (dark) -- */
306
+ --gray-1: #111111;
307
+ --gray-2: #1a1a1a;
308
+ --gray-3: #222222;
309
+ --gray-4: #2a2a2a;
310
+ --gray-5: #333333;
311
+ --gray-6: #3a3a3a;
312
+ --gray-7: #484848;
313
+ --gray-8: #555555;
314
+ --gray-9: #6e6e6e;
315
+ --gray-10: #7b7b7b;
316
+ --gray-11: #C4D7A4;
317
+ --gray-12: #E1E6B9;
318
+
319
+ /* -- Radix slate (dark) -- */
320
+ --slate-1: #111111;
321
+ --slate-2: #1a1a1a;
322
+ --slate-3: #222222;
323
+ --slate-4: #2a2a2a;
324
+ --slate-5: #333333;
325
+ --slate-6: #3a3a3a;
326
+ --slate-7: #484848;
327
+ --slate-8: #555555;
328
+ --slate-9: #6e6e6e;
329
+ --slate-10: #7b7b7b;
330
+ --slate-11: #C4D7A4;
331
+ --slate-12: #E1E6B9;
332
+
333
+ /* -- Radix sage (dark) -- */
334
+ --sage-1: #111111;
335
+ --sage-2: #1a1a1a;
336
+ --sage-3: #222222;
337
+ --sage-4: #2a2a2a;
338
+ --sage-5: #333333;
339
+ --sage-6: #3a3a3a;
340
+ --sage-7: #484848;
341
+ --sage-8: #555555;
342
+ --sage-9: #6e6e6e;
343
+ --sage-10: #7b7b7b;
344
+ --sage-11: #C4D7A4;
345
+ --sage-12: #E1E6B9;
346
+
347
+ /* -- Radix amber (dark) — kill yellow -- */
348
+ --amber-1: #111510;
349
+ --amber-2: #1a2018;
350
+ --amber-3: #223020;
351
+ --amber-4: #2a3a28;
352
+ --amber-5: #334530;
353
+ --amber-6: #3d5038;
354
+ --amber-7: #4a6044;
355
+ --amber-8: #5a7550;
356
+ --amber-9: #6e8a5e;
357
+ --amber-10: #7d9B6e;
358
+ --amber-11: #ABC8A4;
359
+ --amber-12: #E1E6B9;
360
+
361
+ /* -- Radix yellow (dark) — kill yellow -- */
362
+ --yellow-1: #111510;
363
+ --yellow-2: #1a2018;
364
+ --yellow-3: #223020;
365
+ --yellow-4: #2a3a28;
366
+ --yellow-5: #334530;
367
+ --yellow-6: #3d5038;
368
+ --yellow-7: #4a6044;
369
+ --yellow-8: #5a7550;
370
+ --yellow-9: #6e8a5e;
371
+ --yellow-10: #7d9B6e;
372
+ --yellow-11: #ABC8A4;
373
+ --yellow-12: #E1E6B9;
374
+
375
+ /* -- Radix orange (dark) — kill orange -- */
376
+ --orange-1: #111510;
377
+ --orange-2: #1a2018;
378
+ --orange-3: #223020;
379
+ --orange-4: #2a3a28;
380
+ --orange-5: #334530;
381
+ --orange-6: #3d5038;
382
+ --orange-7: #4a6044;
383
+ --orange-8: #5a7550;
384
+ --orange-9: #6e8a5e;
385
+ --orange-10: #7d9B6e;
386
+ --orange-11: #ABC8A4;
387
+ --orange-12: #E1E6B9;
388
+
389
+ /* -- Radix lime (dark) -- */
390
+ --lime-1: #111511;
391
+ --lime-2: #1a201a;
392
+ --lime-3: #223022;
393
+ --lime-4: #2a3a2a;
394
+ --lime-5: #334533;
395
+ --lime-6: #3d503d;
396
+ --lime-7: #4a604a;
397
+ --lime-8: #5a755a;
398
+ --lime-9: #6e8a6e;
399
+ --lime-10: #7d9B7d;
400
+ --lime-11: #ABC8A4;
401
+ --lime-12: #E1E6B9;
402
+
403
+ /* -- Radix grass (dark) -- */
404
+ --grass-1: #111511;
405
+ --grass-2: #1a201a;
406
+ --grass-3: #223022;
407
+ --grass-4: #2a3a2a;
408
+ --grass-5: #334533;
409
+ --grass-6: #3d503d;
410
+ --grass-7: #4a604a;
411
+ --grass-8: #5a755a;
412
+ --grass-9: #6e8a6e;
413
+ --grass-10: #7d9B7d;
414
+ --grass-11: #ABC8A4;
415
+ --grass-12: #E1E6B9;
416
+
417
+ /* -- Radix green (dark) -- */
418
+ --green-1: #111511;
419
+ --green-2: #1a201a;
420
+ --green-3: #223022;
421
+ --green-4: #2a3a2a;
422
+ --green-5: #334533;
423
+ --green-6: #3d503d;
424
+ --green-7: #4a604a;
425
+ --green-8: #5a755a;
426
+ --green-9: #6e8a6e;
427
+ --green-10: #7d9B7d;
428
+ --green-11: #ABC8A4;
429
+ --green-12: #E1E6B9;
430
+ }
431
+
432
+ /* Dark-mode — fix bold/heading text in markdown output only */
433
+ body.dark-theme .markdown h1,
434
+ body.dark-theme .markdown h2,
435
+ body.dark-theme .markdown h3,
436
+ body.dark-theme .markdown h4,
437
+ body.dark-theme .markdown h5,
438
+ body.dark-theme .markdown h6,
439
+ body.dark-theme .markdown strong,
440
+ body.dark-theme .markdown b,
441
+ .dark .markdown h1,
442
+ .dark .markdown h2,
443
+ .dark .markdown h3,
444
+ .dark .markdown h4,
445
+ .dark .markdown h5,
446
+ .dark .markdown h6,
447
+ .dark .markdown strong,
448
+ .dark .markdown b {
449
+ color: var(--g1) !important;
450
+ }
451
+
452
+ /* Dark-mode element overrides */
453
+
454
+ /* Override One Dark syntax theme — cream tones instead of bright white/gray */
455
+ body.dark-theme .cm-editor .cm-content,
456
+ .dark .cm-editor .cm-content {
457
+ color: #D0D6A8 !important; /* muted cream, not #abb2bf gray */
458
+ caret-color: var(--g3) !important;
459
+ }
460
+
461
+ /* Matching brackets — green tint instead of blue */
462
+ body.dark-theme .cm-editor.cm-focused .cm-matchingBracket,
463
+ .dark .cm-editor.cm-focused .cm-matchingBracket {
464
+ background-color: hsla(90, 40%, 40%, 0.3) !important;
465
+ outline: 1px solid hsla(90, 40%, 50%, 0.4) !important;
466
+ }
467
+
468
+ /* Search match — green instead of blue */
469
+ body.dark-theme .cm-editor .cm-searchMatch,
470
+ .dark .cm-editor .cm-searchMatch {
471
+ background-color: hsla(90, 50%, 40%, 0.35) !important;
472
+ outline: 1px solid hsla(90, 50%, 50%, 0.5) !important;
473
+ }
474
+
475
+ /* Selection match — subtle green */
476
+ body.dark-theme .cm-editor .cm-selectionMatch,
477
+ .dark .cm-editor .cm-selectionMatch {
478
+ background-color: hsla(90, 40%, 40%, 0.15) !important;
479
+ }
480
+
481
+ /* Fold placeholder */
482
+ body.dark-theme .cm-editor .cm-foldPlaceholder,
483
+ .dark .cm-editor .cm-foldPlaceholder {
484
+ color: var(--g3) !important;
485
+ }
486
+
487
+ /* Tooltip / autocomplete */
488
+ body.dark-theme .cm-editor .cm-tooltip,
489
+ .dark .cm-editor .cm-tooltip {
490
+ background-color: #222 !important;
491
+ border-color: #444 !important;
492
+ color: var(--g1) !important;
493
+ }
494
+
495
+ body.dark-theme .cm-editor .cm-tooltip-autocomplete ul li[aria-selected],
496
+ .dark .cm-editor .cm-tooltip-autocomplete ul li[aria-selected] {
497
+ background-color: hsla(90, 30%, 35%, 0.4) !important;
498
+ }
499
+
500
+ /* Line numbers — muted */
501
+ body.dark-theme .cm-editor .cm-lineNumbers .cm-gutterElement,
502
+ .dark .cm-editor .cm-lineNumbers .cm-gutterElement {
503
+ color: #555 !important;
504
+ }
505
+
506
+ body.dark-theme .cm-editor,
507
+ .dark .cm-editor {
508
+ background-color: #1a1a1a !important;
509
+ }
510
+ body.dark-theme .cm-gutters,
511
+ .dark .cm-gutters {
512
+ background-color: #1a1a1a !important;
513
+ border-right-color: #333 !important;
514
+ }
515
+ body.dark-theme .cm-activeLine,
516
+ .dark .cm-activeLine {
517
+ background-color: hsla(90, 30%, 40%, 0.1) !important;
518
+ }
519
+ body.dark-theme .cm-activeLineGutter,
520
+ .dark .cm-activeLineGutter {
521
+ background-color: hsla(90, 30%, 40%, 0.14) !important;
522
+ }
523
+ body.dark-theme .cm-editor .cm-selectionBackground,
524
+ body.dark-theme .cm-editor.cm-focused .cm-selectionBackground,
525
+ .dark .cm-editor .cm-selectionBackground,
526
+ .dark .cm-editor.cm-focused .cm-selectionBackground {
527
+ background-color: hsla(100, 40%, 35%, 0.3) !important;
528
+ }
529
+ body.dark-theme .marimo-cell,
530
+ .dark .marimo-cell {
531
+ border-color: #333 !important;
532
+ }
533
+ body.dark-theme .marimo-cell:hover,
534
+ .dark .marimo-cell:hover {
535
+ border-color: #555 !important;
536
+ }
537
+ body.dark-theme pre,
538
+ body.dark-theme code,
539
+ .dark pre,
540
+ .dark code {
541
+ background-color: #1a1a1a !important;
542
+ }
543
+ body.dark-theme th,
544
+ .dark th {
545
+ background-color: #2a2a2a !important;
546
+ }
547
+ body.dark-theme table,
548
+ body.dark-theme th,
549
+ body.dark-theme td,
550
+ .dark table,
551
+ .dark th,
552
+ .dark td {
553
+ border-color: #444 !important;
554
+ }
555
+ body.dark-theme table tbody tr:nth-child(odd),
556
+ body.dark-theme table.dataframe tbody tr:nth-child(odd),
557
+ .dark table tbody tr:nth-child(odd),
558
+ .dark table.dataframe tbody tr:nth-child(odd) {
559
+ background-color: #1a1a1a !important;
560
+ }
561
+ body.dark-theme table tbody tr:nth-child(even),
562
+ body.dark-theme table.dataframe tbody tr:nth-child(even),
563
+ .dark table tbody tr:nth-child(even),
564
+ .dark table.dataframe tbody tr:nth-child(even) {
565
+ background-color: #151515 !important;
566
+ }
567
+ body.dark-theme table tbody tr:hover,
568
+ .dark table tbody tr:hover {
569
+ background-color: #222 !important;
570
+ }
571
+
572
+ /* =========================================================
573
+ xarray repr dark-mode fixes
574
+ ========================================================= */
575
+ body.dark-theme .xr-wrap,
576
+ .dark .xr-wrap {
577
+ --xr-font-color0: rgba(255, 255, 255, 1);
578
+ --xr-font-color2: rgba(255, 255, 255, 0.7);
579
+ --xr-font-color3: rgba(255, 255, 255, 0.45);
580
+ --xr-border-color: rgba(255, 255, 255, 0.18);
581
+ --xr-disabled-color: rgba(255, 255, 255, 0.35);
582
+ --xr-background-color: transparent;
583
+ --xr-background-color-row-even: rgba(255, 255, 255, 0.05);
584
+ --xr-background-color-row-odd: rgba(255, 255, 255, 0.08);
585
+ }
586
+
587
+ body.dark-theme .xr-wrap,
588
+ body.dark-theme .xr-wrap .xr-var-name,
589
+ body.dark-theme .xr-wrap .xr-var-dims,
590
+ body.dark-theme .xr-wrap .xr-var-dtype,
591
+ .dark .xr-wrap,
592
+ .dark .xr-wrap .xr-var-name,
593
+ .dark .xr-wrap .xr-var-dims,
594
+ .dark .xr-wrap .xr-var-dtype {
595
+ color: inherit !important;
596
+ }
597
+
598
+ body.dark-theme .xr-wrap :focus,
599
+ .dark .xr-wrap :focus {
600
+ outline: none !important;
601
+ box-shadow: none !important;
602
+ }
603
+
604
+ body.dark-theme .xr-wrap .xr-section-item input + label,
605
+ body.dark-theme .xr-wrap .xr-var-attrs-in + label,
606
+ body.dark-theme .xr-wrap .xr-var-data-in + label,
607
+ body.dark-theme .xr-wrap .xr-index-data-in + label,
608
+ .dark .xr-wrap .xr-section-item input + label,
609
+ .dark .xr-wrap .xr-var-attrs-in + label,
610
+ .dark .xr-wrap .xr-var-data-in + label,
611
+ .dark .xr-wrap .xr-index-data-in + label {
612
+ border-color: transparent !important;
613
+ box-shadow: none !important;
614
+ outline: none !important;
615
+ }
616
+
617
+ body.dark-theme .xr-wrap .xr-header,
618
+ .dark .xr-wrap .xr-header {
619
+ border-bottom: 1px solid var(--xr-border-color) !important;
620
+ }
621
+
622
+ body.dark-theme .xr-wrap table,
623
+ body.dark-theme .xr-wrap th,
624
+ body.dark-theme .xr-wrap td,
625
+ body.dark-theme .xr-wrap pre,
626
+ body.dark-theme .xr-wrap .xr-var-data > pre,
627
+ body.dark-theme .xr-wrap .xr-index-data > pre,
628
+ body.dark-theme .xr-wrap .xr-var-data > table > tbody > tr,
629
+ .dark .xr-wrap table,
630
+ .dark .xr-wrap th,
631
+ .dark .xr-wrap td,
632
+ .dark .xr-wrap pre,
633
+ .dark .xr-wrap .xr-var-data > pre,
634
+ .dark .xr-wrap .xr-index-data > pre,
635
+ .dark .xr-wrap .xr-var-data > table > tbody > tr {
636
+ background-color: transparent !important;
637
+ }
638
+
639
+ body.dark-theme .xr-wrap .xr-var-item > .xr-var-name span,
640
+ .dark .xr-wrap .xr-var-item > .xr-var-name span {
641
+ background-color: transparent !important;
642
+ }
643
+
644
+ body.dark-theme .xr-wrap .xr-icon-database,
645
+ body.dark-theme .xr-wrap .xr-icon-file-text2,
646
+ .dark .xr-wrap .xr-icon-database,
647
+ .dark .xr-wrap .xr-icon-file-text2 {
648
+ opacity: 0.5;
649
+ }
650
+
651
+ body.dark-theme .xr-wrap .xr-var-attrs-in:checked + label > .xr-icon-file-text2,
652
+ body.dark-theme .xr-wrap .xr-var-data-in:checked + label > .xr-icon-database,
653
+ body.dark-theme .xr-wrap .xr-index-data-in:checked + label > .xr-icon-database,
654
+ .dark .xr-wrap .xr-var-attrs-in:checked + label > .xr-icon-file-text2,
655
+ .dark .xr-wrap .xr-var-data-in:checked + label > .xr-icon-database,
656
+ .dark .xr-wrap .xr-index-data-in:checked + label > .xr-icon-database {
657
+ opacity: 0.7;
658
+ filter: none;
659
+ }
660
+
661
+ body.dark-theme .xr-wrap .xr-section-summary-in,
662
+ body.dark-theme .xr-wrap .xr-var-attrs-in,
663
+ body.dark-theme .xr-wrap .xr-var-data-in,
664
+ body.dark-theme .xr-wrap .xr-index-data-in,
665
+ .dark .xr-wrap .xr-section-summary-in,
666
+ .dark .xr-wrap .xr-var-attrs-in,
667
+ .dark .xr-wrap .xr-var-data-in,
668
+ .dark .xr-wrap .xr-index-data-in {
669
+ opacity: 0 !important;
670
+ width: 0 !important;
671
+ height: 0 !important;
672
+ margin: 0 !important;
673
+ padding: 0 !important;
674
+ -webkit-appearance: none !important;
675
+ appearance: none !important;
676
+ }
677
+
678
+ /* =========================================================
679
+ Accessibility: reduced motion
680
+ ========================================================= */
681
+ @media (prefers-reduced-motion: reduce) {
682
+ *, *::before, *::after {
683
+ animation-duration: 0.01ms !important;
684
+ animation-iteration-count: 1 !important;
685
+ transition-duration: 0.01ms !important;
686
+ scroll-behavior: auto !important;
687
+ }
688
+ }
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ marimo>=0.21.0