metaflow-stubs 2.12.20__py2.py3-none-any.whl → 2.12.21__py2.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.
Files changed (152) hide show
  1. metaflow-stubs/__init__.pyi +366 -370
  2. metaflow-stubs/cards.pyi +5 -5
  3. metaflow-stubs/cli.pyi +3 -3
  4. metaflow-stubs/client/__init__.pyi +2 -2
  5. metaflow-stubs/client/core.pyi +6 -6
  6. metaflow-stubs/client/filecache.pyi +2 -2
  7. metaflow-stubs/clone_util.pyi +2 -2
  8. metaflow-stubs/events.pyi +3 -3
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +5 -5
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +2 -2
  13. metaflow-stubs/info_file.pyi +16 -0
  14. metaflow-stubs/metadata/metadata.pyi +3 -3
  15. metaflow-stubs/metadata/util.pyi +2 -2
  16. metaflow-stubs/metaflow_config.pyi +2 -2
  17. metaflow-stubs/metaflow_current.pyi +5 -5
  18. metaflow-stubs/mflog/mflog.pyi +2 -2
  19. metaflow-stubs/multicore_utils.pyi +2 -2
  20. metaflow-stubs/parameters.pyi +4 -4
  21. metaflow-stubs/plugins/__init__.pyi +3 -3
  22. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  23. metaflow-stubs/plugins/airflow/airflow.pyi +3 -3
  24. metaflow-stubs/plugins/airflow/airflow_cli.pyi +4 -4
  25. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
  26. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  29. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +3 -3
  30. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +3 -3
  31. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +3 -3
  32. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  33. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  34. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  35. metaflow-stubs/plugins/argo/argo_workflows.pyi +4 -4
  36. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +6 -6
  37. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +7 -7
  38. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  39. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  40. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  41. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  42. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  43. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  44. metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
  45. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  46. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +4 -4
  47. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  48. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +4 -4
  49. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  52. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  53. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  54. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  55. metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +4 -4
  56. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  57. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
  58. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +2 -2
  59. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  60. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  61. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  62. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +4 -4
  63. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  64. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  65. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  66. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  67. metaflow-stubs/plugins/cards/card_cli.pyi +5 -5
  68. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  69. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  70. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  71. metaflow-stubs/plugins/cards/card_decorator.pyi +3 -3
  72. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  73. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  74. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  75. metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
  76. metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
  77. metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
  78. metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
  79. metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
  80. metaflow-stubs/plugins/cards/card_modules/components.pyi +5 -5
  81. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  82. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  83. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  84. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  85. metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
  86. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  87. metaflow-stubs/plugins/catch_decorator.pyi +4 -4
  88. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  89. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  90. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  91. metaflow-stubs/plugins/datatools/s3/s3.pyi +5 -5
  92. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  93. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  94. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  95. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  96. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  97. metaflow-stubs/plugins/events_decorator.pyi +3 -3
  98. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  99. metaflow-stubs/plugins/frameworks/pytorch.pyi +3 -3
  100. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  101. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +4 -4
  102. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  103. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  104. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  105. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  106. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  107. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  108. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
  109. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +3 -3
  110. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  111. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +4 -4
  112. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  113. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  114. metaflow-stubs/plugins/logs_cli.pyi +3 -3
  115. metaflow-stubs/plugins/package_cli.pyi +2 -2
  116. metaflow-stubs/plugins/parallel_decorator.pyi +3 -3
  117. metaflow-stubs/plugins/project_decorator.pyi +3 -3
  118. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  119. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  120. metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
  121. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  122. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  123. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  124. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  125. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  126. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  127. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
  128. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  129. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  130. metaflow-stubs/plugins/tag_cli.pyi +5 -5
  131. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  132. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  133. metaflow-stubs/procpoll.pyi +2 -2
  134. metaflow-stubs/pylint_wrapper.pyi +2 -2
  135. metaflow-stubs/runner/__init__.pyi +2 -2
  136. metaflow-stubs/runner/deployer.pyi +3 -3
  137. metaflow-stubs/runner/metaflow_runner.pyi +4 -4
  138. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  139. metaflow-stubs/runner/nbrun.pyi +2 -2
  140. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  141. metaflow-stubs/runner/utils.pyi +2 -2
  142. metaflow-stubs/system/__init__.pyi +3 -3
  143. metaflow-stubs/system/system_logger.pyi +2 -2
  144. metaflow-stubs/system/system_monitor.pyi +2 -2
  145. metaflow-stubs/tagging_util.pyi +2 -2
  146. metaflow-stubs/tuple_util.pyi +2 -2
  147. metaflow-stubs/version.pyi +2 -2
  148. {metaflow_stubs-2.12.20.dist-info → metaflow_stubs-2.12.21.dist-info}/METADATA +2 -2
  149. metaflow_stubs-2.12.21.dist-info/RECORD +152 -0
  150. metaflow_stubs-2.12.20.dist-info/RECORD +0 -151
  151. {metaflow_stubs-2.12.20.dist-info → metaflow_stubs-2.12.21.dist-info}/WHEEL +0 -0
  152. {metaflow_stubs-2.12.20.dist-info → metaflow_stubs-2.12.21.dist-info}/top_level.txt +0 -0
