ob-metaflow 2.11.13.1__py2.py3-none-any.whl โ 2.19.7.1rc0__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.
- metaflow/R.py +10 -7
- metaflow/__init__.py +40 -25
- metaflow/_vendor/imghdr/__init__.py +186 -0
- metaflow/_vendor/importlib_metadata/__init__.py +1063 -0
- metaflow/_vendor/importlib_metadata/_adapters.py +68 -0
- metaflow/_vendor/importlib_metadata/_collections.py +30 -0
- metaflow/_vendor/importlib_metadata/_compat.py +71 -0
- metaflow/_vendor/importlib_metadata/_functools.py +104 -0
- metaflow/_vendor/importlib_metadata/_itertools.py +73 -0
- metaflow/_vendor/importlib_metadata/_meta.py +48 -0
- metaflow/_vendor/importlib_metadata/_text.py +99 -0
- metaflow/_vendor/importlib_metadata/py.typed +0 -0
- metaflow/_vendor/typeguard/__init__.py +48 -0
- metaflow/_vendor/typeguard/_checkers.py +1070 -0
- metaflow/_vendor/typeguard/_config.py +108 -0
- metaflow/_vendor/typeguard/_decorators.py +233 -0
- metaflow/_vendor/typeguard/_exceptions.py +42 -0
- metaflow/_vendor/typeguard/_functions.py +308 -0
- metaflow/_vendor/typeguard/_importhook.py +213 -0
- metaflow/_vendor/typeguard/_memo.py +48 -0
- metaflow/_vendor/typeguard/_pytest_plugin.py +127 -0
- metaflow/_vendor/typeguard/_suppression.py +86 -0
- metaflow/_vendor/typeguard/_transformer.py +1229 -0
- metaflow/_vendor/typeguard/_union_transformer.py +55 -0
- metaflow/_vendor/typeguard/_utils.py +173 -0
- metaflow/_vendor/typeguard/py.typed +0 -0
- metaflow/_vendor/typing_extensions.py +3641 -0
- metaflow/_vendor/v3_7/importlib_metadata/__init__.py +1063 -0
- metaflow/_vendor/v3_7/importlib_metadata/_adapters.py +68 -0
- metaflow/_vendor/v3_7/importlib_metadata/_collections.py +30 -0
- metaflow/_vendor/v3_7/importlib_metadata/_compat.py +71 -0
- metaflow/_vendor/v3_7/importlib_metadata/_functools.py +104 -0
- metaflow/_vendor/v3_7/importlib_metadata/_itertools.py +73 -0
- metaflow/_vendor/v3_7/importlib_metadata/_meta.py +48 -0
- metaflow/_vendor/v3_7/importlib_metadata/_text.py +99 -0
- metaflow/_vendor/v3_7/importlib_metadata/py.typed +0 -0
- metaflow/_vendor/v3_7/typeguard/__init__.py +48 -0
- metaflow/_vendor/v3_7/typeguard/_checkers.py +906 -0
- metaflow/_vendor/v3_7/typeguard/_config.py +108 -0
- metaflow/_vendor/v3_7/typeguard/_decorators.py +237 -0
- metaflow/_vendor/v3_7/typeguard/_exceptions.py +42 -0
- metaflow/_vendor/v3_7/typeguard/_functions.py +310 -0
- metaflow/_vendor/v3_7/typeguard/_importhook.py +213 -0
- metaflow/_vendor/v3_7/typeguard/_memo.py +48 -0
- metaflow/_vendor/v3_7/typeguard/_pytest_plugin.py +100 -0
- metaflow/_vendor/v3_7/typeguard/_suppression.py +88 -0
- metaflow/_vendor/v3_7/typeguard/_transformer.py +1207 -0
- metaflow/_vendor/v3_7/typeguard/_union_transformer.py +54 -0
- metaflow/_vendor/v3_7/typeguard/_utils.py +169 -0
- metaflow/_vendor/v3_7/typeguard/py.typed +0 -0
- metaflow/_vendor/v3_7/typing_extensions.py +3072 -0
- metaflow/_vendor/yaml/__init__.py +427 -0
- metaflow/_vendor/yaml/composer.py +139 -0
- metaflow/_vendor/yaml/constructor.py +748 -0
- metaflow/_vendor/yaml/cyaml.py +101 -0
- metaflow/_vendor/yaml/dumper.py +62 -0
- metaflow/_vendor/yaml/emitter.py +1137 -0
- metaflow/_vendor/yaml/error.py +75 -0
- metaflow/_vendor/yaml/events.py +86 -0
- metaflow/_vendor/yaml/loader.py +63 -0
- metaflow/_vendor/yaml/nodes.py +49 -0
- metaflow/_vendor/yaml/parser.py +589 -0
- metaflow/_vendor/yaml/reader.py +185 -0
- metaflow/_vendor/yaml/representer.py +389 -0
- metaflow/_vendor/yaml/resolver.py +227 -0
- metaflow/_vendor/yaml/scanner.py +1435 -0
- metaflow/_vendor/yaml/serializer.py +111 -0
- metaflow/_vendor/yaml/tokens.py +104 -0
- metaflow/cards.py +5 -0
- metaflow/cli.py +331 -785
- metaflow/cli_args.py +17 -0
- metaflow/cli_components/__init__.py +0 -0
- metaflow/cli_components/dump_cmd.py +96 -0
- metaflow/cli_components/init_cmd.py +52 -0
- metaflow/cli_components/run_cmds.py +546 -0
- metaflow/cli_components/step_cmd.py +334 -0
- metaflow/cli_components/utils.py +140 -0
- metaflow/client/__init__.py +1 -0
- metaflow/client/core.py +467 -73
- metaflow/client/filecache.py +75 -35
- metaflow/clone_util.py +7 -1
- metaflow/cmd/code/__init__.py +231 -0
- metaflow/cmd/develop/stub_generator.py +756 -288
- metaflow/cmd/develop/stubs.py +12 -28
- metaflow/cmd/main_cli.py +6 -4
- metaflow/cmd/make_wrapper.py +78 -0
- metaflow/datastore/__init__.py +1 -0
- metaflow/datastore/content_addressed_store.py +41 -10
- metaflow/datastore/datastore_set.py +11 -2
- metaflow/datastore/flow_datastore.py +156 -10
- metaflow/datastore/spin_datastore.py +91 -0
- metaflow/datastore/task_datastore.py +154 -39
- metaflow/debug.py +5 -0
- metaflow/decorators.py +404 -78
- metaflow/exception.py +8 -2
- metaflow/extension_support/__init__.py +527 -376
- metaflow/extension_support/_empty_file.py +2 -2
- metaflow/extension_support/plugins.py +49 -31
- metaflow/flowspec.py +482 -33
- metaflow/graph.py +210 -42
- metaflow/includefile.py +84 -40
- metaflow/lint.py +141 -22
- metaflow/meta_files.py +13 -0
- metaflow/{metadata โ metadata_provider}/heartbeat.py +24 -8
- metaflow/{metadata โ metadata_provider}/metadata.py +86 -1
- metaflow/metaflow_config.py +175 -28
- metaflow/metaflow_config_funcs.py +51 -3
- metaflow/metaflow_current.py +4 -10
- metaflow/metaflow_environment.py +139 -53
- metaflow/metaflow_git.py +115 -0
- metaflow/metaflow_profile.py +18 -0
- metaflow/metaflow_version.py +150 -66
- metaflow/mflog/__init__.py +4 -3
- metaflow/mflog/save_logs.py +2 -2
- metaflow/multicore_utils.py +31 -14
- metaflow/package/__init__.py +673 -0
- metaflow/packaging_sys/__init__.py +880 -0
- metaflow/packaging_sys/backend.py +128 -0
- metaflow/packaging_sys/distribution_support.py +153 -0
- metaflow/packaging_sys/tar_backend.py +99 -0
- metaflow/packaging_sys/utils.py +54 -0
- metaflow/packaging_sys/v1.py +527 -0
- metaflow/parameters.py +149 -28
- metaflow/plugins/__init__.py +74 -5
- metaflow/plugins/airflow/airflow.py +40 -25
- metaflow/plugins/airflow/airflow_cli.py +22 -5
- metaflow/plugins/airflow/airflow_decorator.py +1 -1
- metaflow/plugins/airflow/airflow_utils.py +5 -3
- metaflow/plugins/airflow/sensors/base_sensor.py +4 -4
- metaflow/plugins/airflow/sensors/external_task_sensor.py +2 -2
- metaflow/plugins/airflow/sensors/s3_sensor.py +2 -2
- metaflow/plugins/argo/argo_client.py +78 -33
- metaflow/plugins/argo/argo_events.py +6 -6
- metaflow/plugins/argo/argo_workflows.py +2410 -527
- metaflow/plugins/argo/argo_workflows_cli.py +571 -121
- metaflow/plugins/argo/argo_workflows_decorator.py +43 -12
- metaflow/plugins/argo/argo_workflows_deployer.py +106 -0
- metaflow/plugins/argo/argo_workflows_deployer_objects.py +453 -0
- metaflow/plugins/argo/capture_error.py +73 -0
- metaflow/plugins/argo/conditional_input_paths.py +35 -0
- metaflow/plugins/argo/exit_hooks.py +209 -0
- metaflow/plugins/argo/jobset_input_paths.py +15 -0
- metaflow/plugins/argo/param_val.py +19 -0
- metaflow/plugins/aws/aws_client.py +10 -3
- metaflow/plugins/aws/aws_utils.py +55 -2
- metaflow/plugins/aws/batch/batch.py +72 -5
- metaflow/plugins/aws/batch/batch_cli.py +33 -10
- metaflow/plugins/aws/batch/batch_client.py +4 -3
- metaflow/plugins/aws/batch/batch_decorator.py +102 -35
- metaflow/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.py +13 -10
- metaflow/plugins/aws/step_functions/dynamo_db_client.py +0 -3
- metaflow/plugins/aws/step_functions/production_token.py +1 -1
- metaflow/plugins/aws/step_functions/step_functions.py +65 -8
- metaflow/plugins/aws/step_functions/step_functions_cli.py +101 -7
- metaflow/plugins/aws/step_functions/step_functions_decorator.py +1 -2
- metaflow/plugins/aws/step_functions/step_functions_deployer.py +97 -0
- metaflow/plugins/aws/step_functions/step_functions_deployer_objects.py +264 -0
- metaflow/plugins/azure/azure_exceptions.py +1 -1
- metaflow/plugins/azure/azure_secret_manager_secrets_provider.py +240 -0
- metaflow/plugins/azure/azure_tail.py +1 -1
- metaflow/plugins/azure/includefile_support.py +2 -0
- metaflow/plugins/cards/card_cli.py +66 -30
- metaflow/plugins/cards/card_creator.py +25 -1
- metaflow/plugins/cards/card_datastore.py +21 -49
- metaflow/plugins/cards/card_decorator.py +132 -8
- metaflow/plugins/cards/card_modules/basic.py +112 -17
- metaflow/plugins/cards/card_modules/bundle.css +1 -1
- metaflow/plugins/cards/card_modules/card.py +16 -1
- metaflow/plugins/cards/card_modules/chevron/renderer.py +1 -1
- metaflow/plugins/cards/card_modules/components.py +665 -28
- metaflow/plugins/cards/card_modules/convert_to_native_type.py +36 -7
- metaflow/plugins/cards/card_modules/json_viewer.py +232 -0
- metaflow/plugins/cards/card_modules/main.css +1 -0
- metaflow/plugins/cards/card_modules/main.js +68 -49
- metaflow/plugins/cards/card_modules/renderer_tools.py +1 -0
- metaflow/plugins/cards/card_modules/test_cards.py +26 -12
- metaflow/plugins/cards/card_server.py +39 -14
- metaflow/plugins/cards/component_serializer.py +2 -9
- metaflow/plugins/cards/metadata.py +22 -0
- metaflow/plugins/catch_decorator.py +9 -0
- metaflow/plugins/datastores/azure_storage.py +10 -1
- metaflow/plugins/datastores/gs_storage.py +6 -2
- metaflow/plugins/datastores/local_storage.py +12 -6
- metaflow/plugins/datastores/spin_storage.py +12 -0
- metaflow/plugins/datatools/local.py +2 -0
- metaflow/plugins/datatools/s3/s3.py +126 -75
- metaflow/plugins/datatools/s3/s3op.py +254 -121
- metaflow/plugins/env_escape/__init__.py +3 -3
- metaflow/plugins/env_escape/client_modules.py +102 -72
- metaflow/plugins/env_escape/server.py +7 -0
- metaflow/plugins/env_escape/stub.py +24 -5
- metaflow/plugins/events_decorator.py +343 -185
- metaflow/plugins/exit_hook/__init__.py +0 -0
- metaflow/plugins/exit_hook/exit_hook_decorator.py +46 -0
- metaflow/plugins/exit_hook/exit_hook_script.py +52 -0
- metaflow/plugins/gcp/__init__.py +1 -1
- metaflow/plugins/gcp/gcp_secret_manager_secrets_provider.py +11 -6
- metaflow/plugins/gcp/gs_tail.py +10 -6
- metaflow/plugins/gcp/includefile_support.py +3 -0
- metaflow/plugins/kubernetes/kube_utils.py +108 -0
- metaflow/plugins/kubernetes/kubernetes.py +411 -130
- metaflow/plugins/kubernetes/kubernetes_cli.py +168 -36
- metaflow/plugins/kubernetes/kubernetes_client.py +104 -2
- metaflow/plugins/kubernetes/kubernetes_decorator.py +246 -88
- metaflow/plugins/kubernetes/kubernetes_job.py +253 -581
- metaflow/plugins/kubernetes/kubernetes_jobsets.py +1071 -0
- metaflow/plugins/kubernetes/spot_metadata_cli.py +69 -0
- metaflow/plugins/kubernetes/spot_monitor_sidecar.py +109 -0
- metaflow/plugins/logs_cli.py +359 -0
- metaflow/plugins/{metadata โ metadata_providers}/local.py +144 -84
- metaflow/plugins/{metadata โ metadata_providers}/service.py +103 -26
- metaflow/plugins/metadata_providers/spin.py +16 -0
- metaflow/plugins/package_cli.py +36 -24
- metaflow/plugins/parallel_decorator.py +128 -11
- metaflow/plugins/parsers.py +16 -0
- metaflow/plugins/project_decorator.py +51 -5
- metaflow/plugins/pypi/bootstrap.py +357 -105
- metaflow/plugins/pypi/conda_decorator.py +82 -81
- metaflow/plugins/pypi/conda_environment.py +187 -52
- metaflow/plugins/pypi/micromamba.py +157 -47
- metaflow/plugins/pypi/parsers.py +268 -0
- metaflow/plugins/pypi/pip.py +88 -13
- metaflow/plugins/pypi/pypi_decorator.py +37 -1
- metaflow/plugins/pypi/utils.py +48 -2
- metaflow/plugins/resources_decorator.py +2 -2
- metaflow/plugins/secrets/__init__.py +3 -0
- metaflow/plugins/secrets/secrets_decorator.py +26 -181
- metaflow/plugins/secrets/secrets_func.py +49 -0
- metaflow/plugins/secrets/secrets_spec.py +101 -0
- metaflow/plugins/secrets/utils.py +74 -0
- metaflow/plugins/tag_cli.py +4 -7
- metaflow/plugins/test_unbounded_foreach_decorator.py +41 -6
- metaflow/plugins/timeout_decorator.py +3 -3
- metaflow/plugins/uv/__init__.py +0 -0
- metaflow/plugins/uv/bootstrap.py +128 -0
- metaflow/plugins/uv/uv_environment.py +72 -0
- metaflow/procpoll.py +1 -1
- metaflow/pylint_wrapper.py +5 -1
- metaflow/runner/__init__.py +0 -0
- metaflow/runner/click_api.py +717 -0
- metaflow/runner/deployer.py +470 -0
- metaflow/runner/deployer_impl.py +201 -0
- metaflow/runner/metaflow_runner.py +714 -0
- metaflow/runner/nbdeploy.py +132 -0
- metaflow/runner/nbrun.py +225 -0
- metaflow/runner/subprocess_manager.py +650 -0
- metaflow/runner/utils.py +335 -0
- metaflow/runtime.py +1078 -260
- metaflow/sidecar/sidecar_worker.py +1 -1
- metaflow/system/__init__.py +5 -0
- metaflow/system/system_logger.py +85 -0
- metaflow/system/system_monitor.py +108 -0
- metaflow/system/system_utils.py +19 -0
- metaflow/task.py +521 -225
- metaflow/tracing/__init__.py +7 -7
- metaflow/tracing/span_exporter.py +31 -38
- metaflow/tracing/tracing_modules.py +38 -43
- metaflow/tuple_util.py +27 -0
- metaflow/user_configs/__init__.py +0 -0
- metaflow/user_configs/config_options.py +563 -0
- metaflow/user_configs/config_parameters.py +598 -0
- metaflow/user_decorators/__init__.py +0 -0
- metaflow/user_decorators/common.py +144 -0
- metaflow/user_decorators/mutable_flow.py +512 -0
- metaflow/user_decorators/mutable_step.py +424 -0
- metaflow/user_decorators/user_flow_decorator.py +264 -0
- metaflow/user_decorators/user_step_decorator.py +749 -0
- metaflow/util.py +243 -27
- metaflow/vendor.py +23 -7
- metaflow/version.py +1 -1
- ob_metaflow-2.19.7.1rc0.data/data/share/metaflow/devtools/Makefile +355 -0
- ob_metaflow-2.19.7.1rc0.data/data/share/metaflow/devtools/Tiltfile +726 -0
- ob_metaflow-2.19.7.1rc0.data/data/share/metaflow/devtools/pick_services.sh +105 -0
- ob_metaflow-2.19.7.1rc0.dist-info/METADATA +87 -0
- ob_metaflow-2.19.7.1rc0.dist-info/RECORD +445 -0
- {ob_metaflow-2.11.13.1.dist-info โ ob_metaflow-2.19.7.1rc0.dist-info}/WHEEL +1 -1
- {ob_metaflow-2.11.13.1.dist-info โ ob_metaflow-2.19.7.1rc0.dist-info}/entry_points.txt +1 -0
- metaflow/_vendor/v3_5/__init__.py +0 -1
- metaflow/_vendor/v3_5/importlib_metadata/__init__.py +0 -644
- metaflow/_vendor/v3_5/importlib_metadata/_compat.py +0 -152
- metaflow/package.py +0 -188
- ob_metaflow-2.11.13.1.dist-info/METADATA +0 -85
- ob_metaflow-2.11.13.1.dist-info/RECORD +0 -308
- /metaflow/_vendor/{v3_5/zipp.py โ zipp.py} +0 -0
- /metaflow/{metadata โ metadata_provider}/__init__.py +0 -0
- /metaflow/{metadata โ metadata_provider}/util.py +0 -0
- /metaflow/plugins/{metadata โ metadata_providers}/__init__.py +0 -0
- {ob_metaflow-2.11.13.1.dist-info โ ob_metaflow-2.19.7.1rc0.dist-info/licenses}/LICENSE +0 -0
- {ob_metaflow-2.11.13.1.dist-info โ ob_metaflow-2.19.7.1rc0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
SHELL := /bin/bash
|
|
2
|
+
.SHELLFLAGS := -eu -o pipefail -c
|
|
3
|
+
|
|
4
|
+
help:
|
|
5
|
+
@echo "Available targets:"
|
|
6
|
+
@echo " up - Start the development environment"
|
|
7
|
+
@echo " shell - Switch to development environment's shell"
|
|
8
|
+
@echo " ui - Open Metaflow UI"
|
|
9
|
+
@echo " dashboard - Open Minikube dashboard"
|
|
10
|
+
@echo " down - Stop and clean up the environment"
|
|
11
|
+
@echo " all-up - Start the development environment with all services"
|
|
12
|
+
@echo " help - Show this help message"
|
|
13
|
+
|
|
14
|
+
HELM_VERSION := v3.14.0
|
|
15
|
+
MINIKUBE_VERSION := v1.32.0
|
|
16
|
+
TILT_VERSION := v0.33.11
|
|
17
|
+
GUM_VERSION := v0.15.2
|
|
18
|
+
|
|
19
|
+
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
20
|
+
MKFILE_DIR := $(dir $(MKFILE_PATH))
|
|
21
|
+
DEVTOOLS_DIR := $(MKFILE_DIR).devtools
|
|
22
|
+
PICK_SERVICES := $(MKFILE_DIR)pick_services.sh
|
|
23
|
+
MINIKUBE_DIR := $(DEVTOOLS_DIR)/minikube
|
|
24
|
+
MINIKUBE := $(MINIKUBE_DIR)/minikube
|
|
25
|
+
HELM_DIR := $(DEVTOOLS_DIR)/helm
|
|
26
|
+
TILT_DIR := $(DEVTOOLS_DIR)/tilt
|
|
27
|
+
TILT := $(TILT_DIR)/tilt
|
|
28
|
+
TILTFILE := $(MKFILE_DIR)/Tiltfile
|
|
29
|
+
MAKE_CMD := $(MAKE) -f "$(MKFILE_PATH)"
|
|
30
|
+
|
|
31
|
+
MINIKUBE_CPUS ?= 4
|
|
32
|
+
MINIKUBE_MEMORY ?= 6144
|
|
33
|
+
MINIKUBE_DISK_SIZE ?= 20g
|
|
34
|
+
WAIT_TIMEOUT ?= 300
|
|
35
|
+
|
|
36
|
+
ifeq ($(shell uname), Darwin)
|
|
37
|
+
minikube_os = darwin
|
|
38
|
+
tilt_os = mac
|
|
39
|
+
else
|
|
40
|
+
minikube_os = linux
|
|
41
|
+
tilt_os = linux
|
|
42
|
+
endif
|
|
43
|
+
|
|
44
|
+
ifeq ($(shell uname -m), x86_64)
|
|
45
|
+
arch = amd64
|
|
46
|
+
tilt_arch = x86_64
|
|
47
|
+
else
|
|
48
|
+
arch = arm64
|
|
49
|
+
tilt_arch = arm64
|
|
50
|
+
endif
|
|
51
|
+
|
|
52
|
+
# TODO: Move scripts to a folder
|
|
53
|
+
|
|
54
|
+
install-helm:
|
|
55
|
+
@if ! command -v helm >/dev/null 2>&1; then \
|
|
56
|
+
echo "๐ฅ Installing Helm $(HELM_VERSION)..."; \
|
|
57
|
+
mkdir -p "$(HELM_DIR)"; \
|
|
58
|
+
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
|
|
59
|
+
| HELM_INSTALL_VERSION="$(HELM_VERSION)" \
|
|
60
|
+
USE_SUDO="false" \
|
|
61
|
+
PATH="$(HELM_DIR):$$PATH" \
|
|
62
|
+
HELM_INSTALL_DIR="$(HELM_DIR)" \
|
|
63
|
+
bash; \
|
|
64
|
+
chmod +x "$(HELM_DIR)/helm"; \
|
|
65
|
+
echo "โ
Helm installation complete"; \
|
|
66
|
+
else \
|
|
67
|
+
echo "โ
Helm is already installed at $$(command -v helm)"; \
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
check-docker:
|
|
71
|
+
@if ! command -v docker >/dev/null 2>&1; then \
|
|
72
|
+
echo "โ Docker is not installed. Please install Docker first: https://docs.docker.com/get-docker/"; \
|
|
73
|
+
exit 1; \
|
|
74
|
+
fi
|
|
75
|
+
@echo "๐ Checking Docker daemon..."
|
|
76
|
+
@if [ "$(shell uname)" = "Darwin" ]; then \
|
|
77
|
+
open -a Docker || (echo "โ Please start Docker Desktop" && exit 1); \
|
|
78
|
+
else \
|
|
79
|
+
docker info >/dev/null 2>&1 || (echo "โ Docker daemon is not running." && exit 1); \
|
|
80
|
+
fi
|
|
81
|
+
@echo "โ
Docker is running"
|
|
82
|
+
|
|
83
|
+
install-brew:
|
|
84
|
+
@if [ "$(shell uname)" = "Darwin" ] && ! command -v brew >/dev/null 2>&1; then \
|
|
85
|
+
echo "๐ฅ Installing Homebrew..."; \
|
|
86
|
+
/bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"; \
|
|
87
|
+
echo "โ
Homebrew installation complete"; \
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
install-curl:
|
|
91
|
+
@if ! command -v curl >/dev/null 2>&1; then \
|
|
92
|
+
echo "๐ฅ Installing curl..."; \
|
|
93
|
+
if [ "$(shell uname)" = "Darwin" ]; then \
|
|
94
|
+
HOMEBREW_NO_AUTO_UPDATE=1 brew install curl; \
|
|
95
|
+
elif command -v apt-get >/dev/null 2>&1; then \
|
|
96
|
+
sudo apt-get update && sudo apt-get install -y curl; \
|
|
97
|
+
elif command -v yum >/dev/null 2>&1; then \
|
|
98
|
+
sudo yum install -y curl; \
|
|
99
|
+
elif command -v dnf >/dev/null 2>&1; then \
|
|
100
|
+
sudo dnf install -y curl; \
|
|
101
|
+
else \
|
|
102
|
+
echo "โ Could not install curl. Please install manually."; \
|
|
103
|
+
exit 1; \
|
|
104
|
+
fi; \
|
|
105
|
+
echo "โ
curl installation complete"; \
|
|
106
|
+
fi
|
|
107
|
+
|
|
108
|
+
install-gum:
|
|
109
|
+
@echo "๐ Checking if gum is installed..."
|
|
110
|
+
@if ! command -v gum >/dev/null 2>&1; then \
|
|
111
|
+
echo "๐ฅ Installing gum..."; \
|
|
112
|
+
if [ "$(shell uname)" = "Darwin" ]; then \
|
|
113
|
+
HOMEBREW_NO_AUTO_UPDATE=1 brew install gum|| { echo "โ Failed to install gum via Homebrew"; exit 1; }; \
|
|
114
|
+
elif command -v apt-get >/dev/null 2>&1; then \
|
|
115
|
+
curl -fsSL -o /tmp/gum.deb \
|
|
116
|
+
"https://github.com/charmbracelet/gum/releases/download/$(GUM_VERSION)/gum_$(GUM_VERSION:v%=%)_$(arch).deb"; \
|
|
117
|
+
sudo apt-get update -qq; \
|
|
118
|
+
sudo apt-get install -y /tmp/gum.deb || sudo dpkg -i /tmp/gum.deb; \
|
|
119
|
+
rm -f /tmp/gum.deb; \
|
|
120
|
+
else \
|
|
121
|
+
echo "โ Could not determine how to install gum for your platform. Please install manually."; \
|
|
122
|
+
exit 1; \
|
|
123
|
+
fi; \
|
|
124
|
+
echo "โ
gum installation complete"; \
|
|
125
|
+
else \
|
|
126
|
+
echo "โ
gum is already installed."; \
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
setup-minikube:
|
|
130
|
+
@if [ ! -f "$(MINIKUBE)" ]; then \
|
|
131
|
+
echo "๐ฅ Installing Minikube $(MINIKUBE_VERSION)"; \
|
|
132
|
+
mkdir -p $(MINIKUBE_DIR); \
|
|
133
|
+
curl -L --fail https://github.com/kubernetes/minikube/releases/download/$(MINIKUBE_VERSION)/minikube-$(minikube_os)-$(arch) -o $(MINIKUBE) || (echo "โ Failed to download minikube" && exit 1); \
|
|
134
|
+
chmod +x $(MINIKUBE); \
|
|
135
|
+
echo "โ
Minikube $(MINIKUBE_VERSION) installed successfully"; \
|
|
136
|
+
fi
|
|
137
|
+
@echo "๐ง Setting up Minikube $(MINIKUBE_VERSION) cluster..."
|
|
138
|
+
@if ! $(MINIKUBE) status >/dev/null 2>&1; then \
|
|
139
|
+
echo "๐ Starting new Minikube $(MINIKUBE_VERSION) cluster..."; \
|
|
140
|
+
$(MINIKUBE) start \
|
|
141
|
+
--cpus $(MINIKUBE_CPUS) \
|
|
142
|
+
--memory $(MINIKUBE_MEMORY) \
|
|
143
|
+
--disk-size $(MINIKUBE_DISK_SIZE) \
|
|
144
|
+
--driver docker \
|
|
145
|
+
|| { echo "โ Failed to start Minikube (check if Docker is running)"; exit 1; }; \
|
|
146
|
+
echo "๐ Enabling metrics-server and dashboard (quietly)..."; \
|
|
147
|
+
$(MINIKUBE) addons enable metrics-server >/dev/null 2>&1; \
|
|
148
|
+
$(MINIKUBE) addons enable dashboard >/dev/null 2>&1; \
|
|
149
|
+
else \
|
|
150
|
+
echo "โ
Minikube $(MINIKUBE_VERSION) cluster is already running"; \
|
|
151
|
+
fi
|
|
152
|
+
@echo "๐ Minikube $(MINIKUBE_VERSION) cluster is ready!"
|
|
153
|
+
|
|
154
|
+
setup-tilt:
|
|
155
|
+
@if [ ! -f "$(TILT)" ]; then \
|
|
156
|
+
echo "๐ฅ Installing Tilt $(TILT_VERSION)"; \
|
|
157
|
+
mkdir -p $(TILT_DIR); \
|
|
158
|
+
(curl -L https://github.com/tilt-dev/tilt/releases/download/$(TILT_VERSION)/tilt.$(TILT_VERSION:v%=%).$(tilt_os).$(tilt_arch).tar.gz | tar -xz -C $(TILT_DIR)) && echo "โ
Tilt $(TILT_VERSION) installed successfully" || (echo "โ Failed to install Tilt" && exit 1); \
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
tunnel:
|
|
162
|
+
$(MINIKUBE) tunnel
|
|
163
|
+
|
|
164
|
+
teardown-minikube:
|
|
165
|
+
@echo "๐ Stopping Minikube $(MINIKUBE_VERSION) cluster..."
|
|
166
|
+
-$(MINIKUBE) stop
|
|
167
|
+
@echo "๐๏ธ Deleting Minikube $(MINIKUBE_VERSION) cluster..."
|
|
168
|
+
-$(MINIKUBE) delete --all
|
|
169
|
+
@echo "๐งน Removing Minikube binary..."
|
|
170
|
+
-rm -rf $(MINIKUBE_DIR)
|
|
171
|
+
@echo "โ
Minikube $(MINIKUBE_VERSION) teardown complete"
|
|
172
|
+
|
|
173
|
+
dashboard:
|
|
174
|
+
@echo "๐ Opening Minikube Dashboard..."
|
|
175
|
+
@$(MINIKUBE) dashboard
|
|
176
|
+
|
|
177
|
+
# make shell is symlinked to metaflow-dev shell by metaflow
|
|
178
|
+
up: install-brew check-docker install-curl install-gum setup-minikube install-helm setup-tilt
|
|
179
|
+
@echo "๐ Starting up (may require sudo access)..."
|
|
180
|
+
@mkdir -p $(DEVTOOLS_DIR)
|
|
181
|
+
@echo '#!/bin/bash' > $(DEVTOOLS_DIR)/start.sh
|
|
182
|
+
@echo 'set -e' >> $(DEVTOOLS_DIR)/start.sh
|
|
183
|
+
@echo 'trap "exit" INT TERM' >> $(DEVTOOLS_DIR)/start.sh
|
|
184
|
+
@echo 'trap "kill 0" EXIT' >> $(DEVTOOLS_DIR)/start.sh
|
|
185
|
+
@echo 'eval $$($(MINIKUBE) docker-env)' >> $(DEVTOOLS_DIR)/start.sh
|
|
186
|
+
@echo 'if [ -n "$$SERVICES_OVERRIDE" ]; then' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
187
|
+
@echo ' echo "๐ Using user-provided list of services: $$SERVICES_OVERRIDE"' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
188
|
+
@echo ' SERVICES="$$SERVICES_OVERRIDE"' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
189
|
+
@echo 'else' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
190
|
+
@echo ' echo "๐ Selecting services..."' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
191
|
+
@echo ' SERVICES=$$($(PICK_SERVICES))' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
192
|
+
@echo 'fi' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
193
|
+
@echo 'PATH="$(MINIKUBE_DIR):$(TILT_DIR):$$PATH" $(MINIKUBE) tunnel &' >> $(DEVTOOLS_DIR)/start.sh
|
|
194
|
+
@echo 'echo -e "๐ Starting Tilt with selected services..."' >> $(DEVTOOLS_DIR)/start.sh
|
|
195
|
+
@echo 'echo -e "\033[1;38;5;46m\n๐ฅ \033[1;38;5;196mNext Steps:\033[0;38;5;46m Use \033[3mmetaflow-dev shell\033[23m to switch to the development\n environment'\''s shell and start executing your Metaflow flows.\n\033[0m"' >> "$(DEVTOOLS_DIR)/start.sh"
|
|
196
|
+
@echo 'PATH="$(HELM_DIR):$(MINIKUBE_DIR):$(TILT_DIR):$$PATH" SERVICES="$$SERVICES" tilt up -f $(TILTFILE)' >> $(DEVTOOLS_DIR)/start.sh
|
|
197
|
+
@echo 'wait' >> $(DEVTOOLS_DIR)/start.sh
|
|
198
|
+
@chmod +x $(DEVTOOLS_DIR)/start.sh
|
|
199
|
+
@$(DEVTOOLS_DIR)/start.sh
|
|
200
|
+
|
|
201
|
+
all-up:
|
|
202
|
+
@echo "๐ Starting up all services..."
|
|
203
|
+
SERVICES_OVERRIDE=all $(MAKE_CMD) up
|
|
204
|
+
|
|
205
|
+
down:
|
|
206
|
+
@echo "๐ Stopping all services..."
|
|
207
|
+
@-pkill -f "$(MINIKUBE) tunnel" 2>/dev/null || true
|
|
208
|
+
@echo "โน๏ธ Stopping Tilt..."
|
|
209
|
+
@echo "๐งน Cleaning up Minikube..."
|
|
210
|
+
$(MAKE_CMD) teardown-minikube
|
|
211
|
+
@echo "๐๏ธ Removing Tilt binary and directory..."
|
|
212
|
+
-rm -rf $(TILT_DIR)
|
|
213
|
+
@echo "๐งน Removing temporary scripts..."
|
|
214
|
+
-rm -rf $(DEVTOOLS_DIR)
|
|
215
|
+
@echo "โจ All done!"
|
|
216
|
+
|
|
217
|
+
shell: setup-tilt
|
|
218
|
+
@echo "โณ Checking if development environment is up..."
|
|
219
|
+
@set -eu; \
|
|
220
|
+
for i in $$(seq 1 90); do \
|
|
221
|
+
if "$(TILT)" get session >/dev/null 2>&1; then \
|
|
222
|
+
found_session=1; \
|
|
223
|
+
break; \
|
|
224
|
+
else \
|
|
225
|
+
sleep 2; \
|
|
226
|
+
fi; \
|
|
227
|
+
done; \
|
|
228
|
+
if [ -z "$${found_session:-}" ]; then \
|
|
229
|
+
echo "โ Development environment is not up."; \
|
|
230
|
+
echo " Please run 'metaflow-dev up' in another terminal, then re-run 'metaflow-dev shell'."; \
|
|
231
|
+
exit 1; \
|
|
232
|
+
fi
|
|
233
|
+
@echo "โณ Waiting for development environment to be ready..."
|
|
234
|
+
@while true; do \
|
|
235
|
+
"$(TILT)" get uiresource generate-configs >/dev/null 2>&1; \
|
|
236
|
+
status=$$?; \
|
|
237
|
+
if [ $$status -eq 0 ]; then \
|
|
238
|
+
if ! "$(TILT)" wait --for=condition=Ready uiresource/generate-configs --timeout=300s; then \
|
|
239
|
+
echo "โ Timed out waiting for development environment to be ready."; \
|
|
240
|
+
exit 1; \
|
|
241
|
+
fi; \
|
|
242
|
+
break; \
|
|
243
|
+
elif [ $$status -eq 127 ]; then \
|
|
244
|
+
echo "โ Development environment is not up."; \
|
|
245
|
+
echo " Please run 'metaflow-dev up' in another terminal, then re-run 'metaflow-dev shell'."; \
|
|
246
|
+
exit 1; \
|
|
247
|
+
else \
|
|
248
|
+
sleep 1; \
|
|
249
|
+
fi; \
|
|
250
|
+
done
|
|
251
|
+
@echo "๐ง Starting a new shell for development environment..."
|
|
252
|
+
@bash -c '\
|
|
253
|
+
if [ -n "$$SHELL" ]; then \
|
|
254
|
+
user_shell="$$SHELL"; \
|
|
255
|
+
else \
|
|
256
|
+
user_shell="$(SHELL)"; \
|
|
257
|
+
fi; \
|
|
258
|
+
echo "๐ Using $$user_shell for interactive session."; \
|
|
259
|
+
echo "๐ If you installed Metaflow in a virtual environment, activate it now."; \
|
|
260
|
+
if [ -f "$(DEVTOOLS_DIR)/aws_config" ]; then \
|
|
261
|
+
env -u AWS_PROFILE \
|
|
262
|
+
-u AWS_SHARED_CREDENTIALS_FILE \
|
|
263
|
+
METAFLOW_HOME="$(DEVTOOLS_DIR)" \
|
|
264
|
+
METAFLOW_PROFILE=local \
|
|
265
|
+
AWS_CONFIG_FILE="$(DEVTOOLS_DIR)/aws_config" \
|
|
266
|
+
"$$user_shell" -i; \
|
|
267
|
+
else \
|
|
268
|
+
env METAFLOW_HOME="$(DEVTOOLS_DIR)" \
|
|
269
|
+
METAFLOW_PROFILE=local \
|
|
270
|
+
"$$user_shell" -i; \
|
|
271
|
+
fi'
|
|
272
|
+
|
|
273
|
+
wait-until-ready:
|
|
274
|
+
@echo "Waiting for infrastructure to be ready. Timing out in $(WAIT_TIMEOUT) seconds..."
|
|
275
|
+
@timeout $(WAIT_TIMEOUT) bash -c 'while [ ! -f $(DEVTOOLS_DIR)/start.sh ]; do sleep 10; done; echo "Infra is Ready"' || (echo "Waiting for infra timed out"&&exit 1)
|
|
276
|
+
# buffer to get the tilt api running
|
|
277
|
+
@timeout 120 bash -c 'while ! $(TILT) get session; do sleep 3;done'
|
|
278
|
+
@echo "Waiting for services to be ready. Timing out in $(WAIT_TIMEOUT) seconds..."
|
|
279
|
+
# Need to wait for Tiltfile first, as other resources return 404 otherwise
|
|
280
|
+
@$(TILT) wait --for=condition=Ready "uiresource/(Tiltfile)" --timeout=$(WAIT_TIMEOUT)s
|
|
281
|
+
@$(TILT) wait --for=condition=Ready uiresource/generate-configs --timeout=$(WAIT_TIMEOUT)s
|
|
282
|
+
|
|
283
|
+
# @echo '$(MAKE_CMD) create-dev-shell' >> $(DEVTOOLS_DIR)/start.sh
|
|
284
|
+
# @echo 'rm -f /tmp/metaflow-devshell-*' >> $(DEVTOOLS_DIR)/start.sh
|
|
285
|
+
create-dev-shell: setup-tilt
|
|
286
|
+
@bash -c '\
|
|
287
|
+
SHELL_PATH=/tmp/metaflow-dev-shell-$$$$ && \
|
|
288
|
+
echo "#!/bin/bash" > $$SHELL_PATH && \
|
|
289
|
+
echo "set -e" >> $$SHELL_PATH && \
|
|
290
|
+
echo "" >> $$SHELL_PATH && \
|
|
291
|
+
echo "echo \"โณ Checking if development environment is up...\"" >> $$SHELL_PATH && \
|
|
292
|
+
echo "if ! $(TILT) get session >/dev/null 2>&1; then" >> $$SHELL_PATH && \
|
|
293
|
+
echo " echo \"โ Development environment is not up.\"" >> $$SHELL_PATH && \
|
|
294
|
+
echo " echo \" Please run '\''make up'\'' in another terminal, then re-run this script.\"" >> $$SHELL_PATH && \
|
|
295
|
+
echo " exit 1" >> $$SHELL_PATH && \
|
|
296
|
+
echo "fi" >> $$SHELL_PATH && \
|
|
297
|
+
echo "" >> $$SHELL_PATH && \
|
|
298
|
+
echo "echo \"โณ Waiting for development environment to be ready...\"" >> $$SHELL_PATH && \
|
|
299
|
+
echo "if ! $(TILT) wait --for=condition=Ready uiresource/generate-configs --timeout=300s; then" >> $$SHELL_PATH && \
|
|
300
|
+
echo " echo \"โ Timed out waiting for development environment to be ready.\"" >> $$SHELL_PATH && \
|
|
301
|
+
echo " exit 1" >> $$SHELL_PATH && \
|
|
302
|
+
echo "fi" >> $$SHELL_PATH && \
|
|
303
|
+
echo "" >> $$SHELL_PATH && \
|
|
304
|
+
echo "echo \"๐ง Starting a new shell for development environment...\"" >> $$SHELL_PATH && \
|
|
305
|
+
echo "if [ -n \"\$$SHELL\" ]; then" >> $$SHELL_PATH && \
|
|
306
|
+
echo " user_shell=\"\$$SHELL\"" >> $$SHELL_PATH && \
|
|
307
|
+
echo "else" >> $$SHELL_PATH && \
|
|
308
|
+
echo " user_shell=\"$(SHELL)\"" >> $$SHELL_PATH && \
|
|
309
|
+
echo "fi" >> $$SHELL_PATH && \
|
|
310
|
+
echo "echo \"๐ Using \$$user_shell for interactive session.\"" >> $$SHELL_PATH && \
|
|
311
|
+
echo "echo \"๐ If you installed Metaflow in a virtual environment, activate it now.\"" >> $$SHELL_PATH && \
|
|
312
|
+
echo "if [ -f \"$(DEVTOOLS_DIR)/aws_config\" ]; then" >> $$SHELL_PATH && \
|
|
313
|
+
echo " env METAFLOW_HOME=\"$(DEVTOOLS_DIR)\" \\" >> $$SHELL_PATH && \
|
|
314
|
+
echo " METAFLOW_PROFILE=local \\" >> $$SHELL_PATH && \
|
|
315
|
+
echo " AWS_CONFIG_FILE=\"$(DEVTOOLS_DIR)/aws_config\" \\" >> $$SHELL_PATH && \
|
|
316
|
+
echo " AWS_SHARED_CREDENTIALS_FILE= \\" >> $$SHELL_PATH && \
|
|
317
|
+
echo " \"\$$user_shell\" -i" >> $$SHELL_PATH && \
|
|
318
|
+
echo "else" >> $$SHELL_PATH && \
|
|
319
|
+
echo " env METAFLOW_HOME=\"$(DEVTOOLS_DIR)\" \\" >> $$SHELL_PATH && \
|
|
320
|
+
echo " METAFLOW_PROFILE=local \\" >> $$SHELL_PATH && \
|
|
321
|
+
echo " \"\$$user_shell\" -i" >> $$SHELL_PATH && \
|
|
322
|
+
echo "fi" >> $$SHELL_PATH && \
|
|
323
|
+
chmod +x $$SHELL_PATH && \
|
|
324
|
+
echo "โจ Created $$SHELL_PATH" && \
|
|
325
|
+
echo "๐ Execute it from ANY directory to switch to development environment shell!" \
|
|
326
|
+
'
|
|
327
|
+
|
|
328
|
+
ui: setup-tilt
|
|
329
|
+
@echo "โณ Checking if the development environment is up..."
|
|
330
|
+
@if ! $(TILT) get session >/dev/null 2>&1; then \
|
|
331
|
+
echo "โ Development environment is not up."; \
|
|
332
|
+
echo " Please run 'metaflow-dev up' in another terminal, then re-run 'metaflow-dev ui'."; \
|
|
333
|
+
exit 1; \
|
|
334
|
+
fi
|
|
335
|
+
@echo "โณ Waiting for Metaflow UI to be ready..."
|
|
336
|
+
@while true; do \
|
|
337
|
+
"$(TILT)" get uiresource metaflow-ui >/dev/null 2>&1; \
|
|
338
|
+
status=$$?; \
|
|
339
|
+
if [ $$status -eq 0 ]; then \
|
|
340
|
+
"$(TILT)" wait --for=condition=Ready uiresource/metaflow-ui; \
|
|
341
|
+
break; \
|
|
342
|
+
elif [ $$status -eq 127 ]; then \
|
|
343
|
+
echo "โ Development environment is not up."; \
|
|
344
|
+
echo " Please run 'metaflow-dev up' in another terminal, then re-run 'metaflow-dev shell'."; \
|
|
345
|
+
exit 1; \
|
|
346
|
+
else \
|
|
347
|
+
sleep 1; \
|
|
348
|
+
fi; \
|
|
349
|
+
done
|
|
350
|
+
@echo "๐ Opening Metaflow UI at http://localhost:3000"
|
|
351
|
+
@open http://localhost:3000
|
|
352
|
+
|
|
353
|
+
.PHONY: install-helm setup-minikube setup-tilt teardown-minikube tunnel up down check-docker install-curl install-gum install-brew up down dashboard shell ui all-up help
|
|
354
|
+
|
|
355
|
+
.DEFAULT_GOAL := help
|