UncountablePythonSDK 0.0.41__py3-none-any.whl → 0.0.43__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 (123) hide show
  1. {UncountablePythonSDK-0.0.41.dist-info → UncountablePythonSDK-0.0.43.dist-info}/METADATA +5 -1
  2. {UncountablePythonSDK-0.0.41.dist-info → UncountablePythonSDK-0.0.43.dist-info}/RECORD +122 -104
  3. docs/requirements.txt +3 -3
  4. examples/invoke_uploader.py +23 -0
  5. pkgs/argument_parser/argument_parser.py +1 -1
  6. pkgs/filesystem_utils/__init__.py +17 -0
  7. pkgs/filesystem_utils/_gdrive_session.py +306 -0
  8. pkgs/filesystem_utils/_local_session.py +69 -0
  9. pkgs/filesystem_utils/_sftp_session.py +147 -0
  10. pkgs/filesystem_utils/file_type_utils.py +61 -0
  11. pkgs/filesystem_utils/filesystem_session.py +39 -0
  12. pkgs/type_spec/emit_open_api.py +4 -2
  13. pkgs/type_spec/emit_open_api_util.py +4 -2
  14. pkgs/type_spec/emit_python.py +13 -14
  15. uncountable/core/file_upload.py +13 -3
  16. uncountable/integration/construct_client.py +1 -1
  17. uncountable/integration/cron.py +9 -6
  18. uncountable/integration/entrypoint.py +1 -1
  19. uncountable/integration/executors/executors.py +24 -0
  20. uncountable/integration/executors/generic_upload_executor.py +244 -0
  21. uncountable/integration/executors/script_executor.py +1 -1
  22. uncountable/integration/job.py +18 -1
  23. uncountable/integration/secret_retrieval/__init__.py +3 -0
  24. uncountable/integration/secret_retrieval/retrieve_secret.py +40 -0
  25. uncountable/integration/server.py +1 -1
  26. uncountable/types/__init__.py +8 -0
  27. uncountable/types/api/batch/execute_batch.py +5 -5
  28. uncountable/types/api/batch/execute_batch_load_async.py +3 -3
  29. uncountable/types/api/chemical/convert_chemical_formats.py +4 -4
  30. uncountable/types/api/entity/create_entities.py +4 -4
  31. uncountable/types/api/entity/create_entity.py +4 -4
  32. uncountable/types/api/entity/get_entities_data.py +4 -4
  33. uncountable/types/api/entity/list_entities.py +5 -5
  34. uncountable/types/api/entity/lock_entity.py +3 -3
  35. uncountable/types/api/entity/resolve_entity_ids.py +4 -4
  36. uncountable/types/api/entity/set_values.py +3 -3
  37. uncountable/types/api/entity/transition_entity_phase.py +5 -5
  38. uncountable/types/api/entity/unlock_entity.py +3 -3
  39. uncountable/types/api/equipment/associate_equipment_input.py +3 -3
  40. uncountable/types/api/field_options/upsert_field_options.py +4 -4
  41. uncountable/types/api/id_source/list_id_source.py +4 -4
  42. uncountable/types/api/id_source/match_id_source.py +4 -4
  43. uncountable/types/api/input_groups/get_input_group_names.py +4 -4
  44. uncountable/types/api/inputs/create_inputs.py +5 -5
  45. uncountable/types/api/inputs/get_input_data.py +7 -7
  46. uncountable/types/api/inputs/get_input_names.py +4 -4
  47. uncountable/types/api/inputs/get_inputs_data.py +7 -7
  48. uncountable/types/api/inputs/set_input_attribute_values.py +4 -4
  49. uncountable/types/api/inputs/set_input_category.py +3 -3
  50. uncountable/types/api/inputs/set_input_subcategories.py +3 -3
  51. uncountable/types/api/inputs/set_intermediate_type.py +3 -3
  52. uncountable/types/api/material_families/update_entity_material_families.py +3 -3
  53. uncountable/types/api/outputs/get_output_data.py +7 -7
  54. uncountable/types/api/outputs/get_output_names.py +4 -4
  55. uncountable/types/api/outputs/resolve_output_conditions.py +6 -6
  56. uncountable/types/api/permissions/set_core_permissions.py +7 -7
  57. uncountable/types/api/project/get_projects.py +4 -4
  58. uncountable/types/api/project/get_projects_data.py +4 -4
  59. uncountable/types/api/recipe_links/create_recipe_link.py +3 -3
  60. uncountable/types/api/recipe_links/remove_recipe_link.py +3 -3
  61. uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +4 -4
  62. uncountable/types/api/recipes/add_recipe_to_project.py +3 -3
  63. uncountable/types/api/recipes/archive_recipes.py +3 -3
  64. uncountable/types/api/recipes/associate_recipe_as_input.py +3 -3
  65. uncountable/types/api/recipes/associate_recipe_as_lot.py +3 -3
  66. uncountable/types/api/recipes/create_recipe.py +3 -3
  67. uncountable/types/api/recipes/create_recipes.py +5 -5
  68. uncountable/types/api/recipes/disassociate_recipe_as_input.py +3 -3
  69. uncountable/types/api/recipes/edit_recipe_inputs.py +12 -12
  70. uncountable/types/api/recipes/get_curve.py +3 -3
  71. uncountable/types/api/recipes/get_recipe_calculations.py +4 -4
  72. uncountable/types/api/recipes/get_recipe_links.py +3 -3
  73. uncountable/types/api/recipes/get_recipe_names.py +4 -4
  74. uncountable/types/api/recipes/get_recipe_output_metadata.py +4 -4
  75. uncountable/types/api/recipes/get_recipes_data.py +12 -12
  76. uncountable/types/api/recipes/lock_recipes.py +4 -4
  77. uncountable/types/api/recipes/remove_recipe_from_project.py +3 -3
  78. uncountable/types/api/recipes/set_recipe_inputs.py +4 -4
  79. uncountable/types/api/recipes/set_recipe_metadata.py +3 -3
  80. uncountable/types/api/recipes/set_recipe_output_annotations.py +7 -7
  81. uncountable/types/api/recipes/set_recipe_outputs.py +5 -5
  82. uncountable/types/api/recipes/set_recipe_tags.py +7 -7
  83. uncountable/types/api/recipes/unarchive_recipes.py +3 -3
  84. uncountable/types/api/recipes/unlock_recipes.py +3 -3
  85. uncountable/types/api/triggers/run_trigger.py +3 -3
  86. uncountable/types/api/uploader/__init__.py +1 -0
  87. uncountable/types/api/uploader/invoke_uploader.py +38 -0
  88. uncountable/types/async_batch_processor.py +36 -0
  89. uncountable/types/async_batch_t.py +6 -4
  90. uncountable/types/calculations_t.py +2 -2
  91. uncountable/types/chemical_structure_t.py +2 -2
  92. uncountable/types/client_base.py +25 -2
  93. uncountable/types/curves_t.py +3 -3
  94. uncountable/types/entity_t.py +2 -2
  95. uncountable/types/experiment_groups_t.py +2 -2
  96. uncountable/types/field_values_t.py +5 -5
  97. uncountable/types/fields_t.py +2 -2
  98. uncountable/types/generic_upload.py +9 -0
  99. uncountable/types/generic_upload_t.py +41 -0
  100. uncountable/types/id_source_t.py +5 -5
  101. uncountable/types/identifier_t.py +4 -4
  102. uncountable/types/input_attributes_t.py +2 -2
  103. uncountable/types/inputs_t.py +2 -2
  104. uncountable/types/job_definition.py +26 -0
  105. uncountable/types/job_definition_t.py +203 -0
  106. uncountable/types/outputs_t.py +2 -2
  107. uncountable/types/phases_t.py +2 -2
  108. uncountable/types/recipe_identifiers_t.py +4 -4
  109. uncountable/types/recipe_links_t.py +2 -2
  110. uncountable/types/recipe_metadata_t.py +4 -4
  111. uncountable/types/recipe_output_metadata_t.py +2 -2
  112. uncountable/types/recipe_tags_t.py +2 -2
  113. uncountable/types/recipe_workflow_steps_t.py +5 -5
  114. uncountable/types/recipes_t.py +2 -2
  115. uncountable/types/response_t.py +2 -2
  116. uncountable/types/secret_retrieval.py +12 -0
  117. uncountable/types/secret_retrieval_t.py +69 -0
  118. uncountable/types/units_t.py +2 -2
  119. uncountable/types/users_t.py +2 -2
  120. uncountable/types/workflows_t.py +3 -3
  121. uncountable/integration/types.py +0 -89
  122. {UncountablePythonSDK-0.0.41.dist-info → UncountablePythonSDK-0.0.43.dist-info}/WHEEL +0 -0
  123. {UncountablePythonSDK-0.0.41.dist-info → UncountablePythonSDK-0.0.43.dist-info}/top_level.txt +0 -0