@@ -1,32 +1,28 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.20 #
4
- # Generated on 2024-09-16T18:11:29.503408 #
3
+ # MF version: 2.12.21 #
4
+ # Generated on 2024-09-19T17:04:54.824903 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
- import metaflow.parameters
11
+ import metaflow.datastore.inputs
12
12
  import datetime
13
13
  import metaflow.plugins.datatools.s3.s3
14
- import metaflow.flowspec
15
- import typing
16
- import metaflow._vendor.click.types
17
- import metaflow.metaflow_current
18
- import metaflow.events
19
14
  import metaflow.runner.metaflow_runner
20
15
  import metaflow.client.core
21
- import metaflow.datastore.inputs
16
+ import metaflow.events
17
+ import metaflow.metaflow_current
18
+ import metaflow.flowspec
19
+ import metaflow.parameters
20
+ import metaflow._vendor.click.types
21
+ import typing
22
22
  import io
23
23
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
24
24
  StepFlag = typing.NewType("StepFlag", bool)
25
25
 
26
- CURRENT_DIRECTORY: str
27
-
28
- INFO_FILE: str
29
-
30
26
  EXT_PKG: str
31
27
 
32
28
  def parallel_imap_unordered(func: typing.Callable[[typing.Any], typing.Any], iterable: typing.Iterable[typing.Any], max_parallel: typing.Optional[int] = None, dir: typing.Optional[str] = None) -> typing.Iterator[typing.Any]:
