UncountablePythonSDK 0.0.17__tar.gz → 0.0.18__tar.gz
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.
- {uncountablepythonsdk-0.0.17/UncountablePythonSDK.egg-info → uncountablepythonsdk-0.0.18}/PKG-INFO +1 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18/UncountablePythonSDK.egg-info}/PKG-INFO +1 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/UncountablePythonSDK.egg-info/SOURCES.txt +12 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/argument_parser/_is_enum.py +1 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/argument_parser/argument_parser.py +13 -13
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization/serial_class.py +3 -3
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization_util/_get_type_for_serialization.py +1 -3
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization_util/serialization_helpers.py +1 -3
- uncountablepythonsdk-0.0.18/pkgs/strenum_compat/strenum_compat.py +1 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/actions_registry/__main__.py +9 -3
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/actions_registry/emit_typescript.py +20 -6
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/builder.py +10 -10
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/config.py +3 -2
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_python.py +19 -16
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_typescript.py +2 -2
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_typescript_util.py +1 -2
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/load_types.py +2 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/open_api_util.py +2 -2
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/parts/base.py.prepart +2 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/util.py +9 -9
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/value_spec/__main__.py +2 -2
- uncountablepythonsdk-0.0.18/type_spec/external/api/batch/execute_batch_load_async.yaml +18 -0
- uncountablepythonsdk-0.0.18/type_spec/external/api/id_source/list_id_source.yaml +35 -0
- uncountablepythonsdk-0.0.18/type_spec/external/api/id_source/match_id_source.yaml +32 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/create_recipe.yaml +3 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/get_recipes_data.yaml +21 -21
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/set_recipe_inputs.yaml +3 -0
- uncountablepythonsdk-0.0.18/type_spec/external/api/triggers/run_trigger.yaml +18 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/__init__.py +10 -0
- uncountablepythonsdk-0.0.18/uncountable/types/api/batch/execute_batch_load_async.py +35 -0
- uncountablepythonsdk-0.0.18/uncountable/types/api/id_source/list_id_source.py +46 -0
- uncountablepythonsdk-0.0.18/uncountable/types/api/id_source/match_id_source.py +48 -0
- uncountablepythonsdk-0.0.18/uncountable/types/api/recipes/__init__.py +1 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/create_recipe.py +2 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/set_recipe_inputs.py +1 -0
- uncountablepythonsdk-0.0.18/uncountable/types/api/triggers/__init__.py +1 -0
- uncountablepythonsdk-0.0.18/uncountable/types/api/triggers/run_trigger.py +36 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/async_batch.py +22 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/base.py +2 -1
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/client_base.py +102 -1
- uncountablepythonsdk-0.0.18/uncountable/types/id_source.py +49 -0
- uncountablepythonsdk-0.0.17/pkgs/strenum_compat/strenum_compat.py +0 -9
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/.github/workflows/documentation.yml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/.github/workflows/publish.yml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/.gitignore +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/README.md +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/UncountablePythonSDK.egg-info/dependency_links.txt +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/UncountablePythonSDK.egg-info/requires.txt +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/UncountablePythonSDK.egg-info/top_level.txt +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/.gitignore +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/conf.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/index.md +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/justfile +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/quickstart.md +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/requirements.txt +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/android-chrome-192x192.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/android-chrome-512x512.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/apple-touch-icon.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/browserconfig.xml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/favicon-16x16.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/favicon-32x32.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/manifest.json +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/mstile-150x150.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/favicons/safari-pinned-tab.svg +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/docs/static/logo_blue.png +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/examples/create_entity.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/examples/recipe-import/importer.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/argument_parser/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/argument_parser/_is_namedtuple.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/argument_parser/case_convert.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization/missing_sentry.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization/opaque_key.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization_util/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/strenum_compat/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/__main__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/actions_registry/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_io_ts.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_open_api.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_open_api_util.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/parts/base.ts.prepart +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/test.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/type_info/__main__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/type_info/emit_type_info.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/value_spec/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/value_spec/convert_type.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/value_spec/emit_python.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/value_spec/types.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pyproject.toml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/setup.cfg +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/batch/execute_batch.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/chemical/convert_chemical_formats.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/entity/create_entities.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/entity/create_entity.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/entity/get_entities_data.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/entity/list_entities.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/entity/resolve_entity_ids.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/entity/set_values.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/input_groups/get_input_group_names.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/inputs/create_inputs.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/inputs/get_input_data.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/inputs/get_input_names.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/inputs/get_inputs_data.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/inputs/set_input_attribute_values.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/outputs/get_output_data.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/outputs/get_output_names.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/outputs/resolve_output_conditions.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/project/get_projects.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/project/get_projects_data.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipe_links/create_recipe_link.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipe_metadata/get_recipe_metadata_data.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/associate_recipe_as_input.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/associate_recipe_as_lot.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/create_recipes.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/get_curve.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/get_recipe_calculations.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/get_recipe_links.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/get_recipe_names.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/get_recipe_output_metadata.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/set_recipe_metadata.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/type_spec/external/api/recipes/set_recipe_outputs.yaml +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/core/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/core/client.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/construct_client.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/cron.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/db/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/db/connect.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/entrypoint.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/executors/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/executors/script_executor.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/job.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/server.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/integration/types.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/py.typed +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/batch/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/batch/execute_batch.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/chemical/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/chemical/convert_chemical_formats.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/create_entities.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/create_entity.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/get_entities_data.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/list_entities.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/resolve_entity_ids.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/entity/set_values.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/input_groups → uncountablepythonsdk-0.0.18/uncountable/types/api/id_source}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/inputs → uncountablepythonsdk-0.0.18/uncountable/types/api/input_groups}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/input_groups/get_input_group_names.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/outputs → uncountablepythonsdk-0.0.18/uncountable/types/api/inputs}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/inputs/create_inputs.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/inputs/get_input_data.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/inputs/get_input_names.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/inputs/get_inputs_data.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/inputs/set_input_attribute_values.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/project → uncountablepythonsdk-0.0.18/uncountable/types/api/outputs}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/outputs/get_output_data.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/outputs/get_output_names.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/outputs/resolve_output_conditions.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/recipe_links → uncountablepythonsdk-0.0.18/uncountable/types/api/project}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/project/get_projects.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/project/get_projects_data.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/recipe_metadata → uncountablepythonsdk-0.0.18/uncountable/types/api/recipe_links}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipe_links/create_recipe_link.py +0 -0
- {uncountablepythonsdk-0.0.17/uncountable/types/api/recipes → uncountablepythonsdk-0.0.18/uncountable/types/api/recipe_metadata}/__init__.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipe_metadata/get_recipe_metadata_data.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/associate_recipe_as_input.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/associate_recipe_as_lot.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/create_recipes.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/get_curve.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/get_recipe_calculations.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/get_recipe_links.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/get_recipe_names.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/get_recipe_output_metadata.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/get_recipes_data.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/set_recipe_metadata.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/api/recipes/set_recipe_outputs.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/calculations.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/chemical_structure.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/curves.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/entity.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/experiment_groups.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/field_values.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/fields.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/identifier.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/input_attributes.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/inputs.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/outputs.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/phases.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/recipe_identifiers.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/recipe_links.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/recipe_metadata.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/recipe_output_metadata.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/recipe_tags.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/response.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/units.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/users.py +0 -0
- {uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/uncountable/types/workflows.py +0 -0
{uncountablepythonsdk-0.0.17/UncountablePythonSDK.egg-info → uncountablepythonsdk-0.0.18}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.18
|
|
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
|
{uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18/UncountablePythonSDK.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: UncountablePythonSDK
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.18
|
|
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
|
|
@@ -68,6 +68,7 @@ pkgs/type_spec/value_spec/convert_type.py
|
|
|
68
68
|
pkgs/type_spec/value_spec/emit_python.py
|
|
69
69
|
pkgs/type_spec/value_spec/types.py
|
|
70
70
|
type_spec/external/api/batch/execute_batch.yaml
|
|
71
|
+
type_spec/external/api/batch/execute_batch_load_async.yaml
|
|
71
72
|
type_spec/external/api/chemical/convert_chemical_formats.yaml
|
|
72
73
|
type_spec/external/api/entity/create_entities.yaml
|
|
73
74
|
type_spec/external/api/entity/create_entity.yaml
|
|
@@ -75,6 +76,8 @@ type_spec/external/api/entity/get_entities_data.yaml
|
|
|
75
76
|
type_spec/external/api/entity/list_entities.yaml
|
|
76
77
|
type_spec/external/api/entity/resolve_entity_ids.yaml
|
|
77
78
|
type_spec/external/api/entity/set_values.yaml
|
|
79
|
+
type_spec/external/api/id_source/list_id_source.yaml
|
|
80
|
+
type_spec/external/api/id_source/match_id_source.yaml
|
|
78
81
|
type_spec/external/api/input_groups/get_input_group_names.yaml
|
|
79
82
|
type_spec/external/api/inputs/create_inputs.yaml
|
|
80
83
|
type_spec/external/api/inputs/get_input_data.yaml
|
|
@@ -101,6 +104,7 @@ type_spec/external/api/recipes/get_recipes_data.yaml
|
|
|
101
104
|
type_spec/external/api/recipes/set_recipe_inputs.yaml
|
|
102
105
|
type_spec/external/api/recipes/set_recipe_metadata.yaml
|
|
103
106
|
type_spec/external/api/recipes/set_recipe_outputs.yaml
|
|
107
|
+
type_spec/external/api/triggers/run_trigger.yaml
|
|
104
108
|
uncountable/__init__.py
|
|
105
109
|
uncountable/py.typed
|
|
106
110
|
uncountable/core/__init__.py
|
|
@@ -127,6 +131,7 @@ uncountable/types/entity.py
|
|
|
127
131
|
uncountable/types/experiment_groups.py
|
|
128
132
|
uncountable/types/field_values.py
|
|
129
133
|
uncountable/types/fields.py
|
|
134
|
+
uncountable/types/id_source.py
|
|
130
135
|
uncountable/types/identifier.py
|
|
131
136
|
uncountable/types/input_attributes.py
|
|
132
137
|
uncountable/types/inputs.py
|
|
@@ -144,6 +149,7 @@ uncountable/types/workflows.py
|
|
|
144
149
|
uncountable/types/api/__init__.py
|
|
145
150
|
uncountable/types/api/batch/__init__.py
|
|
146
151
|
uncountable/types/api/batch/execute_batch.py
|
|
152
|
+
uncountable/types/api/batch/execute_batch_load_async.py
|
|
147
153
|
uncountable/types/api/chemical/__init__.py
|
|
148
154
|
uncountable/types/api/chemical/convert_chemical_formats.py
|
|
149
155
|
uncountable/types/api/entity/__init__.py
|
|
@@ -153,6 +159,9 @@ uncountable/types/api/entity/get_entities_data.py
|
|
|
153
159
|
uncountable/types/api/entity/list_entities.py
|
|
154
160
|
uncountable/types/api/entity/resolve_entity_ids.py
|
|
155
161
|
uncountable/types/api/entity/set_values.py
|
|
162
|
+
uncountable/types/api/id_source/__init__.py
|
|
163
|
+
uncountable/types/api/id_source/list_id_source.py
|
|
164
|
+
uncountable/types/api/id_source/match_id_source.py
|
|
156
165
|
uncountable/types/api/input_groups/__init__.py
|
|
157
166
|
uncountable/types/api/input_groups/get_input_group_names.py
|
|
158
167
|
uncountable/types/api/inputs/__init__.py
|
|
@@ -185,4 +194,6 @@ uncountable/types/api/recipes/get_recipe_output_metadata.py
|
|
|
185
194
|
uncountable/types/api/recipes/get_recipes_data.py
|
|
186
195
|
uncountable/types/api/recipes/set_recipe_inputs.py
|
|
187
196
|
uncountable/types/api/recipes/set_recipe_metadata.py
|
|
188
|
-
uncountable/types/api/recipes/set_recipe_outputs.py
|
|
197
|
+
uncountable/types/api/recipes/set_recipe_outputs.py
|
|
198
|
+
uncountable/types/api/triggers/__init__.py
|
|
199
|
+
uncountable/types/api/triggers/run_trigger.py
|
{uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/argument_parser/argument_parser.py
RENAMED
|
@@ -18,7 +18,7 @@ from .case_convert import camel_to_snake_case, snake_to_camel_case
|
|
|
18
18
|
|
|
19
19
|
T = typing.TypeVar("T")
|
|
20
20
|
ParserFunction = typing.Callable[[typing.Any], T]
|
|
21
|
-
ParserCache = dict[
|
|
21
|
+
ParserCache = dict[type[typing.Any], ParserFunction[typing.Any]]
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
@dataclass(frozen=True, eq=True)
|
|
@@ -47,7 +47,7 @@ def is_missing(field_type: typing.Any) -> bool:
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
def _invoke_tuple_parsers(
|
|
50
|
-
tuple_type:
|
|
50
|
+
tuple_type: type[T],
|
|
51
51
|
arg_parsers: typing.Sequence[typing.Callable[[typing.Any], object]],
|
|
52
52
|
has_ellipsis: bool,
|
|
53
53
|
value: typing.Any,
|
|
@@ -66,7 +66,7 @@ def _invoke_tuple_parsers(
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
def _invoke_fallback_parsers(
|
|
69
|
-
original_type:
|
|
69
|
+
original_type: type[T],
|
|
70
70
|
arg_parsers: typing.Sequence[typing.Callable[[typing.Any], T]],
|
|
71
71
|
value: typing.Any,
|
|
72
72
|
) -> T:
|
|
@@ -84,7 +84,7 @@ def _invoke_fallback_parsers(
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
def _invoke_membership_parser(
|
|
87
|
-
expected_values:
|
|
87
|
+
expected_values: set[T],
|
|
88
88
|
value: typing.Any,
|
|
89
89
|
) -> T:
|
|
90
90
|
"""
|
|
@@ -99,7 +99,7 @@ def _invoke_membership_parser(
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
def _build_parser_inner(
|
|
102
|
-
parsed_type:
|
|
102
|
+
parsed_type: type[T],
|
|
103
103
|
context: ParserContext,
|
|
104
104
|
*,
|
|
105
105
|
convert_string_to_snake_case: bool = False,
|
|
@@ -143,7 +143,7 @@ def _build_parser_inner(
|
|
|
143
143
|
origin = typing.get_origin(parsed_type)
|
|
144
144
|
if origin is tuple:
|
|
145
145
|
args = typing.get_args(parsed_type)
|
|
146
|
-
element_parsers:
|
|
146
|
+
element_parsers: list[typing.Callable[[typing.Any], object]] = []
|
|
147
147
|
has_ellipsis = False
|
|
148
148
|
for arg in args:
|
|
149
149
|
assert not has_ellipsis
|
|
@@ -200,7 +200,7 @@ def _build_parser_inner(
|
|
|
200
200
|
return lambda value: origin((k_parser(k), v_parser(v)) for k, v in value.items())
|
|
201
201
|
|
|
202
202
|
if origin == typing.Literal:
|
|
203
|
-
valid_values:
|
|
203
|
+
valid_values: set[T] = set(typing.get_args(parsed_type))
|
|
204
204
|
return lambda value: _invoke_membership_parser(valid_values, value)
|
|
205
205
|
|
|
206
206
|
if parsed_type is str and convert_string_to_snake_case:
|
|
@@ -257,7 +257,7 @@ def _build_parser_inner(
|
|
|
257
257
|
|
|
258
258
|
|
|
259
259
|
def _build_parser_dataclass(
|
|
260
|
-
parsed_type:
|
|
260
|
+
parsed_type: type[T],
|
|
261
261
|
context: ParserContext,
|
|
262
262
|
) -> ParserFunction[T]:
|
|
263
263
|
"""
|
|
@@ -271,9 +271,9 @@ def _build_parser_dataclass(
|
|
|
271
271
|
|
|
272
272
|
type_hints = typing.get_type_hints(parsed_type)
|
|
273
273
|
dc_field_parsers: list[
|
|
274
|
-
|
|
274
|
+
tuple[
|
|
275
275
|
dataclasses.Field[typing.Any],
|
|
276
|
-
|
|
276
|
+
type[typing.Any],
|
|
277
277
|
ParserFunction[typing.Any],
|
|
278
278
|
]
|
|
279
279
|
] = []
|
|
@@ -281,7 +281,7 @@ def _build_parser_dataclass(
|
|
|
281
281
|
serial_class_data = get_serial_class_data(parsed_type)
|
|
282
282
|
|
|
283
283
|
def parse(value: typing.Any) -> typing.Any:
|
|
284
|
-
data:
|
|
284
|
+
data: dict[typing.Any, typing.Any] = {}
|
|
285
285
|
for field, field_type, field_parser in dc_field_parsers:
|
|
286
286
|
field_raw_value = None
|
|
287
287
|
try:
|
|
@@ -347,7 +347,7 @@ _CACHE_MAP: dict[ParserOptions, ParserCache] = defaultdict(ParserCache)
|
|
|
347
347
|
|
|
348
348
|
|
|
349
349
|
def build_parser(
|
|
350
|
-
parsed_type:
|
|
350
|
+
parsed_type: type[T],
|
|
351
351
|
options: ParserOptions,
|
|
352
352
|
) -> ParserFunction[T]:
|
|
353
353
|
"""
|
|
@@ -371,7 +371,7 @@ def build_parser(
|
|
|
371
371
|
class CachedParser(typing.Generic[T]):
|
|
372
372
|
def __init__(
|
|
373
373
|
self,
|
|
374
|
-
args:
|
|
374
|
+
args: type[T],
|
|
375
375
|
):
|
|
376
376
|
self.arguments = args
|
|
377
377
|
self.parser_api: typing.Optional[ParserFunction[T]] = None
|
{uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/serialization/serial_class.py
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import dataclasses
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
from
|
|
4
|
+
from collections.abc import Callable
|
|
5
|
+
from enum import StrEnum
|
|
6
|
+
from typing import Any, Optional, TypeVar, cast
|
|
7
7
|
|
|
8
8
|
_ClassT = TypeVar("_ClassT")
|
|
9
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from enum import StrEnum as StrEnum
|
|
@@ -64,13 +64,14 @@ def main() -> None:
|
|
|
64
64
|
action_definitions: defaultdict[str, list[actions_registry_t.ActionDefinition]] = (
|
|
65
65
|
defaultdict(list)
|
|
66
66
|
)
|
|
67
|
+
all_action_definitions: list[actions_registry_t.ActionDefinition] = []
|
|
68
|
+
|
|
67
69
|
for file_info in files_info:
|
|
68
70
|
in_action_definitions = action_definition_parser.parse_yaml_file(
|
|
69
71
|
file_info.filepath
|
|
70
72
|
)
|
|
71
73
|
if len(in_action_definitions) == 0:
|
|
72
74
|
continue
|
|
73
|
-
|
|
74
75
|
for ref_name, definition in in_action_definitions.items():
|
|
75
76
|
modules = [*file_info.directories]
|
|
76
77
|
# if the actions are stored in index.yaml, parent dir should be treated as module
|
|
@@ -78,7 +79,7 @@ def main() -> None:
|
|
|
78
79
|
modules.append(file_info.filename)
|
|
79
80
|
|
|
80
81
|
module_str = "_".join(modules)
|
|
81
|
-
|
|
82
|
+
all_action_definitions.append(
|
|
82
83
|
actions_registry_t.ActionDefinition(
|
|
83
84
|
name=definition.name,
|
|
84
85
|
short_description=definition.short_description,
|
|
@@ -96,12 +97,17 @@ def main() -> None:
|
|
|
96
97
|
else None,
|
|
97
98
|
)
|
|
98
99
|
)
|
|
99
|
-
|
|
100
|
+
all_action_definitions = sorted(
|
|
101
|
+
all_action_definitions, key=lambda item: (item.module, item.ref_name)
|
|
102
|
+
)
|
|
103
|
+
for action_definition in all_action_definitions:
|
|
104
|
+
action_definitions[action_definition.module].append(action_definition)
|
|
100
105
|
ts_content = emit_action_definitions(action_definitions)
|
|
101
106
|
rewrite_file(
|
|
102
107
|
"main/site/js/materials/base/actions_registry/action_definitions.tsx",
|
|
103
108
|
ts_content,
|
|
104
109
|
)
|
|
110
|
+
|
|
105
111
|
sys.exit(0)
|
|
106
112
|
|
|
107
113
|
|
|
@@ -12,8 +12,16 @@ def _action_symbol_name(action_definition: actions_registry_t.ActionDefinition)
|
|
|
12
12
|
return f"{ts_name(action_definition.ref_name, name_case=builder.NameCase.convert)}"
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def _action_module_name_base(module: str) -> str:
|
|
16
|
+
return f"{ts_name(module, name_case=builder.NameCase.convert)}"
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _action_module_name_obj(module: str) -> str:
|
|
20
|
+
return f"{_action_module_name_base(module)}Actions"
|
|
21
|
+
|
|
22
|
+
|
|
15
23
|
def _action_module_name(module: str) -> str:
|
|
16
|
-
return f"ActionsRegistryT.ActionsRegistryModule.{
|
|
24
|
+
return f"ActionsRegistryT.ActionsRegistryModule.{_action_module_name_base(module)}"
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
def emit_action_definitions(
|
|
@@ -24,19 +32,25 @@ def emit_action_definitions(
|
|
|
24
32
|
out.write("\n")
|
|
25
33
|
out.write('import { ActionsRegistryT } from "unc_mat/types"\n\n')
|
|
26
34
|
out.write(MODIFY_NOTICE)
|
|
27
|
-
out.write("export const actionDefinitions = {\n")
|
|
28
35
|
modules = []
|
|
29
36
|
for key, values in action_definitions.items():
|
|
30
37
|
out.write(MODIFY_NOTICE)
|
|
31
|
-
out.write(f"{INDENT}[{_action_module_name(key)}]: {{\n")
|
|
32
38
|
modules.append(key)
|
|
39
|
+
out.write(f"export const {_action_module_name_obj(key)} = {{\n")
|
|
33
40
|
for action_definition in values:
|
|
34
|
-
out.write(
|
|
35
|
-
|
|
41
|
+
out.write(MODIFY_NOTICE)
|
|
42
|
+
out.write(_emit_action_definition(action_definition, INDENT))
|
|
43
|
+
out.write("}\n")
|
|
36
44
|
|
|
37
|
-
out.write("}\n")
|
|
38
45
|
out.write(MODIFY_NOTICE)
|
|
39
46
|
out.write("\n")
|
|
47
|
+
out.write("export const actionDefinitions = {\n")
|
|
48
|
+
for module in modules:
|
|
49
|
+
out.write(
|
|
50
|
+
f"{INDENT}[{_action_module_name(module)}]: {_action_module_name_obj(module)},\n"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
out.write("}\n")
|
|
40
54
|
out.write(_emit_action_definition_types(modules, indent=""))
|
|
41
55
|
out.write(MODIFY_NOTICE)
|
|
42
56
|
out.write("\n")
|
|
@@ -9,22 +9,22 @@ import os
|
|
|
9
9
|
import re
|
|
10
10
|
from collections import defaultdict
|
|
11
11
|
from dataclasses import MISSING, dataclass
|
|
12
|
-
from enum import Enum, auto
|
|
13
|
-
from typing import Any,
|
|
12
|
+
from enum import Enum, StrEnum, auto
|
|
13
|
+
from typing import Any, Optional
|
|
14
14
|
|
|
15
15
|
from . import util
|
|
16
16
|
from .util import parse_type_str, unused
|
|
17
17
|
|
|
18
|
-
RawDict =
|
|
18
|
+
RawDict = dict[Any, Any]
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
class PropertyExtant(
|
|
21
|
+
class PropertyExtant(StrEnum):
|
|
22
22
|
required = "required"
|
|
23
23
|
optional = "optional"
|
|
24
24
|
missing = "missing"
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class PropertyConvertValue(
|
|
27
|
+
class PropertyConvertValue(StrEnum):
|
|
28
28
|
# Base conversion on underlying types
|
|
29
29
|
auto = "auto"
|
|
30
30
|
# Always convert the value (Not needed yet, thus not supported)
|
|
@@ -52,7 +52,7 @@ class SpecProperty:
|
|
|
52
52
|
ext_info: Any = None
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
class NameCase(
|
|
55
|
+
class NameCase(StrEnum):
|
|
56
56
|
convert = "convert"
|
|
57
57
|
preserve = "preserve"
|
|
58
58
|
# Upper-case in JavaScript, convert otherwise. This is a compatibilty
|
|
@@ -60,7 +60,7 @@ class NameCase(str, Enum):
|
|
|
60
60
|
js_upper = "js_upper"
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
class BaseTypeName(
|
|
63
|
+
class BaseTypeName(StrEnum):
|
|
64
64
|
"""
|
|
65
65
|
Base types that are supported.
|
|
66
66
|
"""
|
|
@@ -92,7 +92,7 @@ class BaseTypeName(str, Enum):
|
|
|
92
92
|
s_object = "Object"
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
class DefnTypeName(
|
|
95
|
+
class DefnTypeName(StrEnum):
|
|
96
96
|
# Type is a named alias of another type
|
|
97
97
|
s_alias = "Alias"
|
|
98
98
|
# Type is imported from an external source (opaque to type_spec)
|
|
@@ -656,7 +656,7 @@ TOKEN_EMIT_TYPE_INFO = "$emit_type_info"
|
|
|
656
656
|
TOKEN_IMPORT = "$import"
|
|
657
657
|
|
|
658
658
|
|
|
659
|
-
class RouteMethod(
|
|
659
|
+
class RouteMethod(StrEnum):
|
|
660
660
|
post = "post"
|
|
661
661
|
get = "get"
|
|
662
662
|
delete = "delete"
|
|
@@ -664,7 +664,7 @@ class RouteMethod(str, Enum):
|
|
|
664
664
|
put = "put"
|
|
665
665
|
|
|
666
666
|
|
|
667
|
-
class ResultType(
|
|
667
|
+
class ResultType(StrEnum):
|
|
668
668
|
json = "json"
|
|
669
669
|
binary = "binary"
|
|
670
670
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import os
|
|
2
|
+
from collections.abc import Callable, Mapping
|
|
2
3
|
from dataclasses import dataclass
|
|
3
4
|
from decimal import Decimal
|
|
4
|
-
from typing import
|
|
5
|
+
from typing import Self, TypeVar
|
|
5
6
|
|
|
6
7
|
import yaml
|
|
7
8
|
|
|
@@ -96,7 +97,7 @@ class Config:
|
|
|
96
97
|
_T = TypeVar("_T")
|
|
97
98
|
|
|
98
99
|
|
|
99
|
-
def _parse_language(config_class:
|
|
100
|
+
def _parse_language(config_class: type[_T], raw_value: ConfigValueType) -> _T:
|
|
100
101
|
assert isinstance(raw_value, dict), "expecting language config to have key/values."
|
|
101
102
|
return config_class(**raw_value)
|
|
102
103
|
|
|
@@ -2,7 +2,7 @@ import io
|
|
|
2
2
|
import os
|
|
3
3
|
from dataclasses import dataclass, field
|
|
4
4
|
from decimal import Decimal
|
|
5
|
-
from typing import Any, Optional
|
|
5
|
+
from typing import Any, Optional
|
|
6
6
|
|
|
7
7
|
from . import builder, util
|
|
8
8
|
from .config import PythonConfig
|
|
@@ -25,8 +25,8 @@ END_ALL_EXPORTS = "]\n"
|
|
|
25
25
|
@dataclass(kw_only=True)
|
|
26
26
|
class TrackingContext:
|
|
27
27
|
namespace: Optional[builder.SpecNamespace] = None
|
|
28
|
-
namespaces:
|
|
29
|
-
names:
|
|
28
|
+
namespaces: set[builder.SpecNamespace] = field(default_factory=set)
|
|
29
|
+
names: set[str] = field(default_factory=set)
|
|
30
30
|
|
|
31
31
|
use_enum: bool = False
|
|
32
32
|
use_serial_string_enum: bool = False
|
|
@@ -119,6 +119,9 @@ def _emit_value(ctx: TrackingContext, stype: builder.SpecType, value: Any) -> st
|
|
|
119
119
|
# Note that decimal requires the `!decimal 123.12` style notation in the YAML
|
|
120
120
|
# file since PyYaml parses numbers as float, unfortuantely
|
|
121
121
|
assert isinstance(value, (Decimal, int))
|
|
122
|
+
if isinstance(value, int):
|
|
123
|
+
# skip quotes for integers
|
|
124
|
+
return f"Decimal({value})"
|
|
122
125
|
return f'Decimal("{value}")'
|
|
123
126
|
elif isinstance(stype, builder.SpecTypeInstance):
|
|
124
127
|
if stype.defn_type.is_base_type(builder.BaseTypeName.s_list):
|
|
@@ -220,7 +223,7 @@ def _emit_types(*, builder: builder.SpecBuilder, config: PythonConfig) -> None:
|
|
|
220
223
|
exports_out = io.StringIO()
|
|
221
224
|
exports_out.write(START_ALL_EXPORTS)
|
|
222
225
|
|
|
223
|
-
all_dirs:
|
|
226
|
+
all_dirs: set[str] = set()
|
|
224
227
|
|
|
225
228
|
for namespace in sorted(
|
|
226
229
|
builder.namespaces.values(),
|
|
@@ -500,10 +503,10 @@ def _emit_string_enum(ctx: Context, stype: builder.SpecTypeDefnStringEnum) -> No
|
|
|
500
503
|
|
|
501
504
|
@dataclass
|
|
502
505
|
class EmittedPropertiesMetadata:
|
|
503
|
-
unconverted_keys:
|
|
504
|
-
unconverted_values:
|
|
505
|
-
to_string_values:
|
|
506
|
-
parse_require:
|
|
506
|
+
unconverted_keys: set[str]
|
|
507
|
+
unconverted_values: set[str]
|
|
508
|
+
to_string_values: set[str]
|
|
509
|
+
parse_require: set[str]
|
|
507
510
|
|
|
508
511
|
|
|
509
512
|
def _emit_type_properties(
|
|
@@ -514,10 +517,10 @@ def _emit_type_properties(
|
|
|
514
517
|
num_indent: int = 1,
|
|
515
518
|
separator: str = "\n",
|
|
516
519
|
) -> EmittedPropertiesMetadata:
|
|
517
|
-
unconverted_keys:
|
|
518
|
-
unconverted_values:
|
|
519
|
-
to_string_values:
|
|
520
|
-
parse_require:
|
|
520
|
+
unconverted_keys: set[str] = set()
|
|
521
|
+
unconverted_values: set[str] = set()
|
|
522
|
+
to_string_values: set[str] = set()
|
|
523
|
+
parse_require: set[str] = set()
|
|
521
524
|
|
|
522
525
|
if stype.properties is not None and len(stype.properties) > 0:
|
|
523
526
|
|
|
@@ -811,7 +814,7 @@ ROUTES: list[DynamicRouteType] = [
|
|
|
811
814
|
def _emit_namespace_imports(
|
|
812
815
|
*,
|
|
813
816
|
out: io.StringIO,
|
|
814
|
-
namespaces:
|
|
817
|
+
namespaces: set[builder.SpecNamespace],
|
|
815
818
|
from_namespace: Optional[builder.SpecNamespace],
|
|
816
819
|
config: PythonConfig,
|
|
817
820
|
) -> None:
|
|
@@ -844,7 +847,7 @@ def _emit_id_source(*, builder: builder.SpecBuilder, config: PythonConfig) -> No
|
|
|
844
847
|
return None
|
|
845
848
|
enum_out = io.StringIO()
|
|
846
849
|
enum_out.write(f"{LINT_HEADER}{MODIFY_NOTICE}\n")
|
|
847
|
-
enum_out.write("from typing import Literal,
|
|
850
|
+
enum_out.write("from typing import Literal, Union\n")
|
|
848
851
|
enum_out.write("from pkgs.strenum_compat import StrEnum\n")
|
|
849
852
|
|
|
850
853
|
ctx = TrackingContext()
|
|
@@ -859,13 +862,13 @@ def _emit_id_source(*, builder: builder.SpecBuilder, config: PythonConfig) -> No
|
|
|
859
862
|
)
|
|
860
863
|
|
|
861
864
|
known_keys = []
|
|
862
|
-
enum_out.write("\nENUM_MAP: dict[str,
|
|
865
|
+
enum_out.write("\nENUM_MAP: dict[str, type[StrEnum]] = {\n")
|
|
863
866
|
for key in sorted(named_enums.keys()):
|
|
864
867
|
enum_out.write(f'"{key}": {named_enums[key]},\n')
|
|
865
868
|
known_keys.append(f'Literal["{key}"]')
|
|
866
869
|
enum_out.write(f"}}\n{MODIFY_NOTICE}\n")
|
|
867
870
|
|
|
868
|
-
enum_out.write(f"\nKnownEnumsType = Union[
|
|
871
|
+
enum_out.write(f"\nKnownEnumsType = Union[\n{INDENT}")
|
|
869
872
|
enum_out.write(f",\n{INDENT}".join(known_keys))
|
|
870
873
|
enum_out.write(f"\n]\n{MODIFY_NOTICE}\n")
|
|
871
874
|
|
{uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_typescript.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import io
|
|
2
2
|
import os
|
|
3
|
-
from typing import Any
|
|
3
|
+
from typing import Any
|
|
4
4
|
|
|
5
5
|
from . import builder, util
|
|
6
6
|
from .builder import SpecTypeDefnObject
|
|
@@ -386,7 +386,7 @@ def refer_to(ctx: EmitTypescriptContext, stype: builder.SpecType) -> str:
|
|
|
386
386
|
|
|
387
387
|
def refer_to_impl(
|
|
388
388
|
ctx: EmitTypescriptContext, stype: builder.SpecType
|
|
389
|
-
) ->
|
|
389
|
+
) -> tuple[str, bool]:
|
|
390
390
|
"""
|
|
391
391
|
@return (string-specific, multiple-types)
|
|
392
392
|
"""
|
{uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/emit_typescript_util.py
RENAMED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import io
|
|
2
|
-
import typing
|
|
3
2
|
from dataclasses import dataclass, field
|
|
4
3
|
|
|
5
4
|
from . import builder, util
|
|
@@ -15,7 +14,7 @@ class EmitTypescriptContext:
|
|
|
15
14
|
config: TypeScriptConfig
|
|
16
15
|
out: io.StringIO
|
|
17
16
|
namespace: builder.SpecNamespace
|
|
18
|
-
namespaces:
|
|
17
|
+
namespaces: set[builder.SpecNamespace] = field(default_factory=set)
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
def ts_type_name(name: str) -> str:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
|
-
from enum import
|
|
2
|
+
from enum import StrEnum
|
|
3
3
|
from io import UnsupportedOperation
|
|
4
4
|
from typing import Optional
|
|
5
5
|
|
|
@@ -41,7 +41,7 @@ class OpenAPIRefType(OpenAPIType):
|
|
|
41
41
|
return {"$ref": self.source}
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
class OpenAPIPrimitive(
|
|
44
|
+
class OpenAPIPrimitive(StrEnum):
|
|
45
45
|
string = "string"
|
|
46
46
|
boolean = "boolean"
|
|
47
47
|
integer = "integer"
|
{uncountablepythonsdk-0.0.17 → uncountablepythonsdk-0.0.18}/pkgs/type_spec/parts/base.py.prepart
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Types that type_spec will use in the emitted files.
|
|
3
3
|
"""
|
|
4
|
-
from typing import Union,
|
|
4
|
+
from typing import Union, Any, TYPE_CHECKING
|
|
5
|
+
from collections.abc import Mapping, Sequence
|
|
5
6
|
|
|
6
7
|
# These two are part of the core output, thus don't duplicate here
|
|
7
8
|
# from decimal import Decimal
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import os
|
|
3
3
|
from dataclasses import dataclass
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Optional, TypeVar, Union
|
|
5
5
|
|
|
6
6
|
import regex as re
|
|
7
7
|
|
|
@@ -29,11 +29,11 @@ LiteralTypeValue = Union[str, bool]
|
|
|
29
29
|
class ParsedTypePart:
|
|
30
30
|
name: str
|
|
31
31
|
# An empty list is distinct from None
|
|
32
|
-
parameters: Optional[
|
|
32
|
+
parameters: Optional[list["ParsedTypePath"]] = None
|
|
33
33
|
literal_value: Optional[LiteralTypeValue] = None
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
ParsedTypePath =
|
|
36
|
+
ParsedTypePath = list[ParsedTypePart]
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
@dataclass
|
|
@@ -48,7 +48,7 @@ def consume_parameter(
|
|
|
48
48
|
) -> ConsumedParameter:
|
|
49
49
|
if bits[at] != "'":
|
|
50
50
|
return ConsumedParameter(at=at, part=ParsedTypePart(name=bits[at]))
|
|
51
|
-
quote_stack:
|
|
51
|
+
quote_stack: list[str] = []
|
|
52
52
|
at += 1
|
|
53
53
|
while at < len(bits):
|
|
54
54
|
if bits[at] == "'":
|
|
@@ -68,7 +68,7 @@ def parse_type_str(type_str: str) -> ParsedTypePath:
|
|
|
68
68
|
"""
|
|
69
69
|
IMPROVE: will not detect all errors yet, focuses on correct cases
|
|
70
70
|
"""
|
|
71
|
-
raw_bits:
|
|
71
|
+
raw_bits: list[str] = re.split(r"([.<>,'])", type_str)
|
|
72
72
|
bits = [
|
|
73
73
|
stripped_bit
|
|
74
74
|
for stripped_bit in (padded_bit.strip() for padded_bit in raw_bits)
|
|
@@ -81,7 +81,7 @@ def parse_type_str(type_str: str) -> ParsedTypePath:
|
|
|
81
81
|
cur_path = result
|
|
82
82
|
cur_path.append(cur_part)
|
|
83
83
|
|
|
84
|
-
path_stack:
|
|
84
|
+
path_stack: list[ParsedTypePath] = []
|
|
85
85
|
|
|
86
86
|
at = 1
|
|
87
87
|
while at < len(bits):
|
|
@@ -156,19 +156,19 @@ def is_valid_property_name(name: str) -> bool:
|
|
|
156
156
|
return re_pattern_property_name.match(name) is not None
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
def check_fields(data:
|
|
159
|
+
def check_fields(data: dict[str, T], allowed: list[str]) -> None:
|
|
160
160
|
for key in data:
|
|
161
161
|
if key not in allowed:
|
|
162
162
|
raise Exception(f"unexpected-field: {key}")
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
def split_any_name(name: str) ->
|
|
165
|
+
def split_any_name(name: str) -> list[str]:
|
|
166
166
|
"""
|
|
167
167
|
Splits a name on case and underscores.
|
|
168
168
|
myName => [my, name]
|
|
169
169
|
my_name => [my, name]
|
|
170
170
|
"""
|
|
171
|
-
bits:
|
|
171
|
+
bits: list[str] = re_pattern_split_name.split(name)
|
|
172
172
|
return [s.lower() for s in filter(lambda x: x is not None and x != "_", bits)]
|
|
173
173
|
|
|
174
174
|
|