@@ -1,89 +0,0 @@
1
- # TODO: move to type spec
2
-
3
-
4
- from dataclasses import dataclass
5
- from enum import StrEnum
6
- from typing import Literal
7
-
8
-
9
- class JobDefinitionType(StrEnum):
10
- CRON = "cron"
11
- # also imagine other job types like webhook-triggered or sftp-triggered,
12
- # manual, etc
13
-
14
-
15
- class JobExecutorType(StrEnum):
16
- SCRIPT = "script"
17
- # also imagine builtin executors like 'sftp_sync'
18
-
19
-
20
- class AuthRetrievalType(StrEnum):
21
- ENV = "env"
22
- # also imagine secrets manager, keyvault, etc
23
-
24
-
25
- @dataclass
26
- class JobExecutorBase:
27
- type: JobExecutorType
28
-
29
-
30
- @dataclass
31
- class JobExecutorScript(JobExecutorBase):
32
- type: Literal[JobExecutorType.SCRIPT]
33
- import_path: str
34
-
35
-
36
- JobExecutor = JobExecutorScript
37
-
38
-
39
- @dataclass
40
- class JobDefinitionBase:
41
- id: str
42
- name: str
43
-
44
-
45
- @dataclass
46
- class CronJobDefinition(JobDefinitionBase):
47
- type: Literal[JobDefinitionType.CRON]
48
- cron_spec: str
49
- # Here we assert that the executor has to be a script, but we could add
50
- # other builtin executor types that cron jobs can support later
51
- executor: JobExecutorScript
52
-
53
-
54
- JobDefinition = CronJobDefinition
55
-
56
-
57
- @dataclass
58
- class AuthRetrievalBase:
59
- type: AuthRetrievalType
60
-
61
-
62
- @dataclass
63
- class AuthRetrievalEnv:
64
- # We don't really need any extra info here, we can enforce that the auth
65
- # keys are named like UNC_PROFILE_{profile name}_API_SECRET_KEY. For
66
- # supporting pulling secrets from secrets manager etc it will be nice to
67
- # use dataclass properties to get the secret name, region etc.
68
- type: Literal[AuthRetrievalType.ENV]
69
-
70
-
71
- AuthRetrieval = AuthRetrievalEnv
72
-
73
-
74
- @dataclass
75
- class ProfileDefinition:
76
- # profile name (expected to be something like customer_name) will be
77
- # obtained from the folder name instead of specified here. Forces jobs to
78
- # be organized nicely in folders that separate their identities.
79
- auth_retrieval: AuthRetrieval
80
- base_url: str
81
- jobs: list[JobDefinition]
82
-
83
-
84
- @dataclass
85
- class ProfileMetadata:
86
- # supplied by inspecting the folder name that the profile is in
87
- name: str
88
- base_url: str
89
- auth_retrieval: AuthRetrieval