@@ -727,6 +723,96 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
727
723
  """
728
724
  ...
729
725
 
726
+ @typing.overload
727
+ def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
728
+ """
729
+ Specifies secrets to be retrieved and injected as environment variables prior to
730
+ the execution of a step.
731
+
732
+ Parameters
733
+ ----------
734
+ sources : List[Union[str, Dict[str, Any]]], default: []
735
+ List of secret specs, defining how the secrets are to be retrieved
736
+ """
737
+ ...
738
+
739
+ @typing.overload
740
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
741
+ ...
742
+
743
+ @typing.overload
744
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
745
+ ...
746
+
747
+ def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []):
748
+ """
749
+ Specifies secrets to be retrieved and injected as environment variables prior to
750
+ the execution of a step.
751
+
752
+ Parameters
753
+ ----------
754
+ sources : List[Union[str, Dict[str, Any]]], default: []
755
+ List of secret specs, defining how the secrets are to be retrieved
756
+ """
757
+ ...
758
+
759
+ @typing.overload
760
+ def timeout(*, seconds: int = 0, minutes: int = 0, hours: int = 0) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
761
+ """
762
+ Specifies a timeout for your step.
763
+
764
+ This decorator is useful if this step may hang indefinitely.
765
+
766
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
767
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
768
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
769
+
770
+ Note that all the values specified in parameters are added together so if you specify
771
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
772
+
773
+ Parameters
774
+ ----------
775
+ seconds : int, default 0
776
+ Number of seconds to wait prior to timing out.
777
+ minutes : int, default 0
778
+ Number of minutes to wait prior to timing out.
779
+ hours : int, default 0
780
+ Number of hours to wait prior to timing out.
781
+ """
782
+ ...
783
+
784
+ @typing.overload
785
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
786
+ ...
787
+
788
+ @typing.overload
789
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
790
+ ...
791
+
792
+ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
793
+ """
794
+ Specifies a timeout for your step.
795
+
796
+ This decorator is useful if this step may hang indefinitely.
797
+
798
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
799
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
800
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
801
+
802
+ Note that all the values specified in parameters are added together so if you specify
803
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
804
+
805
+ Parameters
806
+ ----------
807
+ seconds : int, default 0
808
+ Number of seconds to wait prior to timing out.
809
+ minutes : int, default 0
810
+ Number of minutes to wait prior to timing out.
811
+ hours : int, default 0
812
+ Number of hours to wait prior to timing out.
813
+ """
814
+ ...
815
+
730
816
  @typing.overload
731
817
  def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
732
818
  """
@@ -758,6 +844,108 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
758
844
  """
759
845
  ...
760
846
 
847
+ @typing.overload
848
+ def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
849
+ """
850
+ Specifies that the step will success under all circumstances.
851
+
852
+ The decorator will create an optional artifact, specified by `var`, which
853
+ contains the exception raised. You can use it to detect the presence
854
+ of errors, indicating that all happy-path artifacts produced by the step
855
+ are missing.
856
+
857
+ Parameters
858
+ ----------
859
+ var : str, optional, default None
860
+ Name of the artifact in which to store the caught exception.
861
+ If not specified, the exception is not stored.
862
+ print_exception : bool, default True
863
+ Determines whether or not the exception is printed to
864
+ stdout when caught.
865
+ """
866
+ ...
867
+
868
+ @typing.overload
869
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
870
+ ...
871
+
872
+ @typing.overload
873
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
874
+ ...
875
+
876
+ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
877
+ """
878
+ Specifies that the step will success under all circumstances.
879
+
880
+ The decorator will create an optional artifact, specified by `var`, which
881
+ contains the exception raised. You can use it to detect the presence
882
+ of errors, indicating that all happy-path artifacts produced by the step
883
+ are missing.
884
+
885
+ Parameters
886
+ ----------
887
+ var : str, optional, default None
888
+ Name of the artifact in which to store the caught exception.
889
+ If not specified, the exception is not stored.
890
+ print_exception : bool, default True
891
+ Determines whether or not the exception is printed to
892
+ stdout when caught.
893
+ """
894
+ ...
895
+
896
+ @typing.overload
897
+ def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
898
+ """
899
+ Specifies the number of times the task corresponding
900
+ to a step needs to be retried.
901
+
902
+ This decorator is useful for handling transient errors, such as networking issues.
903
+ If your task contains operations that can't be retried safely, e.g. database updates,
904
+ it is advisable to annotate it with `@retry(times=0)`.
905
+
906
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
907
+ decorator will execute a no-op task after all retries have been exhausted,
908
+ ensuring that the flow execution can continue.
909
+
910
+ Parameters
911
+ ----------
912
+ times : int, default 3
913
+ Number of times to retry this task.
914
+ minutes_between_retries : int, default 2
915
+ Number of minutes between retries.
916
+ """
917
+ ...
918
+
919
+ @typing.overload
920
+ def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
921
+ ...
922
+
923
+ @typing.overload
924
+ def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
925
+ ...
926
+
927
+ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
928
+ """
929
+ Specifies the number of times the task corresponding
930
+ to a step needs to be retried.
931
+
932
+ This decorator is useful for handling transient errors, such as networking issues.
933
+ If your task contains operations that can't be retried safely, e.g. database updates,
934
+ it is advisable to annotate it with `@retry(times=0)`.
935
+
936
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
937
+ decorator will execute a no-op task after all retries have been exhausted,
938
+ ensuring that the flow execution can continue.
939
+
940
+ Parameters
941
+ ----------
942
+ times : int, default 3
943
+ Number of times to retry this task.
944
+ minutes_between_retries : int, default 2
945
+ Number of minutes between retries.
946
+ """
947
+ ...
948
+
761
949
  @typing.overload
762
950
  def resources(*, cpu: int = 1, gpu: int = 0, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
763
951
  """
