UncountablePythonSDK 0.0.20__py3-none-any.whl → 0.0.21__py3-none-any.whl

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.

Potentially problematic release.


This version of UncountablePythonSDK might be problematic. Click here for more details.

Files changed (50) hide show
  1. {UncountablePythonSDK-0.0.20.dist-info → UncountablePythonSDK-0.0.21.dist-info}/METADATA +3 -1
  2. {UncountablePythonSDK-0.0.20.dist-info → UncountablePythonSDK-0.0.21.dist-info}/RECORD +50 -31
  3. examples/upload_files.py +19 -0
  4. pkgs/type_spec/actions_registry/__main__.py +35 -23
  5. pkgs/type_spec/actions_registry/emit_typescript.py +71 -9
  6. pkgs/type_spec/builder.py +13 -0
  7. pkgs/type_spec/config.py +1 -0
  8. pkgs/type_spec/emit_open_api.py +11 -0
  9. pkgs/type_spec/emit_open_api_util.py +1 -0
  10. pkgs/type_spec/emit_python.py +241 -55
  11. pkgs/type_spec/type_info/emit_type_info.py +129 -8
  12. type_spec/external/api/entity/create_entities.yaml +12 -1
  13. type_spec/external/api/entity/create_entity.yaml +12 -1
  14. type_spec/external/api/entity/transition_entity_phase.yaml +44 -0
  15. type_spec/external/api/permissions/set_core_permissions.yaml +69 -0
  16. type_spec/external/api/recipes/associate_recipe_as_input.yaml +4 -4
  17. type_spec/external/api/recipes/create_recipe.yaml +2 -1
  18. type_spec/external/api/recipes/disassociate_recipe_as_input.yaml +16 -0
  19. type_spec/external/api/recipes/edit_recipe_inputs.yaml +88 -0
  20. type_spec/external/api/recipes/get_curve.yaml +4 -1
  21. type_spec/external/api/recipes/get_recipes_data.yaml +6 -0
  22. type_spec/external/api/recipes/set_recipe_metadata.yaml +1 -0
  23. type_spec/external/api/recipes/set_recipe_tags.yaml +62 -0
  24. uncountable/core/__init__.py +2 -1
  25. uncountable/core/client.py +11 -9
  26. uncountable/core/file_upload.py +95 -0
  27. uncountable/core/types.py +22 -0
  28. uncountable/types/__init__.py +18 -0
  29. uncountable/types/api/entity/create_entities.py +1 -1
  30. uncountable/types/api/entity/create_entity.py +1 -1
  31. uncountable/types/api/entity/transition_entity_phase.py +66 -0
  32. uncountable/types/api/permissions/__init__.py +1 -0
  33. uncountable/types/api/permissions/set_core_permissions.py +89 -0
  34. uncountable/types/api/recipes/associate_recipe_as_input.py +4 -3
  35. uncountable/types/api/recipes/create_recipe.py +1 -1
  36. uncountable/types/api/recipes/disassociate_recipe_as_input.py +35 -0
  37. uncountable/types/api/recipes/edit_recipe_inputs.py +107 -0
  38. uncountable/types/api/recipes/get_curve.py +2 -1
  39. uncountable/types/api/recipes/get_recipes_data.py +2 -0
  40. uncountable/types/api/recipes/set_recipe_tags.py +91 -0
  41. uncountable/types/async_batch.py +9 -0
  42. uncountable/types/async_batch_processor.py +154 -0
  43. uncountable/types/client_base.py +113 -48
  44. uncountable/types/permissions.py +46 -0
  45. uncountable/types/post_base.py +30 -0
  46. uncountable/types/recipe_inputs.py +30 -0
  47. uncountable/types/recipe_metadata.py +2 -0
  48. uncountable/types/recipe_workflow_steps.py +77 -0
  49. {UncountablePythonSDK-0.0.20.dist-info → UncountablePythonSDK-0.0.21.dist-info}/WHEEL +0 -0
  50. {UncountablePythonSDK-0.0.20.dist-info → UncountablePythonSDK-0.0.21.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: UncountablePythonSDK
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: Uncountable SDK
5
5
  Project-URL: Homepage, https://github.com/uncountableinc/uncountable-python-sdk
6
6
  Project-URL: Repository, https://github.com/uncountableinc/uncountable-python-sdk.git
@@ -16,6 +16,8 @@ Classifier: Topic :: Utilities
16
16
  Classifier: Typing :: Typed
17
17
  Requires-Python: >=3.11
18
18
  Description-Content-Type: text/markdown
19
+ Requires-Dist: aiotus ==0.1.15
20
+ Requires-Dist: aiohttp ==3.9.5
19
21
  Requires-Dist: requests ==2.31.0
20
22
  Requires-Dist: SQLAlchemy ==1.4.52
21
23
  Requires-Dist: APScheduler ==3.10.4
@@ -15,6 +15,7 @@ docs/static/favicons/manifest.json,sha256=6q_3nZkcg_x0xut4eE-xpdeMY1TydwiZIcbXlL
15
15
  docs/static/favicons/mstile-150x150.png,sha256=eAK4QdEofhdLtfmjuPTpnX3MJqYnvGXsHYUjlcQekyY,1035
16
16
  docs/static/favicons/safari-pinned-tab.svg,sha256=S84fRnz0ZxLnQrKtmmFZytiRyu1xLtMR_RVy5jmwU7k,1926
17
17
  examples/create_entity.py,sha256=54AmZt83EpypxGcYZSIMmWlGz2oAgHFOsKuLSZOcHsI,625
18
+ examples/upload_files.py,sha256=ZsMChgOioraVHv207YREpivAOf4dq3IxGIBoROoDX_4,482
18
19
  examples/recipe-import/importer.py,sha256=baD71xuNibxDTe3bGHsMEIZEf9Xtb-IumBNpCEV0RZU,1134
19
20
  pkgs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
21
  pkgs/argument_parser/__init__.py,sha256=CsQ6QoPKSLLRVl-z6URAmPkiUL9ZPZoV4rJHgy_-RjA,385
@@ -33,12 +34,12 @@ pkgs/strenum_compat/__init__.py,sha256=wXRFeNvBm8RU6dy1PFJ5sRLgUIEeH_DVR95Sv5qpG
33
34
  pkgs/strenum_compat/strenum_compat.py,sha256=uOUAgpYTjHs1MX8dG81jRlyTkt3KNbkV_25zp7xTX2s,36
34
35
  pkgs/type_spec/__init__.py,sha256=h5DmJTca4QVV10sZR1x0-MlkZfuGYDfapR3zHvXfzto,19
35
36
  pkgs/type_spec/__main__.py,sha256=5bJaX9Y_-FavP0qwzhk-z-V97UY7uaezJTa1zhO_HHQ,1048
36
- pkgs/type_spec/builder.py,sha256=vzJdNkv5kqvbpho9Lb3JpcRyabxSIU7crTwulksAUFY,39127
37
- pkgs/type_spec/config.py,sha256=TOcXjq9Yp8nYXAVgGz_qOBjqsxQLAO5YqHIYiCpdkr4,4955
37
+ pkgs/type_spec/builder.py,sha256=W9VA7JhPkLw3lau3FjYlIiBGzRs5LBPTZr0tTO2KVuU,39570
38
+ pkgs/type_spec/config.py,sha256=INfEiDcUsZFUKasHprsE6i33siPB0RnfmTKOsWcGnQ8,5043
38
39
  pkgs/type_spec/emit_io_ts.py,sha256=gCEfS81w_ifqjLVJ3_cpy9Gq03o6H5nEsh35WAkqGGE,5606
39
- pkgs/type_spec/emit_open_api.py,sha256=dnGazdVBjdEWQ4WK8Ujq966quRZY2TyQ05PGR48Md2I,17461
40
- pkgs/type_spec/emit_open_api_util.py,sha256=xnzPOuPO8Pbhf6xf1tkHUKgXs1n-jH-lWFac8pOtd4I,1882
41
- pkgs/type_spec/emit_python.py,sha256=bJMiz_OEeTklFxEuBjDIg-E_g6vVKx30b-JKSudAi5g,36719
40
+ pkgs/type_spec/emit_open_api.py,sha256=4ihGO_neLL1A9zdoytQ5YypgBqyM0WKzBHo9wtsBPuE,17772
41
+ pkgs/type_spec/emit_open_api_util.py,sha256=gMUB-fSrnTp6NyK_HbY02SP6cqSRObo-KIojDu4rn44,1900
42
+ pkgs/type_spec/emit_python.py,sha256=CCHlOIMKdGu1VoaP7ly6dZ2cYank9jaAr8NDN50rFiE,42411
42
43
  pkgs/type_spec/emit_typescript.py,sha256=KOCcPuwSLRSt3pIp06Nq9exledq-kWtrA4RnUpeGMi8,17505
43
44
  pkgs/type_spec/emit_typescript_util.py,sha256=93FzJnpYse4PKFzgdw4DGV4zFTi5tF4WR-CIi7cW498,873
44
45
  pkgs/type_spec/load_types.py,sha256=AB334CF-368dpMNXE2QIFT7WxESvuew2RK_GG2MREng,2211
@@ -46,12 +47,12 @@ pkgs/type_spec/open_api_util.py,sha256=88zgI_lHi6SjCaNfKpoiCjd1o0Npysjk-7iCXw0a3
46
47
  pkgs/type_spec/test.py,sha256=4ueujBq-pEgnX3Z69HyPmD-bullFXmpixcpVzfOkhP4,489
47
48
  pkgs/type_spec/util.py,sha256=6m6MPfY-SwjyZf2FWQKclswWB5o7gcdd-3tdpViPYOQ,4844
48
49
  pkgs/type_spec/actions_registry/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- pkgs/type_spec/actions_registry/__main__.py,sha256=3VPSxW6MfnOXhsSGpsbeswdsLHHuD1nOt3IYuXkb6ME,3809
50
- pkgs/type_spec/actions_registry/emit_typescript.py,sha256=Tt-XQVaCHE1bQIGBYzzurdMqOZSUyrL4qttMyW7MYD4,4229
50
+ pkgs/type_spec/actions_registry/__main__.py,sha256=JGwKxcAmrQdbpVR2vwknoimN1Q-r5h4SADw1cYLYzgk,4331
51
+ pkgs/type_spec/actions_registry/emit_typescript.py,sha256=ben0W7qwaVCzLO-t3NEJPPNGEE_6sKLdJMuAh8aMBnw,6044
51
52
  pkgs/type_spec/parts/base.py.prepart,sha256=wGNoDyQnLolHRZGRwHQX5TrPfKnu558NXCocYvqyroc,2174
52
53
  pkgs/type_spec/parts/base.ts.prepart,sha256=2FJJvpg2olCcavxj0nbYWdwKl6KeScour2JjSvN42l8,1001
53
54
  pkgs/type_spec/type_info/__main__.py,sha256=pmVjVqXyVh8vKTNCTFgz80Sg74C5BKToP3E6GS-X_So,857
54
- pkgs/type_spec/type_info/emit_type_info.py,sha256=xWcZsgdEwApqqvtinZXyyBM61FZ9rmP9oybKapz8xN4,7692
55
+ pkgs/type_spec/type_info/emit_type_info.py,sha256=nk1pKa0drccGvzPKSpub3GVctsbu70reh3_yhhJzKAo,12052
55
56
  pkgs/type_spec/value_spec/__init__.py,sha256=Z-grlcZtxAfEXhPHsK0nD7PFLGsv4eqvunaPN7_TA84,83
56
57
  pkgs/type_spec/value_spec/__main__.py,sha256=-9L5pXYx02plnTetqNknaUZPieLRtzbyWdZDT6B-cWA,8294
57
58
  pkgs/type_spec/value_spec/convert_type.py,sha256=SAYyEV6orQJJbkXSE4hhtOQJ2vKUXJCKPeYPrB8G9oA,2272
@@ -60,12 +61,13 @@ pkgs/type_spec/value_spec/types.py,sha256=a2zxbbCRWepY1l8OtjeCDKgBKFPFHVgV99oP6p
60
61
  type_spec/external/api/batch/execute_batch.yaml,sha256=gpdSev3sLEC_cMVSZdj-9bc_XDFDqdPdOII9Ojme2N8,1170
61
62
  type_spec/external/api/batch/execute_batch_load_async.yaml,sha256=gcn51NWLiSvlytz8k3_pDOVJLCGfdivKJPG4I9Q8CZc,435
62
63
  type_spec/external/api/chemical/convert_chemical_formats.yaml,sha256=EidTxMCRs-ko5yMFDptJPyAEWYZVruP41OG3cwyBLQQ,1069
63
- type_spec/external/api/entity/create_entities.yaml,sha256=l24aCHcKD3rnCOIREL3B1th0NXUahSO-thWWBvTEx3Y,1144
64
- type_spec/external/api/entity/create_entity.yaml,sha256=BjnJC7U_RW063B4E2tg6aXXLpLredrtSHMBNnJobkxE,1339
64
+ type_spec/external/api/entity/create_entities.yaml,sha256=NVA7I1b4xf81urMKaiaiQPgvykEvjKslfOAN2gOhMIE,1441
65
+ type_spec/external/api/entity/create_entity.yaml,sha256=2itcDpiuZHckhn45ZJyrssMOS9_CgBwFGf-MQyUyImw,1636
65
66
  type_spec/external/api/entity/get_entities_data.yaml,sha256=3XujG7bOpuBQlfFrYtG3L4fBk7LsmdSekmP9iU0zjF0,796
66
67
  type_spec/external/api/entity/list_entities.yaml,sha256=H2YVv6il-XVKd_7IipZqauTDvWCrvHok7z47bDH2sI4,1798
67
68
  type_spec/external/api/entity/resolve_entity_ids.yaml,sha256=Zf3OhAohwLJO7wWj0e-sK5lhIsXlD8A5Bu3OGjY4-tA,732
68
69
  type_spec/external/api/entity/set_values.yaml,sha256=_UDxSk09Ke0KDABt8ldOScC2CLrbAhBPArZvno5iD4I,422
70
+ type_spec/external/api/entity/transition_entity_phase.yaml,sha256=2JyaP-5Kn75mnBMy58plJsbQnVH2ildcMWcy6nRD6yY,1013
69
71
  type_spec/external/api/id_source/list_id_source.yaml,sha256=BuobTXCJJLp-ogkhkLXluJPQCvUBQ7O2E7Z20Sm1BK8,1020
70
72
  type_spec/external/api/id_source/match_id_source.yaml,sha256=j4jDdmElYyY_ZLJQrx66ddy4JYV_9GMWQNi0G8SwY08,837
71
73
  type_spec/external/api/input_groups/get_input_group_names.yaml,sha256=LYgnm2Or7ZWCzDGjl53Y1PcHvej8G7Mpp5H96Z4UZCg,913
@@ -77,28 +79,34 @@ type_spec/external/api/inputs/set_input_attribute_values.yaml,sha256=RpOtVIWBlOp
77
79
  type_spec/external/api/outputs/get_output_data.yaml,sha256=ABaKme64kFCZ-A11AUM5ARQs0Pb9f71atWx-QMYFNZs,3485
78
80
  type_spec/external/api/outputs/get_output_names.yaml,sha256=IqEYCOHeyHIu45Lf37sfzn-o_0VFk0u_Bqsb0NKHPzw,1334
79
81
  type_spec/external/api/outputs/resolve_output_conditions.yaml,sha256=lGrG6XPGiQtHx24GccPcO18xxAoMynTSC_2WwxCjFrc,1640
82
+ type_spec/external/api/permissions/set_core_permissions.yaml,sha256=SDM_3FE-ur00dv6Na9HlaJBIvSPgnfqRieGDKnBR1UY,1632
80
83
  type_spec/external/api/project/get_projects.yaml,sha256=pQXGGPHenmFWYUuzEmZ-ORf0_d6lpQkTrXXMRrEqvDI,1676
81
84
  type_spec/external/api/project/get_projects_data.yaml,sha256=8xQoyL8HlAropfZPYYcQ-W4fO4yuqueAWTKxRzTXAa0,1981
82
85
  type_spec/external/api/recipe_links/create_recipe_link.yaml,sha256=7b2p7Ei4LnQXqccHsOVAfYyNK4WXm0n1IqxPG-qQDh0,941
83
86
  type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml,sha256=mJs82Ci8XSp2ng0W9MKqoeYwIjjgaVYmC5MWFmWFkR8,1759
84
- type_spec/external/api/recipes/associate_recipe_as_input.yaml,sha256=pX6XCiBlsCiGPHTLW3GP1FkB2NLnLBqZlp6W8hKuym4,486
87
+ type_spec/external/api/recipes/associate_recipe_as_input.yaml,sha256=7t0jto37RyLjl63-GK3mLC2uFiX1gd8vPwTwnobxkeI,654
85
88
  type_spec/external/api/recipes/associate_recipe_as_lot.yaml,sha256=8wzeJg5njt4qG2kavA6Jpo9PkWE6rIbuA4IPNdhcwEg,605
86
- type_spec/external/api/recipes/create_recipe.yaml,sha256=kORnb2yaShePpme259kXYkclQ7JLCxMStPZIMHK77CQ,1285
89
+ type_spec/external/api/recipes/create_recipe.yaml,sha256=mGLyKJI3pN_7nU4rcSqCO3WjuKhO_odZ2pewVgYcMUU,1322
87
90
  type_spec/external/api/recipes/create_recipes.yaml,sha256=eXMlXRpB5TFt1mUTECBa4aAIG3KrxYT2mJ5vxmZ9Q3A,1503
88
- type_spec/external/api/recipes/get_curve.yaml,sha256=QFRFst1EJ6T13G9R07kTiz-wvfxgDKbwHbmjgcvEaNc,568
91
+ type_spec/external/api/recipes/disassociate_recipe_as_input.yaml,sha256=qTKQCNBNwLnbr22DQVLA6b80BdBhwnDbX1c4KoCKUm8,477
92
+ type_spec/external/api/recipes/edit_recipe_inputs.yaml,sha256=CmolwyHSGJOQ33nJH7SQUYK-p2CWNEQ9yTstNxALv18,2631
93
+ type_spec/external/api/recipes/get_curve.yaml,sha256=zQpPwOYqojY-YwmTjbqoGtUxpYm3vne2sYpglWbPnpw,779
89
94
  type_spec/external/api/recipes/get_recipe_calculations.yaml,sha256=ZE7PzfWrjS7TiO4q7iyCwEj5In8GwO6fFIYGqUlTEXo,1240
90
95
  type_spec/external/api/recipes/get_recipe_links.yaml,sha256=Vwm0OVWl3VvDaI7chY_oZQqD8xZ1u09iFWKkZKn1ITo,766
91
96
  type_spec/external/api/recipes/get_recipe_names.yaml,sha256=4tqcVj-xLeEu0lhdm8NpLYmAvfkmq08GZ0Mr59I5nLI,896
92
97
  type_spec/external/api/recipes/get_recipe_output_metadata.yaml,sha256=YImW94JXVKR6Wz_7R7sRbhD9Ul51Ba-j-x9vJB__AAU,1216
93
- type_spec/external/api/recipes/get_recipes_data.yaml,sha256=3Mq0y8cX9SPFkr78Tj-wPf3BUzyd8g9ObOxp9mkkpXE,11283
98
+ type_spec/external/api/recipes/get_recipes_data.yaml,sha256=elCYKyxjw3Sbi66BuG92exn4gRPF6LagiSe1alAEOjo,11538
94
99
  type_spec/external/api/recipes/set_recipe_inputs.yaml,sha256=MvnHuzI9JKfkYZb-pC4jeE7FRpGeacJKXd5_GImsDiY,1747
95
- type_spec/external/api/recipes/set_recipe_metadata.yaml,sha256=XLVwhBSkhbomXYD4AboBEVQt4vBhibvjmWQsDFS10sc,543
100
+ type_spec/external/api/recipes/set_recipe_metadata.yaml,sha256=5N9AIY9x3pZhDXyzpM__e7pyKNTI2RS7OeBmwmj5nEs,585
96
101
  type_spec/external/api/recipes/set_recipe_outputs.yaml,sha256=Oe8XGYXbPNmrbEDXk3qucfS1L3P9TnXI5cxaNAl6x5A,1875
102
+ type_spec/external/api/recipes/set_recipe_tags.yaml,sha256=IrdkbryxZjNy8n4aMNLRTYbm27cRDfXxItk_kFgDaMM,1399
97
103
  type_spec/external/api/triggers/run_trigger.yaml,sha256=c8xDV3bQRjcRRDG4Y7kdQmMMu1fj3ae5eUi-Sdbsi54,405
98
104
  uncountable/__init__.py,sha256=281cC2hs8pbrD0jVKMol-tbWSh7Zcsc8oRT42dKteyE,102
99
105
  uncountable/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
100
- uncountable/core/__init__.py,sha256=GCXRRhhYv-yKzqKjAij7GcNiOr90BBbgdhhpusWtmUc,100
101
- uncountable/core/client.py,sha256=PWHdiUmLzwxZkw8Refh2ArFi-o4rADJyHSsJdNX7_N4,4113
106
+ uncountable/core/__init__.py,sha256=OYipeBMLl_Mk2LApzJqzvOWSyQ12tdOXURp1GsKSjyE,190
107
+ uncountable/core/client.py,sha256=ebBwERBKbdp7x5y77bFeyyGejIi02fjFZ4AMCJUfMpA,4507
108
+ uncountable/core/file_upload.py,sha256=zTpAFSd7_-TmEVWxOn1rDznyWE6_AdZyuDQC3LP34iI,2667
109
+ uncountable/core/types.py,sha256=gQtCw1-WSRak_ypFlGI1Ea9iZBP9zDeFq6XQtiXBlZA,459
102
110
  uncountable/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
103
111
  uncountable/integration/construct_client.py,sha256=r6M5pnIO0fKcjf5d_AREPtWZ6AkWgcjkdu_jHQEYlT8,1084
104
112
  uncountable/integration/cron.py,sha256=TIPqMPMSMtMJTu4aXwLf6QY-OLrpmyITLDp48UIr4Ok,919
@@ -110,12 +118,13 @@ uncountable/integration/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
110
118
  uncountable/integration/db/connect.py,sha256=iI9e8a2hfbFP-dvH0MGLsrG-RpM0dHKCL-oCLkah9hs,181
111
119
  uncountable/integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
120
  uncountable/integration/executors/script_executor.py,sha256=6oMPAFe0PUdqt76e8jMi4vXszGVsVHLULob7Qbl3o38,816
113
- uncountable/types/__init__.py,sha256=vN7ogAcLNJbeCkDjr0Y9R_4UAbjonBbDLWo3AZ9L5Mg,5213
114
- uncountable/types/async_batch.py,sha256=ukbVKXk8j1QMHqiaOpQdVmfwZSPZVmAYjFn4awBItyE,1253
121
+ uncountable/types/__init__.py,sha256=fTNNsvFFkjp4acdBA8eS00OZVnDo_Zn7aRwPs8SFnrs,6024
122
+ uncountable/types/async_batch.py,sha256=VMLB3ss1xzsFXovnWIaxgEVb4DWz7Agnf_MUNDaoRQc,1524
123
+ uncountable/types/async_batch_processor.py,sha256=fwzfk0XY0L1ulzNi3dT8Aky5MyWPNK6GDStZ_I8Icoc,5914
115
124
  uncountable/types/base.py,sha256=w3BRf8SAvYPlKrcJtJcQ_WhCU3A9zy0VuRTRWRFKVUA,2709
116
125
  uncountable/types/calculations.py,sha256=16J-KKMp-I8ZQUkYNmKCHfAn6DGb99cFinALcDIdGHY,562
117
126
  uncountable/types/chemical_structure.py,sha256=zQKl53DGtQQONIUHFXuwjWLQaG7FPZY7x6SBSOzkGV0,758
118
- uncountable/types/client_base.py,sha256=lkVyXgLrCfGh5eRc5glYCxamHl4yPqv3WRznOFFbOdQ,41267
127
+ uncountable/types/client_base.py,sha256=w-UnuzUSg8l_5kFhxo3w_b0_UC0eT-mtHheoA0f-U58,45967
119
128
  uncountable/types/curves.py,sha256=qYyRntMmFNonEwTrGhquMLbgMqjyP1moQflNTP0FMec,1308
120
129
  uncountable/types/entity.py,sha256=NjMZrqBwQ7sZe_oUuJqy9IEG7dWZmFMkQQXJ0_odcnA,11637
121
130
  uncountable/types/experiment_groups.py,sha256=ZBEk06F4n98Jz3oEA09WaDmw5rqPs7iVAm_Ysr4gc_o,599
@@ -126,12 +135,16 @@ uncountable/types/identifier.py,sha256=O_J3sHsG3pFeSIxUKmgIK97FZl6f4qkRDwsNLvY7y
126
135
  uncountable/types/input_attributes.py,sha256=u-JABoZ-Ij1Ynq5g6MxOgRdQeYbM7OnGP2q_N7KuVdw,826
127
136
  uncountable/types/inputs.py,sha256=q7fNGaSKIk3R6uXCEhSQpiHvXu82YcK3oZHDI7bxE88,1597
128
137
  uncountable/types/outputs.py,sha256=hSUlu41sisYKIZpPrj1G1DRfKm6hsKNcd1eNKFYb-4w,671
138
+ uncountable/types/permissions.py,sha256=VVLnukQ4RbApFdE0sgWDZxnrRCV6gOtXxq6yM5GxQlk,1620
129
139
  uncountable/types/phases.py,sha256=eaqwQlSRC2Ug7YFL0gqLbg3wDDHeRvBOhcABG7khW8c,550
140
+ uncountable/types/post_base.py,sha256=xLBoQAQouP1kKq7RNYt6XHLeCT-y-cJscR6HfPMdquU,765
130
141
  uncountable/types/recipe_identifiers.py,sha256=uJ_1xRSYa02AwGi0gxDHqoQoI0tu1KW5AzTAXwnr9Nc,1768
142
+ uncountable/types/recipe_inputs.py,sha256=OPEZUa1PUcQidcvRygHZguK199V7KfRF1IMwj3Vw9N4,741
131
143
  uncountable/types/recipe_links.py,sha256=RldSV7SdeBYa0bx02DzMg4jfPdgrlMRE40T16Fdy8u4,1406
132
- uncountable/types/recipe_metadata.py,sha256=NpRnz9QO2t21eTyf-M9_HBdQzcd55OgFM1dx6ZEg22w,1341
144
+ uncountable/types/recipe_metadata.py,sha256=cebGg_lJzqZzGnKnDgmuQFrw4Xhoz6HEiGM6G0az120,1437
133
145
  uncountable/types/recipe_output_metadata.py,sha256=XJA8R1r4NTzyR_DhMkmH4ZtYD-vqpvBMji9Be8OcFmo,613
134
146
  uncountable/types/recipe_tags.py,sha256=lYpksHAxXCcIjZKR7JoZOTH2cBSovwxZaHwjZy_yqiQ,581
147
+ uncountable/types/recipe_workflow_steps.py,sha256=bHVkwlsGODLpRFMJ2Ja-5FV1kqYjed8J0J0gU1dmTLQ,2615
135
148
  uncountable/types/response.py,sha256=ZI0CG7ZxBM2k5_W-6mNMU3UlB0p1i-0nrwOvsMaS-vU,620
136
149
  uncountable/types/units.py,sha256=_kZ7KkXIbRiY2fOdkTsbJBpWRah5TCC2WWiG05e-1DA,565
137
150
  uncountable/types/users.py,sha256=SUjNHBDcImKnnE7IN096Wfr1fmjNjCkQ7yQgKUPffz8,588
@@ -143,12 +156,13 @@ uncountable/types/api/batch/execute_batch_load_async.py,sha256=dcdGFibO8fUDpC__X
143
156
  uncountable/types/api/chemical/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
144
157
  uncountable/types/api/chemical/convert_chemical_formats.py,sha256=COGzkfpTL_Ermg2cbasoVKGAxDAtJaTFay18IZtrWCA,1305
145
158
  uncountable/types/api/entity/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
146
- uncountable/types/api/entity/create_entities.py,sha256=fJn6mgRfPjmt_fFd4IjsaxnXJtbP6fyxVSidprC3zxE,1550
147
- uncountable/types/api/entity/create_entity.py,sha256=KT-V2ePz-V1aPrKbkVhuR7tb0G2SfAn7ug6C3ZJCJAs,1720
159
+ uncountable/types/api/entity/create_entities.py,sha256=oZVBovL3pdBfoKpaOXJcPtUyDxjKgFnYEqKfGx_ZcvE,1649
160
+ uncountable/types/api/entity/create_entity.py,sha256=J6eY8b_XEQROFR7FI7In3zmFngaCBY5TcasMi4wy9t8,1819
148
161
  uncountable/types/api/entity/get_entities_data.py,sha256=XjrJGZucIn1TYUlDLRnRA0JTQw-vXHIAT-m0H9hk37A,1170
149
162
  uncountable/types/api/entity/list_entities.py,sha256=_bIIZJj3N0E6YiHgqzfCOKxD1fQW6biWJQMp5wIVbBw,1514
150
163
  uncountable/types/api/entity/resolve_entity_ids.py,sha256=AidGpPmI9ATDv0E7vd9LDOl3n3beGxUlRojh5uZrkl4,1086
151
164
  uncountable/types/api/entity/set_values.py,sha256=LcYrKQm5ItYLK1Vx7rRq5i6jkMLDhfEBhF0FD1GowQs,958
165
+ uncountable/types/api/entity/transition_entity_phase.py,sha256=kSRtj7aCReXnS1mWecd0W8N9aC_ahZZxdiQNC6taqF4,1803
152
166
  uncountable/types/api/id_source/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
153
167
  uncountable/types/api/id_source/list_id_source.py,sha256=S_NdAd1FIgMtCfpRK9bs4ZIJH7HdyHWImD1qiPuAKMg,1157
154
168
  uncountable/types/api/id_source/match_id_source.py,sha256=1Mlw0XGBw7UeWxmwelUEi7Co8Oy15jyhetfKG1BFpIM,1145
@@ -164,6 +178,8 @@ uncountable/types/api/outputs/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8
164
178
  uncountable/types/api/outputs/get_output_data.py,sha256=CpYlXNGWWNTiMgDPBRwucSseSrX4gnLuLIp2ljiONrI,2216
165
179
  uncountable/types/api/outputs/get_output_names.py,sha256=Id_ApombSzzFdq5rD4uOfWIKzthic6KBAeyqcrhsx18,1086
166
180
  uncountable/types/api/outputs/resolve_output_conditions.py,sha256=XZqUseXcGhApHmPm-2u7a37Y4blLRxoPoLhvYlBfCpI,1799
181
+ uncountable/types/api/permissions/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
182
+ uncountable/types/api/permissions/set_core_permissions.py,sha256=jn70a4sWf45cv1OPkrNb1UBSv4atifL-VTCZB8DK3zY,2550
167
183
  uncountable/types/api/project/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
168
184
  uncountable/types/api/project/get_projects.py,sha256=dMPq8CHxE4k1Vs42TmC4dp9b1jYp0TPlkICacAqrwXQ,1235
169
185
  uncountable/types/api/project/get_projects_data.py,sha256=HtUI5YN7S24v7o2VvNBWZkYFnGjFqJzBNoV0ojRx39E,1491
@@ -172,22 +188,25 @@ uncountable/types/api/recipe_links/create_recipe_link.py,sha256=1Ok6XMGFKBIPV-uR
172
188
  uncountable/types/api/recipe_metadata/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
173
189
  uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py,sha256=el6Pn5XqExX66ZEEHM8CHPxnyXSMZPdfdvLBz86sAVY,1267
174
190
  uncountable/types/api/recipes/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
175
- uncountable/types/api/recipes/associate_recipe_as_input.py,sha256=Mo-J2DgwZpbzjS-8pOBvX2VuRfGqnboJXMvFyIzwiPs,880
191
+ uncountable/types/api/recipes/associate_recipe_as_input.py,sha256=88a2lirEgrodyyE6og0oYtkGAWih2uJCZRmy45kTBow,976
176
192
  uncountable/types/api/recipes/associate_recipe_as_lot.py,sha256=bTYjbnY3B7GKz4MV4UGn7vPjaqMkAfUTio8872d4iws,955
177
- uncountable/types/api/recipes/create_recipe.py,sha256=L45JexXNo8iUxBI081lz6K1GGLFL3OSo-QPg1EejL-g,1340
193
+ uncountable/types/api/recipes/create_recipe.py,sha256=Ni00efkcPkQ3WTIgDHzkfu1qoc52ReV9VT0wwwPOT4g,1364
178
194
  uncountable/types/api/recipes/create_recipes.py,sha256=qwIYa8hfcjY7_VOFt9lxmVtJ-HOJqQN3GDNSbZsRCZU,1544
179
- uncountable/types/api/recipes/get_curve.py,sha256=lF8MDmBfxm_cIuDxhE80viSFNbcPEkgYkadNFeuI5e4,854
195
+ uncountable/types/api/recipes/disassociate_recipe_as_input.py,sha256=L25fpiK1Y5PByPVVgsZy9t4podz3xSSLIwKHj8CUrSg,913
196
+ uncountable/types/api/recipes/edit_recipe_inputs.py,sha256=Ae7YMUsONp1bUVdaznetWiw-THPndnzFI-t4iMWV_eg,3338
197
+ uncountable/types/api/recipes/get_curve.py,sha256=UIWfpqtU5sQokaxwYfQFNFl6HMyzWEF_Sjd8UMz0U88,939
180
198
  uncountable/types/api/recipes/get_recipe_calculations.py,sha256=eQmkdZzCEuq8S2f_kf_7GPvDLX1pTnY1CRmkK0SkMCI,1472
181
199
  uncountable/types/api/recipes/get_recipe_links.py,sha256=hk5dfQjv7yU2r-S9b8vwWEJLPHqU0-M6SFiTLMR3fVk,985
182
200
  uncountable/types/api/recipes/get_recipe_names.py,sha256=uCpXZq5oWjr9a_Vf-yYPaVS72XOlLHgAlju6KHeQ3UA,986
183
201
  uncountable/types/api/recipes/get_recipe_output_metadata.py,sha256=L9s2ykPP4pd02Pc98LDisY8bgV8CToS6t6fXKTWqGRw,1464
184
- uncountable/types/api/recipes/get_recipes_data.py,sha256=dOKokz6rJp3AiqNrF8rAZFlmJSs3ejdNIJhwKw0Utr0,5317
202
+ uncountable/types/api/recipes/get_recipes_data.py,sha256=wAmS28Nmc_tlP72XgrFMaj1y_yhvfgYbGw55wwERG_w,5388
185
203
  uncountable/types/api/recipes/set_recipe_inputs.py,sha256=lFVfv-o_O5wHuMZdH63qlG4exFTlJM078oSAtb3XNxA,1426
186
204
  uncountable/types/api/recipes/set_recipe_metadata.py,sha256=Ba6ttd1JuS_Ypt-KpckSviWtOcQ-OTdTEJiaSYyoQL8,933
187
205
  uncountable/types/api/recipes/set_recipe_outputs.py,sha256=QYq39TNchQ80ET1C77OE9fwhbu_HmIoEDmrQJHkkCu0,1609
206
+ uncountable/types/api/recipes/set_recipe_tags.py,sha256=U710hgq9-t6QZGRB-ZGHskpt4iXwYEjIRb67eh3P518,2453
188
207
  uncountable/types/api/triggers/__init__.py,sha256=gCgbynxG3jA8FQHzercKtrHKHkiIKr8APdZYUniAor8,55
189
208
  uncountable/types/api/triggers/run_trigger.py,sha256=9m9M8-nlGB_sAU2Qm2lWugp4h4Osqj6QpjNfU8osd1U,901
190
- UncountablePythonSDK-0.0.20.dist-info/METADATA,sha256=f4wrIC_HXVhzfDHlYgdFRiVdRwHtvNxie_Q91iYHhDU,1551
191
- UncountablePythonSDK-0.0.20.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
192
- UncountablePythonSDK-0.0.20.dist-info/top_level.txt,sha256=HaMiBnH1wA7SG9-RVHIJPBH3l8X5gee2jUf-77Nz-Dk,41
193
- UncountablePythonSDK-0.0.20.dist-info/RECORD,,
209
+ UncountablePythonSDK-0.0.21.dist-info/METADATA,sha256=_xqCDeMHkCp6YfUDs-Wr2wc7e2ErYtHzjA1f6YqcGfc,1613
210
+ UncountablePythonSDK-0.0.21.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
211
+ UncountablePythonSDK-0.0.21.dist-info/top_level.txt,sha256=HaMiBnH1wA7SG9-RVHIJPBH3l8X5gee2jUf-77Nz-Dk,41
212
+ UncountablePythonSDK-0.0.21.dist-info/RECORD,,
@@ -0,0 +1,19 @@
1
+ import os
2
+ from pprint import pprint
3
+
4
+ from uncountable import AuthDetailsApiKey, Client, MediaFileUpload
5
+
6
+ client = Client(
7
+ base_url="http://localhost:5000",
8
+ auth_details=AuthDetailsApiKey(
9
+ api_id=os.environ["UNC_API_ID"],
10
+ api_secret_key=os.environ["UNC_API_SECRET_KEY"],
11
+ ),
12
+ )
13
+ uploaded = client.upload_files(
14
+ file_uploads=[
15
+ MediaFileUpload(path="/my/file/path.doc"),
16
+ MediaFileUpload(path="/my/file/path2.doc"),
17
+ ]
18
+ )
19
+ pprint(uploaded)
@@ -14,7 +14,7 @@ from pkgs.type_spec import builder
14
14
  from ...argument_parser import CachedParser
15
15
  from ..emit_typescript_util import ts_name
16
16
  from ..util import rewrite_file
17
- from .emit_typescript import emit_action_definitions
17
+ from .emit_typescript import ActionDefinitionWithArgument, emit_action_definitions
18
18
 
19
19
  key_name = "name"
20
20
  key_icon = "icon"
@@ -61,11 +61,11 @@ def get_action_registry_files_info() -> list[ActionRegistryFileInfo]:
61
61
 
62
62
  def main() -> None:
63
63
  files_info = get_action_registry_files_info()
64
- action_definitions: defaultdict[str, list[actions_registry_t.ActionDefinition]] = (
64
+ action_definitions: defaultdict[str, list[ActionDefinitionWithArgument]] = (
65
65
  defaultdict(list)
66
66
  )
67
- all_action_definitions: list[actions_registry_t.ActionDefinition] = []
68
-
67
+ all_action_definitions: list[actions_registry_t.ActionDefinitionInternal] = []
68
+ action_definitions_with_arguments_list: list[ActionDefinitionWithArgument] = []
69
69
  for file_info in files_info:
70
70
  in_action_definitions = action_definition_parser.parse_yaml_file(
71
71
  file_info.filepath
@@ -79,29 +79,41 @@ def main() -> None:
79
79
  modules.append(file_info.filename)
80
80
 
81
81
  module_str = "_".join(modules)
82
- all_action_definitions.append(
83
- actions_registry_t.ActionDefinition(
84
- name=definition.name,
85
- short_description=definition.short_description,
86
- description=definition.description,
87
- icon=definition.icon,
82
+ action_definition = actions_registry_t.ActionDefinitionInternal(
83
+ name=definition.name,
84
+ short_description=definition.short_description,
85
+ description=definition.description,
86
+ icon=definition.icon,
87
+ ref_name=ref_name,
88
+ module=actions_registry_t.ActionsRegistryModule(
89
+ ts_name(module_str, name_case=builder.NameCase.convert)
90
+ ),
91
+ visibility_scope=[
92
+ actions_registry_t.ActionDefinitionVisibilityScope(item)
93
+ for item in definition.visibility_scope
94
+ ]
95
+ if definition.visibility_scope is not None
96
+ else None,
97
+ )
98
+ action_definitions_with_arguments_list.append(
99
+ ActionDefinitionWithArgument(
100
+ module=module_str,
88
101
  ref_name=ref_name,
89
- module=actions_registry_t.ActionsRegistryModule(
90
- ts_name(module_str, name_case=builder.NameCase.convert)
91
- ),
92
- visibility_scope=[
93
- actions_registry_t.ActionDefinitionVisibilityScope(item)
94
- for item in definition.visibility_scope
95
- ]
96
- if definition.visibility_scope is not None
97
- else None,
102
+ arguments=definition.arguments,
103
+ definition=action_definition,
98
104
  )
99
105
  )
100
- all_action_definitions = sorted(
101
- all_action_definitions, key=lambda item: (item.module, item.ref_name)
106
+ all_action_definitions.append(action_definition)
107
+ action_definitions_with_arguments_list = sorted(
108
+ action_definitions_with_arguments_list,
109
+ key=lambda item: (item.module, item.ref_name),
102
110
  )
103
- for action_definition in all_action_definitions:
104
- action_definitions[action_definition.module].append(action_definition)
111
+
112
+ for action_definition_with_argument in action_definitions_with_arguments_list:
113
+ action_definitions[action_definition_with_argument.module].append(
114
+ action_definition_with_argument
115
+ )
116
+
105
117
  ts_content = emit_action_definitions(action_definitions)
106
118
  rewrite_file(
107
119
  "main/site/js/materials/base/actions_registry/action_definitions.tsx",
@@ -1,17 +1,34 @@
1
1
  import io
2
2
  from collections import defaultdict
3
+ from dataclasses import dataclass
3
4
 
4
5
  from main.base.types import actions_registry_t
5
6
 
6
7
  from ...type_spec import builder
7
- from ..emit_typescript_util import INDENT, MODIFY_NOTICE, ts_name
8
+ from ..emit_typescript_util import (
9
+ INDENT,
10
+ MODIFY_NOTICE,
11
+ resolve_namespace_ref,
12
+ ts_name,
13
+ ts_type_name,
14
+ )
8
15
  from ..util import encode_common_string
9
16
 
10
17
 
11
- def _action_symbol_name(action_definition: actions_registry_t.ActionDefinition) -> str:
18
+ def _action_symbol_name(
19
+ action_definition: actions_registry_t.ActionDefinitionInternal,
20
+ ) -> str:
12
21
  return f"{ts_name(action_definition.ref_name, name_case=builder.NameCase.convert)}"
13
22
 
14
23
 
24
+ def _action_type_name(ref_name: str) -> str:
25
+ return f"{ts_type_name(ref_name)}"
26
+
27
+
28
+ def _action_namespace_name(name: str) -> str:
29
+ return f"{resolve_namespace_ref(builder.SpecNamespace(name=name))}"
30
+
31
+
15
32
  def _action_module_name_base(module: str) -> str:
16
33
  return f"{ts_name(module, name_case=builder.NameCase.convert)}"
17
34
 
@@ -24,24 +41,54 @@ def _action_module_name(module: str) -> str:
24
41
  return f"ActionsRegistryT.ActionsRegistryModule.{_action_module_name_base(module)}"
25
42
 
26
43
 
44
+ @dataclass(kw_only=True)
45
+ class ActionDefinitionWithArgument:
46
+ module: str
47
+ ref_name: str
48
+ arguments: str | None
49
+ definition: actions_registry_t.ActionDefinitionInternal
50
+
51
+
52
+ def _emit_imports(
53
+ action_definitions: defaultdict[str, list[ActionDefinitionWithArgument]],
54
+ ) -> str:
55
+ out = io.StringIO()
56
+ namespaces = set()
57
+ for definitions in action_definitions.values():
58
+ for definition in definitions:
59
+ if definition.arguments is not None:
60
+ argument_parts = definition.arguments.split(".")
61
+ namespace = argument_parts[0]
62
+ namespaces.add(namespace)
63
+ namespaces_to_import = ", ".join(
64
+ sorted([f"type {_action_namespace_name(item)}" for item in list(namespaces)])
65
+ )
66
+ out.write(
67
+ f'import {{ ActionsRegistryT, {namespaces_to_import} }} from "unc_mat/types"\n\n'
68
+ )
69
+ out.write(MODIFY_NOTICE)
70
+ return out.getvalue()
71
+
72
+
27
73
  def emit_action_definitions(
28
- action_definitions: defaultdict[str, list[actions_registry_t.ActionDefinition]],
74
+ action_definitions: defaultdict[str, list[ActionDefinitionWithArgument]],
29
75
  ) -> str:
30
76
  out = io.StringIO()
31
77
  out.write(MODIFY_NOTICE)
32
78
  out.write("\n")
33
- out.write('import { ActionsRegistryT } from "unc_mat/types"\n\n')
34
- out.write(MODIFY_NOTICE)
79
+ out.write(_emit_imports(action_definitions))
35
80
  modules = []
36
81
  for key, values in action_definitions.items():
37
82
  out.write(MODIFY_NOTICE)
38
83
  modules.append(key)
39
84
  out.write(f"export const {_action_module_name_obj(key)} = {{\n")
40
- for action_definition in values:
85
+ for item in values:
41
86
  out.write(MODIFY_NOTICE)
42
- out.write(_emit_action_definition(action_definition, INDENT))
87
+ out.write(_emit_action_definition(item.definition, item.arguments, INDENT))
43
88
  out.write("}\n")
44
89
 
90
+ out.write(MODIFY_NOTICE)
91
+ out.write("\n")
45
92
  out.write(MODIFY_NOTICE)
46
93
  out.write("\n")
47
94
  out.write("export const actionDefinitions = {\n")
@@ -58,12 +105,27 @@ def emit_action_definitions(
58
105
  return out.getvalue()
59
106
 
60
107
 
108
+ def _get_argument_type(arguments: str | None) -> str | None:
109
+ if arguments is None:
110
+ return None
111
+ argument_parts = arguments.split(".")
112
+ namespace = argument_parts[0]
113
+ type_name = argument_parts[1]
114
+ if namespace is not None and type_name is not None:
115
+ return f"{_action_namespace_name(namespace)}.{type_name}"
116
+ return None
117
+
118
+
61
119
  def _emit_action_definition(
62
- action_definition: actions_registry_t.ActionDefinition, indent: str
120
+ action_definition: actions_registry_t.ActionDefinitionInternal,
121
+ arguments: str | None,
122
+ indent: str,
63
123
  ) -> str:
64
124
  out = io.StringIO()
65
125
 
66
126
  sub_indent = indent + INDENT
127
+ argument_type = _get_argument_type(arguments)
128
+ argument_type = f"<{argument_type}>" if argument_type is not None else ""
67
129
  out.write(f"{indent}{_action_symbol_name(action_definition)}: {{\n")
68
130
  out.write(f"{sub_indent}name: {encode_common_string(action_definition.name)},\n")
69
131
  if action_definition.icon is not None:
@@ -85,7 +147,7 @@ def _emit_action_definition(
85
147
  out.write(
86
148
  f"{sub_indent}visibilityScope: {_emit_visibility_scope(action_definition.visibility_scope)},\n"
87
149
  )
88
- out.write(f"{indent}}},\n")
150
+ out.write(f"{indent}}} as ActionsRegistryT.ActionDefinition{argument_type},\n")
89
151
  return out.getvalue()
90
152
 
91
153
 
pkgs/type_spec/builder.py CHANGED
@@ -680,9 +680,11 @@ class SpecEndpoint:
680
680
  path_basename: str
681
681
  data_loader: bool
682
682
  is_sdk: bool
683
+ is_beta: bool
683
684
  # Don't emit TypeScript endpoint code
684
685
  suppress_ts: bool
685
686
  function: Optional[str]
687
+ async_batch_path: str | None = None
686
688
  result_type: ResultType = ResultType.json
687
689
  has_attachment: bool = False
688
690
  desc: str | None = None
@@ -701,6 +703,8 @@ class SpecEndpoint:
701
703
  "path",
702
704
  "data_loader",
703
705
  "is_sdk",
706
+ "is_beta",
707
+ "async_batch_path",
704
708
  "function",
705
709
  "suppress_ts",
706
710
  "desc",
@@ -727,6 +731,15 @@ class SpecEndpoint:
727
731
  assert isinstance(is_sdk, bool)
728
732
  self.is_sdk = is_sdk
729
733
 
734
+ is_beta = data.get("is_beta", False)
735
+ assert isinstance(is_beta, bool)
736
+ self.is_beta = is_beta
737
+
738
+ async_batch_path = data.get("async_batch_path")
739
+ if async_batch_path is not None:
740
+ assert isinstance(async_batch_path, str)
741
+ self.async_batch_path = async_batch_path
742
+
730
743
  self.function = data.get("function")
731
744
 
732
745
  suppress_ts = data.get("suppress_ts", False)
pkgs/type_spec/config.py CHANGED
@@ -56,6 +56,7 @@ class PythonConfig(BaseLanguageConfig):
56
56
  emit_api_argument_lookup: bool = (
57
57
  False # emit a lookup for api endpoint path to argument type.
58
58
  )
59
+ emit_async_batch_processor: bool = False # emit the async batch wrapping functions
59
60
  emit_client_class: bool = False # emit the base class for the api client
60
61
  all_named_type_exports: bool = False # emit __all__ for all named type exports
61
62
  sdk_endpoints_only: bool = False # only emit is_sdk endpoints
@@ -99,6 +99,9 @@ def emit_open_api(builder: builder.SpecBuilder, *, config: OpenAPIConfig) -> Non
99
99
  for namespace in sorted(builder.namespaces.values(), key=lambda ns: ns.name):
100
100
  ctx = EmitOpenAPIContext(namespace=namespace)
101
101
 
102
+ if ctx.namespace.endpoint is not None and ctx.namespace.endpoint.is_beta:
103
+ continue
104
+
102
105
  if ctx.namespace.name == "base":
103
106
  # TODO: add additional base defintions here
104
107
  ctx.types["ObjectId"] = OpenAPIIntegerT()
@@ -153,6 +156,12 @@ def _emit_endpoint_parameters(typ: OpenAPIType | None) -> dict[str, list[dict[st
153
156
  }
154
157
 
155
158
 
159
+ def _emit_is_beta(is_beta: bool) -> dict[str, bool]:
160
+ if is_beta:
161
+ return {"x-beta": True}
162
+ return {}
163
+
164
+
156
165
  def _emit_namespace(
157
166
  gctx: EmitOpenAPIGlobalContext,
158
167
  ctx: EmitOpenAPIContext,
@@ -179,6 +188,7 @@ def _emit_namespace(
179
188
  "summary": endpoint.summary,
180
189
  "description": endpoint.description,
181
190
  }
191
+ | _emit_is_beta(endpoint.is_beta)
182
192
  | _emit_endpoint_parameters(argument_type)
183
193
  | {
184
194
  "responses": {
@@ -386,6 +396,7 @@ def _emit_endpoint(
386
396
  tags=[tag_name],
387
397
  summary=f"{'/'.join(namespace.path[path_cutoff:])}",
388
398
  description=description,
399
+ is_beta=namespace.endpoint.is_beta,
389
400
  )
390
401
 
391
402
 
@@ -62,6 +62,7 @@ class EmitOpenAPIEndpoint:
62
62
  tags: list[str]
63
63
  summary: str
64
64
  description: str
65
+ is_beta: bool
65
66
 
66
67
 
67
68
  @dataclass