Skip to content

Commit e16fff7

Browse files
committed
fixed Typing issue with apimodel that sometimes lead to poor intellisense;
1 parent 337e00d commit e16fff7

6 files changed

Lines changed: 253 additions & 85 deletions

File tree

notebooks/apimodel_exploration.ipynb

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
{
2626
"cell_type": "code",
27-
"execution_count": 5,
27+
"execution_count": 42,
2828
"id": "a79adbb6",
2929
"metadata": {},
3030
"outputs": [],
@@ -73,7 +73,7 @@
7373
},
7474
{
7575
"cell_type": "code",
76-
"execution_count": 6,
76+
"execution_count": 43,
7777
"id": "324e9cc4",
7878
"metadata": {},
7979
"outputs": [
@@ -83,7 +83,7 @@
8383
"TinyUser(id=7, name='Mina', missing_ok=UNSET)"
8484
]
8585
},
86-
"execution_count": 6,
86+
"execution_count": 43,
8787
"metadata": {},
8888
"output_type": "execute_result"
8989
}
@@ -114,17 +114,17 @@
114114
},
115115
{
116116
"cell_type": "code",
117-
"execution_count": 7,
117+
"execution_count": 44,
118118
"id": "e7de1a27",
119119
"metadata": {},
120120
"outputs": [
121121
{
122122
"data": {
123123
"text/plain": [
124-
"\"CheckedUser.id expected <class 'int'>, got str\""
124+
"\"CheckedUser.id expected <class 'int'>, got str (not an int)\""
125125
]
126126
},
127-
"execution_count": 7,
127+
"execution_count": 44,
128128
"metadata": {},
129129
"output_type": "execute_result"
130130
}
@@ -161,7 +161,7 @@
161161
},
162162
{
163163
"cell_type": "code",
164-
"execution_count": 8,
164+
"execution_count": 45,
165165
"id": "a24ea1a8",
166166
"metadata": {},
167167
"outputs": [
@@ -171,7 +171,7 @@
171171
"'StrictSwitch.note is UNSET'"
172172
]
173173
},
174-
"execution_count": 8,
174+
"execution_count": 45,
175175
"metadata": {},
176176
"output_type": "execute_result"
177177
}
@@ -209,17 +209,17 @@
209209
},
210210
{
211211
"cell_type": "code",
212-
"execution_count": 9,
212+
"execution_count": 46,
213213
"id": "50b18151",
214214
"metadata": {},
215215
"outputs": [
216216
{
217217
"data": {
218218
"text/plain": [
219-
"\"CompleteUser.id expected <class 'int'>, got str\""
219+
"\"CompleteUser.id expected <class 'int'>, got str (bad)\""
220220
]
221221
},
222-
"execution_count": 9,
222+
"execution_count": 46,
223223
"metadata": {},
224224
"output_type": "execute_result"
225225
}
@@ -255,7 +255,7 @@
255255
},
256256
{
257257
"cell_type": "code",
258-
"execution_count": 10,
258+
"execution_count": 47,
259259
"id": "0983a475",
260260
"metadata": {},
261261
"outputs": [
@@ -275,7 +275,7 @@
275275
"('mina', ('_lazycache_profile',))"
276276
]
277277
},
278-
"execution_count": 10,
278+
"execution_count": 47,
279279
"metadata": {},
280280
"output_type": "execute_result"
281281
}
@@ -321,7 +321,7 @@
321321
},
322322
{
323323
"cell_type": "code",
324-
"execution_count": 11,
324+
"execution_count": 48,
325325
"id": "2dd7f452",
326326
"metadata": {},
327327
"outputs": [
@@ -338,10 +338,11 @@
338338
{
339339
"data": {
340340
"text/plain": [
341-
"(42, \"ValidatedLazyProfile.reputation expected <class 'int'>, got str\")"
341+
"(42,\n",
342+
" \"ValidatedLazyProfile.reputation expected <class 'int'>, got str (not a number)\")"
342343
]
343344
},
344-
"execution_count": 11,
345+
"execution_count": 48,
345346
"metadata": {},
346347
"output_type": "execute_result"
347348
}
@@ -397,7 +398,7 @@
397398
},
398399
{
399400
"cell_type": "code",
400-
"execution_count": 31,
401+
"execution_count": 49,
401402
"id": "6c4f8b21",
402403
"metadata": {},
403404
"outputs": [
@@ -449,7 +450,7 @@
449450
},
450451
{
451452
"cell_type": "code",
452-
"execution_count": 27,
453+
"execution_count": 50,
453454
"id": "0d965b67",
454455
"metadata": {},
455456
"outputs": [
@@ -459,7 +460,7 @@
459460
"{'started_at_type': 'datetime', 'started_at': '2026-04-19T12:00:00+00:00'}"
460461
]
461462
},
462-
"execution_count": 27,
463+
"execution_count": 50,
463464
"metadata": {},
464465
"output_type": "execute_result"
465466
}
@@ -491,7 +492,7 @@
491492
},
492493
{
493494
"cell_type": "code",
494-
"execution_count": 26,
495+
"execution_count": 51,
495496
"id": "6f65a568",
496497
"metadata": {},
497498
"outputs": [],
@@ -575,7 +576,7 @@
575576
},
576577
{
577578
"cell_type": "code",
578-
"execution_count": 27,
579+
"execution_count": 52,
579580
"id": "10f2f73d",
580581
"metadata": {},
581582
"outputs": [],
@@ -617,7 +618,7 @@
617618
},
618619
{
619620
"cell_type": "code",
620-
"execution_count": 28,
621+
"execution_count": 53,
621622
"id": "a7fd84ff",
622623
"metadata": {},
623624
"outputs": [
@@ -627,7 +628,7 @@
627628
"('atlas-foundry', ())"
628629
]
629630
},
630-
"execution_count": 28,
631+
"execution_count": 53,
631632
"metadata": {},
632633
"output_type": "execute_result"
633634
}
@@ -655,7 +656,7 @@
655656
},
656657
{
657658
"cell_type": "code",
658-
"execution_count": 29,
659+
"execution_count": 54,
659660
"id": "486941bf",
660661
"metadata": {},
661662
"outputs": [
@@ -665,7 +666,7 @@
665666
"('Mina Vale', 'America/Phoenix', ('_lazycache_owner',))"
666667
]
667668
},
668-
"execution_count": 29,
669+
"execution_count": 54,
669670
"metadata": {},
670671
"output_type": "execute_result"
671672
}
@@ -690,7 +691,7 @@
690691
},
691692
{
692693
"cell_type": "code",
693-
"execution_count": 30,
694+
"execution_count": 55,
694695
"id": "d6edbc36",
695696
"metadata": {},
696697
"outputs": [
@@ -700,7 +701,7 @@
700701
"['9001: Cinder Index (green)', '9002: Needle Cache (yellow)']"
701702
]
702703
},
703-
"execution_count": 30,
704+
"execution_count": 55,
704705
"metadata": {},
705706
"output_type": "execute_result"
706707
}
@@ -729,7 +730,7 @@
729730
},
730731
{
731732
"cell_type": "code",
732-
"execution_count": 31,
733+
"execution_count": 56,
733734
"id": "9a5ea331",
734735
"metadata": {},
735736
"outputs": [
@@ -743,7 +744,7 @@
743744
" {'source': 'api', 'rows': 11}]}"
744745
]
745746
},
746-
"execution_count": 31,
747+
"execution_count": 56,
747748
"metadata": {},
748749
"output_type": "execute_result"
749750
}
@@ -803,7 +804,7 @@
803804
},
804805
{
805806
"cell_type": "code",
806-
"execution_count": 32,
807+
"execution_count": 57,
807808
"id": "timestamp-eager",
808809
"metadata": {},
809810
"outputs": [
@@ -816,7 +817,7 @@
816817
" 'reviewed_at': '2026-04-19T12:35:12+00:00'}"
817818
]
818819
},
819-
"execution_count": 32,
820+
"execution_count": 57,
820821
"metadata": {},
821822
"output_type": "execute_result"
822823
}
@@ -849,7 +850,7 @@
849850
},
850851
{
851852
"cell_type": "code",
852-
"execution_count": 33,
853+
"execution_count": 58,
853854
"id": "timestamp-lazy",
854855
"metadata": {},
855856
"outputs": [
@@ -858,10 +859,10 @@
858859
"text/plain": [
859860
"{'first_seen': '2026-04-18T10:15:00-07:00',\n",
860861
" 'last_seen': '2026-04-19T12:34:56+00:00',\n",
861-
" 'invalid_payload': \"TimestampedEvent.created_at expected <class 'datetime.datetime'>, got str\"}"
862+
" 'invalid_payload': \"TimestampedEvent.created_at expected <class 'datetime.datetime'>, got str (not a timestamp)\"}"
862863
]
863864
},
864-
"execution_count": 33,
865+
"execution_count": 58,
865866
"metadata": {},
866867
"output_type": "execute_result"
867868
}
@@ -910,7 +911,7 @@
910911
},
911912
{
912913
"cell_type": "code",
913-
"execution_count": 34,
914+
"execution_count": 59,
914915
"id": "c21f4e0c",
915916
"metadata": {},
916917
"outputs": [
@@ -920,7 +921,7 @@
920921
"'9001: Cinder Index (blue)'"
921922
]
922923
},
923-
"execution_count": 34,
924+
"execution_count": 59,
924925
"metadata": {},
925926
"output_type": "execute_result"
926927
}
@@ -953,7 +954,7 @@
953954
},
954955
{
955956
"cell_type": "code",
956-
"execution_count": 35,
957+
"execution_count": 60,
957958
"id": "dc12d4b1",
958959
"metadata": {},
959960
"outputs": [
@@ -963,7 +964,7 @@
963964
"('Rochester', ())"
964965
]
965966
},
966-
"execution_count": 35,
967+
"execution_count": 60,
967968
"metadata": {},
968969
"output_type": "execute_result"
969970
}
@@ -992,7 +993,7 @@
992993
},
993994
{
994995
"cell_type": "code",
995-
"execution_count": 36,
996+
"execution_count": 61,
996997
"id": "676fb10c",
997998
"metadata": {},
998999
"outputs": [
@@ -1003,7 +1004,7 @@
10031004
" \"Organization(id=101, slug='atlas-foundry', active=True, owner=Person(id=5001, name='Mina Vale', profile=Profile(email='mina@example.test', timezone='America/Phoenix', address=Address(city='Flagstaff', region='AZ', country='US'))), projects=[Project(id=9001, name='Cinder Index', status='green', releases=[Release(version='1.2.0', notes=['metadata paging', 'faster cold reads'], artifacts={'wheel': Artifact(sha256='demo-wheel-9001-120', bytes=182144), 'sdist': Artifact(sha256='demo-sdist-9001-120', bytes=74211)}), Release(version='1.1.4', notes=['retry tagging', 'trace cleanup'], artifacts={'wheel': Artifact(sha256='demo-wheel-9001-114', bytes=175002)})], metrics=Metrics(latency_ms=Latency(p50=18, p95=44, p99=79), daily_requests=[820, 901, 977, 1044, 998, 1120, 1186])), Project(id=9002, name='Needle Cache', status='yellow', releases=[Release(version='0.9.3', notes=['sample compaction', 'manifest repair'], artifacts={'wheel': Artifact(sha256='demo-wheel-9002-093', bytes=160313)})], metrics=Metrics(latency_ms=Latency(p50=26, p95=61, p99=103), daily_requests=[410, 433, 452, 481, 500, 521, 540]))], audit=AuditTrail(created_by=Person(id=3001, name='Rafi Stone', profile=Profile(email='rafi@example.test', timezone='America/Denver', address=Address(city='Boulder', region='CO', country='US'))), events=[AuditEvent(at='2026-04-18T10:15:00-07:00', kind='create', actor='rafi', details={'source': 'import', 'rows': 42}), AuditEvent(at='2026-04-19T09:12:00-07:00', kind='sync', actor='mina', details={'source': 'api', 'rows': 11})]), stats=Stats(open_issues=4, stars=128, labels=['python', 'cache', 'notebook']))\")"
10041005
]
10051006
},
1006-
"execution_count": 36,
1007+
"execution_count": 61,
10071008
"metadata": {},
10081009
"output_type": "execute_result"
10091010
}
@@ -1038,7 +1039,7 @@
10381039
],
10391040
"metadata": {
10401041
"kernelspec": {
1041-
"display_name": ".venv (3.13.13)",
1042+
"display_name": "Python 3",
10421043
"language": "python",
10431044
"name": "python3"
10441045
},

0 commit comments

Comments
 (0)