@@ -1002,35 +1190,53 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
1002
1190
  ...
1003
1191
 
1004
1192
  @typing.overload
1005
- def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1193
+ def card(*, type: str = "default", id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1006
1194
  """
1007
- Specifies secrets to be retrieved and injected as environment variables prior to
1008
- the execution of a step.
1195
+ Creates a human-readable report, a Metaflow Card, after this step completes.
1196
+
1197
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1009
1198
 
1010
1199
  Parameters
1011
1200
  ----------
1012
- sources : List[Union[str, Dict[str, Any]]], default: []
1013
- List of secret specs, defining how the secrets are to be retrieved
1201
+ type : str, default 'default'
1202
+ Card type.
1203
+ id : str, optional, default None
1204
+ If multiple cards are present, use this id to identify this card.
1205
+ options : Dict[str, Any], default {}
1206
+ Options passed to the card. The contents depend on the card type.
1207
+ timeout : int, default 45
1208
+ Interrupt reporting if it takes more than this many seconds.
1209
+
1210
+
1014
1211
  """
1015
1212
  ...
1016
1213
 
1017
1214
  @typing.overload
1018
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1215
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1019
1216
  ...
1020
1217
 
1021
1218
  @typing.overload
1022
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1219
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1023
1220
  ...
1024
1221
 
1025
- def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []):
1222
+ def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, type: str = "default", id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45):
1026
1223
  """
1027
- Specifies secrets to be retrieved and injected as environment variables prior to
1028
- the execution of a step.
1224
+ Creates a human-readable report, a Metaflow Card, after this step completes.
1225
+
1226
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1029
1227
 
1030
1228
  Parameters
1031
1229
  ----------
1032
- sources : List[Union[str, Dict[str, Any]]], default: []
1033
- List of secret specs, defining how the secrets are to be retrieved
1230
+ type : str, default 'default'
1231
+ Card type.
1232
+ id : str, optional, default None
1233
+ If multiple cards are present, use this id to identify this card.
1234
+ options : Dict[str, Any], default {}
1235
+ Options passed to the card. The contents depend on the card type.
1236
+ timeout : int, default 45
1237
+ Interrupt reporting if it takes more than this many seconds.
1238
+
1239
+
1034
1240
  """
1035
1241
  ...
1036
1242
 
@@ -1084,166 +1290,9 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
1084
1290
  ...
1085
1291
 
1086
1292
  @typing.overload
1087
- def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1293
+ def conda(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1088
1294
  """
1089
- Specifies that the step will success under all circumstances.
1090
-
1091
- The decorator will create an optional artifact, specified by `var`, which
1092
- contains the exception raised. You can use it to detect the presence
1093
- of errors, indicating that all happy-path artifacts produced by the step
1094
- are missing.
1095
-
1096
- Parameters
1097
- ----------
1098
- var : str, optional, default None
1099
- Name of the artifact in which to store the caught exception.
1100
- If not specified, the exception is not stored.
1101
- print_exception : bool, default True
1102
- Determines whether or not the exception is printed to
1103
- stdout when caught.
1104
- """
1105
- ...
1106
-
1107
- @typing.overload
1108
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1109
- ...
1110
-
1111
- @typing.overload
1112
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1113
- ...
1114
-
1115
- def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
1116
- """
1117
- Specifies that the step will success under all circumstances.
1118
-
1119
- The decorator will create an optional artifact, specified by `var`, which
1120
- contains the exception raised. You can use it to detect the presence
1121
- of errors, indicating that all happy-path artifacts produced by the step
1122
- are missing.
1123
-
1124
- Parameters
1125
- ----------
1126
- var : str, optional, default None
1127
- Name of the artifact in which to store the caught exception.
1128
- If not specified, the exception is not stored.
1129
- print_exception : bool, default True
1130
- Determines whether or not the exception is printed to
1131
- stdout when caught.
1132
- """
1133
- ...
1134
-
1135
- @typing.overload
1136
- def card(*, type: str = "default", id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1137
- """
1138
- Creates a human-readable report, a Metaflow Card, after this step completes.
1139
-
1140
- Note that you may add multiple `@card` decorators in a step with different parameters.
1141
-
1142
- Parameters
1143
- ----------
1144
- type : str, default 'default'
1145
- Card type.
1146
- id : str, optional, default None
1147
- If multiple cards are present, use this id to identify this card.
1148
- options : Dict[str, Any], default {}
1149
- Options passed to the card. The contents depend on the card type.
1150
- timeout : int, default 45
1151
- Interrupt reporting if it takes more than this many seconds.
1152
-
1153
-
1154
- """
1155
- ...
1156
-
1157
- @typing.overload
1158
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1159
- ...
1160
-
1161
- @typing.overload
1162
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1163
- ...
1164
-
1165
- def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, type: str = "default", id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45):
1166
- """
1167
- Creates a human-readable report, a Metaflow Card, after this step completes.
1168
-
1169
- Note that you may add multiple `@card` decorators in a step with different parameters.
1170
-
1171
- Parameters
1172
- ----------
1173
- type : str, default 'default'
1174
- Card type.
1175
- id : str, optional, default None
1176
- If multiple cards are present, use this id to identify this card.
1177
- options : Dict[str, Any], default {}
1178
- Options passed to the card. The contents depend on the card type.
1179
- timeout : int, default 45
1180
- Interrupt reporting if it takes more than this many seconds.
1181
-
1182
-
1183
- """
1184
- ...
1185
-
1186
- @typing.overload
1187
- def timeout(*, seconds: int = 0, minutes: int = 0, hours: int = 0) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1188
- """
1189
- Specifies a timeout for your step.
1190
-
1191
- This decorator is useful if this step may hang indefinitely.
1192
-
1193
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1194
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
1195
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
1196
-
1197
- Note that all the values specified in parameters are added together so if you specify
1198
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1199
-
1200
- Parameters
1201
- ----------
1202
- seconds : int, default 0
1203
- Number of seconds to wait prior to timing out.
1204
- minutes : int, default 0
1205
- Number of minutes to wait prior to timing out.
1206
- hours : int, default 0
1207
- Number of hours to wait prior to timing out.
1208
- """
1209
- ...
1210
-
1211
- @typing.overload
1212
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1213
- ...
1214
-
1215
- @typing.overload
1216
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1217
- ...
1218
-
1219
- def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
1220
- """
1221
- Specifies a timeout for your step.
1222
-
1223
- This decorator is useful if this step may hang indefinitely.
1224
-
1225
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1226
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
1227
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
1228
-
1229
- Note that all the values specified in parameters are added together so if you specify
1230
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1231
-
1232
- Parameters
1233
- ----------
1234
- seconds : int, default 0
1235
- Number of seconds to wait prior to timing out.
1236
- minutes : int, default 0
1237
- Number of minutes to wait prior to timing out.
1238
- hours : int, default 0
1239
- Number of hours to wait prior to timing out.
1240
- """
1241
- ...
1242
-
1243
- @typing.overload
1244
- def conda(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1245
- """
1246
- Specifies the Conda environment for the step.
1295
+ Specifies the Conda environment for the step.
1247
1296
 
1248
1297
  Information in this decorator will augment any
1249
1298
  attributes set in the `@conda_base` flow-level decorator. Hence,
@@ -1363,56 +1412,45 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
1363
1412
  """
1364
1413
  ...
1365
1414
 
1366
- @typing.overload
1367
- def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1368
- """
1369
- Specifies the number of times the task corresponding
1370
- to a step needs to be retried.
1371
-
1372
- This decorator is useful for handling transient errors, such as networking issues.
1373
- If your task contains operations that can't be retried safely, e.g. database updates,
1374
- it is advisable to annotate it with `@retry(times=0)`.
1375
-
1376
- This can be used in conjunction with the `@catch` decorator. The `@catch`
1377
- decorator will execute a no-op task after all retries have been exhausted,
1378
- ensuring that the flow execution can continue.
1379
-
1380
- Parameters
1381
- ----------
1382
- times : int, default 3
1383
- Number of times to retry this task.
1384
- minutes_between_retries : int, default 2
1385
- Number of minutes between retries.
1386
- """
1387
- ...
1388
-
1389
- @typing.overload
1390
- def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1391
- ...
1392
-
1393
- @typing.overload
1394
- def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1395
- ...
1396
-
1397
- def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
1415
+ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1398
1416
  """
1399
- Specifies the number of times the task corresponding
1400
- to a step needs to be retried.
1401
-
1402
- This decorator is useful for handling transient errors, such as networking issues.
1403
- If your task contains operations that can't be retried safely, e.g. database updates,
1404
- it is advisable to annotate it with `@retry(times=0)`.
1405
-
1406
- This can be used in conjunction with the `@catch` decorator. The `@catch`
1407
- decorator will execute a no-op task after all retries have been exhausted,
1408
- ensuring that the flow execution can continue.
1417
+ The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
1418
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1419
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1420
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
1421
+ starts only after all sensors finish.
1409
1422
 
1410
1423
  Parameters
1411
1424
  ----------
1412
- times : int, default 3
1413
- Number of times to retry this task.
1414
- minutes_between_retries : int, default 2
1415
- Number of minutes between retries.
1425
+ timeout : int
1426
+ Time, in seconds before the task times out and fails. (Default: 3600)
1427
+ poke_interval : int
1428
+ Time in seconds that the job should wait in between each try. (Default: 60)
1429
+ mode : str
1430
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1431
+ exponential_backoff : bool
1432
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1433
+ pool : str
1434
+ the slot pool this task should run in,
1435
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1436
+ soft_fail : bool
1437
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1438
+ name : str
1439
+ Name of the sensor on Airflow
1440
+ description : str
1441
+ Description of sensor in the Airflow UI
1442
+ bucket_key : Union[str, List[str]]
1443
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1444
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
1445
+ bucket_name : str
1446
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1447
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1448
+ wildcard_match : bool
1449
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1450
+ aws_conn_id : str
1451
+ a reference to the s3 connection on Airflow. (Default: None)
1452
+ verify : bool
1453
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1416
1454
  """
1417
1455
  ...
1418
1456
 
@@ -1519,52 +1557,70 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
1519
1557
  """
1520
1558
  ...
1521
1559
 
1522
- @typing.overload
1523
- def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1560
+ def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1524
1561
  """
1525
- Specifies the Conda environment for all steps of the flow.
1562
+ Specifies what flows belong to the same project.
1526
1563
 
1527
- Use `@conda_base` to set common libraries required by all
1528
- steps and use `@conda` to specify step-specific additions.
1564
+ A project-specific namespace is created for all flows that
1565
+ use the same `@project(name)`.
1529
1566
 
1530
1567
  Parameters
1531
1568
  ----------
1532
- packages : Dict[str, str], default {}
1533
- Packages to use for this flow. The key is the name of the package
1534
- and the value is the version to use.
1535
- libraries : Dict[str, str], default {}
1536
- Supported for backward compatibility. When used with packages, packages will take precedence.
1537
- python : str, optional, default None
1538
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1539
- that the version used will correspond to the version of the Python interpreter used to start the run.
1540
- disabled : bool, default False
1541
- If set to True, disables Conda.
1569
+ name : str
1570
+ Project name. Make sure that the name is unique amongst all
1571
+ projects that use the same production scheduler. The name may
1572
+ contain only lowercase alphanumeric characters and underscores.
1573
+
1574
+
1542
1575
  """
1543
1576
  ...
1544
1577
 
1545
1578
  @typing.overload
1546
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1579
+ def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1580
+ """
1581
+ Specifies the times when the flow should be run when running on a
1582
+ production scheduler.
1583
+
1584
+ Parameters
1585
+ ----------
1586
+ hourly : bool, default False
1587
+ Run the workflow hourly.
1588
+ daily : bool, default True
1589
+ Run the workflow daily.
1590
+ weekly : bool, default False
1591
+ Run the workflow weekly.
1592
+ cron : str, optional, default None
1593
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1594
+ specified by this expression.
1595
+ timezone : str, optional, default None
1596
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1597
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1598
+ """
1547
1599
  ...
1548
1600
 
1549
- def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
1601
+ @typing.overload
1602
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1603
+ ...
1604
+
1605
+ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
1550
1606
  """
1551
- Specifies the Conda environment for all steps of the flow.
1552
-
1553
- Use `@conda_base` to set common libraries required by all
1554
- steps and use `@conda` to specify step-specific additions.
1607
+ Specifies the times when the flow should be run when running on a
1608
+ production scheduler.
1555
1609
 
1556
1610
  Parameters
1557
1611
  ----------
1558
- packages : Dict[str, str], default {}
1559
- Packages to use for this flow. The key is the name of the package
1560
- and the value is the version to use.
1561
- libraries : Dict[str, str], default {}
1562
- Supported for backward compatibility. When used with packages, packages will take precedence.
1563
- python : str, optional, default None
1564
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1565
- that the version used will correspond to the version of the Python interpreter used to start the run.
1566
- disabled : bool, default False
1567
- If set to True, disables Conda.
1612
+ hourly : bool, default False
1613
+ Run the workflow hourly.
1614
+ daily : bool, default True
1615
+ Run the workflow daily.
1616
+ weekly : bool, default False
1617
+ Run the workflow weekly.
1618
+ cron : str, optional, default None
1619
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1620
+ specified by this expression.
1621
+ timezone : str, optional, default None
1622
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1623
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1568
1624
  """
1569
1625
  ...
1570
1626
 
@@ -1607,6 +1663,55 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
1607
1663
  """
1608
1664
  ...
1609
1665
 
1666
+ @typing.overload
1667
+ def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1668
+ """
1669
+ Specifies the Conda environment for all steps of the flow.
1670
+
1671
+ Use `@conda_base` to set common libraries required by all
1672
+ steps and use `@conda` to specify step-specific additions.
1673
+
1674
+ Parameters
1675
+ ----------
1676
+ packages : Dict[str, str], default {}
1677
+ Packages to use for this flow. The key is the name of the package
1678
+ and the value is the version to use.
1679
+ libraries : Dict[str, str], default {}
1680
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1681
+ python : str, optional, default None
1682
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1683
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1684
+ disabled : bool, default False
1685
+ If set to True, disables Conda.
1686
+ """
1687
+ ...
1688
+
1689
+ @typing.overload
1690
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1691
+ ...
1692
+
1693
+ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
1694
+ """
1695
+ Specifies the Conda environment for all steps of the flow.
1696
+
1697
+ Use `@conda_base` to set common libraries required by all
1698
+ steps and use `@conda` to specify step-specific additions.
1699
+
1700
+ Parameters
1701
+ ----------
1702
+ packages : Dict[str, str], default {}
1703
+ Packages to use for this flow. The key is the name of the package
1704
+ and the value is the version to use.
1705
+ libraries : Dict[str, str], default {}
1706
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1707
+ python : str, optional, default None
1708
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1709
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1710
+ disabled : bool, default False
1711
+ If set to True, disables Conda.
1712
+ """
1713
+ ...
1714
+
1610
1715
  @typing.overload
1611
1716
  def trigger(*, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1612
1717
  """
@@ -1702,24 +1807,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1702
1807
  """
1703
1808
  ...
1704
1809
 
1705
- def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1706
- """
1707
- Specifies what flows belong to the same project.
1708
-
1709
- A project-specific namespace is created for all flows that
1710
- use the same `@project(name)`.
1711
-
1712
- Parameters
1713
- ----------
1714
- name : str
1715
- Project name. Make sure that the name is unique amongst all
1716
- projects that use the same production scheduler. The name may
1717
- contain only lowercase alphanumeric characters and underscores.
1718
-
1719
-
1720
- """
1721
- ...
1722
-
1723
1810
  def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1724
1811
  """
1725
1812
  The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
@@ -1762,97 +1849,6 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
1762
1849
  """
1763
1850
  ...
1764
1851
 
1765
- def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1766
- """
1767
- The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
1768
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1769
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1770
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1771
- starts only after all sensors finish.
1772
-
1773
- Parameters
1774
- ----------
1775
- timeout : int
1776
- Time, in seconds before the task times out and fails. (Default: 3600)
1777
- poke_interval : int
1778
- Time in seconds that the job should wait in between each try. (Default: 60)
1779
- mode : str
1780
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1781
- exponential_backoff : bool
1782
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1783
- pool : str
1784
- the slot pool this task should run in,
1785
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1786
- soft_fail : bool
1787
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1788
- name : str
1789
- Name of the sensor on Airflow
1790
- description : str
1791
- Description of sensor in the Airflow UI
1792
- bucket_key : Union[str, List[str]]
1793
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1794
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1795
- bucket_name : str
1796
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1797
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1798
- wildcard_match : bool
1799
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1800
- aws_conn_id : str
1801
- a reference to the s3 connection on Airflow. (Default: None)
1802
- verify : bool
1803
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1804
- """
1805
- ...
1806
-
1807
- @typing.overload
1808
- def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1809
- """
1810
- Specifies the times when the flow should be run when running on a
1811
- production scheduler.
1812
-
1813
- Parameters
1814
- ----------
1815
- hourly : bool, default False
1816
- Run the workflow hourly.
1817
- daily : bool, default True
1818
- Run the workflow daily.
1819
- weekly : bool, default False
1820
- Run the workflow weekly.
1821
- cron : str, optional, default None
1822
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1823
- specified by this expression.
1824
- timezone : str, optional, default None
1825
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1826
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1827
- """
1828
- ...
1829
-
1830
- @typing.overload
1831
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1832
- ...
1833
-
1834
- def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
1835
- """
1836
- Specifies the times when the flow should be run when running on a
1837
- production scheduler.
1838
-
1839
- Parameters
1840
- ----------
1841
- hourly : bool, default False
1842
- Run the workflow hourly.
1843
- daily : bool, default True
1844
- Run the workflow daily.
1845
- weekly : bool, default False
1846
- Run the workflow weekly.
1847
- cron : str, optional, default None
1848
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1849
- specified by this expression.
1850
- timezone : str, optional, default None
1851
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1852
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1853
- """
1854
- ...
1855
-
1856
1852
  def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
1857
1853
  """
1858
1854
  Switch namespace to the one provided.