metaflow 2.15.1__py2.py3-none-any.whl → 2.15.2__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.
@@ -2,15 +2,47 @@ import sys
2
2
  import subprocess
3
3
  from pathlib import Path
4
4
  import sysconfig
5
+ import site
6
+
7
+
8
+ def find_makefile():
9
+ possible_dirs = []
10
+
11
+ # 1) The standard sysconfig-based location
12
+ data_dir = sysconfig.get_paths()["data"]
13
+ possible_dirs.append(Path(data_dir) / "share" / "metaflow" / "devtools")
14
+
15
+ # 2) The user base (e.g. ~/.local on many systems)
16
+ user_base = site.getuserbase() # e.g. /home/runner/.local
17
+ possible_dirs.append(Path(user_base) / "share" / "metaflow" / "devtools")
18
+
19
+ # 3) site-packages can vary, we can guess share/.. near each site-packages
20
+ # (Works if pip actually placed devtools near site-packages.)
21
+ for p in site.getsitepackages():
22
+ possible_dirs.append(Path(p).parent / "share" / "metaflow" / "devtools")
23
+ user_site = site.getusersitepackages()
24
+ possible_dirs.append(Path(user_site).parent / "share" / "metaflow" / "devtools")
25
+
26
+ for candidate_dir in possible_dirs:
27
+ makefile_candidate = candidate_dir / "Makefile"
28
+ if makefile_candidate.is_file():
29
+ return makefile_candidate
30
+
31
+ return None
5
32
 
6
33
 
7
34
  def main():
8
- share_dir = Path(sysconfig.get_paths()["data"]) / "share" / "metaflow" / "devtools"
9
- makefile_path = share_dir / "Makefile"
35
+ makefile_path = find_makefile()
36
+ if not makefile_path:
37
+ print("ERROR: Could not find executable in any known location.")
38
+ sys.exit(1)
10
39
  cmd = ["make", "-f", str(makefile_path)] + sys.argv[1:]
11
- # subprocess.run(cmd, check=True)
40
+
12
41
  try:
13
42
  completed = subprocess.run(cmd, check=True)
14
43
  sys.exit(completed.returncode)
15
44
  except subprocess.CalledProcessError as ex:
16
45
  sys.exit(ex.returncode)
46
+ except KeyboardInterrupt:
47
+ print("Process interrupted by user. Exiting cleanly.")
48
+ sys.exit(1)
metaflow/version.py CHANGED
@@ -1 +1 @@
1
- metaflow_version = "2.15.1"
1
+ metaflow_version = "2.15.2"
@@ -8,6 +8,7 @@ help:
8
8
  @echo " ui - Open Metaflow UI"
9
9
  @echo " dashboard - Open Minikube dashboard"
10
10
  @echo " down - Stop and clean up the environment"
11
+ @echo " all-up - Start the development environment with all services"
11
12
  @echo " help - Show this help message"
12
13
 
13
14
  HELM_VERSION := v3.14.0
@@ -24,10 +25,10 @@ MINIKUBE := $(MINIKUBE_DIR)/minikube
24
25
  TILT_DIR := $(DEVTOOLS_DIR)/tilt
25
26
  TILT := $(TILT_DIR)/tilt
26
27
  TILTFILE := $(MKFILE_DIR)/Tiltfile
27
- MAKE_CMD := $(MAKE) -C "$(MKFILE_DIR)"
28
+ MAKE_CMD := $(MAKE) -f "$(MKFILE_PATH)"
28
29
 
29
30
  MINIKUBE_CPUS ?= 4
30
- MINIKUBE_MEMORY ?= 6000
31
+ MINIKUBE_MEMORY ?= 6144
31
32
  MINIKUBE_DISK_SIZE ?= 20g
32
33
 
33
34
  ifeq ($(shell uname), Darwin)
@@ -129,7 +130,8 @@ setup-minikube:
129
130
  --cpus $(MINIKUBE_CPUS) \
130
131
  --memory $(MINIKUBE_MEMORY) \
131
132
  --disk-size $(MINIKUBE_DISK_SIZE) \
132
- --driver docker; \
133
+ --driver docker \
134
+ || { echo "❌ Failed to start Minikube (check if Docker is running)"; exit 1; }; \
133
135
  echo "🔌 Enabling metrics-server and dashboard (quietly)..."; \
134
136
  $(MINIKUBE) addons enable metrics-server >/dev/null 2>&1; \
135
137
  $(MINIKUBE) addons enable dashboard >/dev/null 2>&1; \
@@ -170,7 +172,6 @@ up: install-brew check-docker install-curl install-gum setup-minikube install-he
170
172
  @echo 'trap "exit" INT TERM' >> $(DEVTOOLS_DIR)/start.sh
171
173
  @echo 'trap "kill 0" EXIT' >> $(DEVTOOLS_DIR)/start.sh
172
174
  @echo 'eval $$($(MINIKUBE) docker-env)' >> $(DEVTOOLS_DIR)/start.sh
173
-
174
175
  @echo 'if [ -n "$$SERVICES_OVERRIDE" ]; then' >> "$(DEVTOOLS_DIR)/start.sh"
175
176
  @echo ' echo "🌐 Using user-provided list of services: $$SERVICES_OVERRIDE"' >> "$(DEVTOOLS_DIR)/start.sh"
176
177
  @echo ' SERVICES="$$SERVICES_OVERRIDE"' >> "$(DEVTOOLS_DIR)/start.sh"
@@ -186,11 +187,14 @@ up: install-brew check-docker install-curl install-gum setup-minikube install-he
186
187
  @chmod +x $(DEVTOOLS_DIR)/start.sh
187
188
  @$(DEVTOOLS_DIR)/start.sh
188
189
 
190
+ all-up:
191
+ @echo "🚀 Starting up all services..."
192
+ SERVICES_OVERRIDE=all $(MAKE_CMD) up
193
+
189
194
  down:
190
195
  @echo "🛑 Stopping all services..."
191
196
  @-pkill -f "$(MINIKUBE) tunnel" 2>/dev/null || true
192
197
  @echo "⏹️ Stopping Tilt..."
193
- -PATH="$(MINIKUBE_DIR):$(TILT_DIR):$$PATH" tilt down -f $(TILTFILE)
194
198
  @echo "🧹 Cleaning up Minikube..."
195
199
  $(MAKE_CMD) teardown-minikube
196
200
  @echo "🗑️ Removing Tilt binary and directory..."
@@ -201,7 +205,7 @@ down:
201
205
 
202
206
  shell: setup-tilt
203
207
  @echo "⏳ Checking if development environment is up..."
204
- @set -e; \
208
+ @set -eu; \
205
209
  for i in $$(seq 1 90); do \
206
210
  if "$(TILT)" get session >/dev/null 2>&1; then \
207
211
  found_session=1; \
@@ -210,7 +214,7 @@ shell: setup-tilt
210
214
  sleep 2; \
211
215
  fi; \
212
216
  done; \
213
- if [ -z "$${found_session}" ]; then \
217
+ if [ -z "$${found_session:-}" ]; then \
214
218
  echo "❌ Development environment is not up."; \
215
219
  echo " Please run 'metaflow-dev up' in another terminal, then re-run 'metaflow-dev shell'."; \
216
220
  exit 1; \
@@ -220,7 +224,10 @@ shell: setup-tilt
220
224
  "$(TILT)" get uiresource generate-configs >/dev/null 2>&1; \
221
225
  status=$$?; \
222
226
  if [ $$status -eq 0 ]; then \
223
- "$(TILT)" wait --for=condition=Ready uiresource/generate-configs; \
227
+ if ! "$(TILT)" wait --for=condition=Ready uiresource/generate-configs --timeout=300s; then \
228
+ echo "❌ Timed out waiting for development environment to be ready."; \
229
+ exit 1; \
230
+ fi; \
224
231
  break; \
225
232
  elif [ $$status -eq 127 ]; then \
226
233
  echo "❌ Development environment is not up."; \
@@ -267,7 +274,10 @@ create-dev-shell: setup-tilt
267
274
  echo "fi" >> $$SHELL_PATH && \
268
275
  echo "" >> $$SHELL_PATH && \
269
276
  echo "echo \"⏳ Waiting for development environment to be ready...\"" >> $$SHELL_PATH && \
270
- echo "$(TILT) wait --for=condition=Ready uiresource/generate-configs" >> $$SHELL_PATH && \
277
+ echo "if ! $(TILT) wait --for=condition=Ready uiresource/generate-configs --timeout=300s; then" >> $$SHELL_PATH && \
278
+ echo " echo \"❌ Timed out waiting for development environment to be ready.\"" >> $$SHELL_PATH && \
279
+ echo " exit 1" >> $$SHELL_PATH && \
280
+ echo "fi" >> $$SHELL_PATH && \
271
281
  echo "" >> $$SHELL_PATH && \
272
282
  echo "echo \"🔧 Starting a new shell for development environment...\"" >> $$SHELL_PATH && \
273
283
  echo "if [ -n \"\$$SHELL\" ]; then" >> $$SHELL_PATH && \
@@ -317,6 +327,6 @@ ui: setup-tilt
317
327
  @echo "🔗 Opening Metaflow UI at http://localhost:3000"
318
328
  @open http://localhost:3000
319
329
 
320
- .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 help
330
+ .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
321
331
 
322
332
  .DEFAULT_GOAL := up
@@ -23,8 +23,13 @@ components = {
23
23
  "argo-events": ["argo-workflows"],
24
24
  }
25
25
 
26
- if os.getenv("SERVICES", "").strip():
27
- requested_components = os.getenv("SERVICES", "").split(",")
26
+ services_env = os.getenv("SERVICES", "").strip().lower()
27
+
28
+ if services_env:
29
+ if services_env == "all":
30
+ requested_components = list(components.keys())
31
+ else:
32
+ requested_components = services_env.split(",")
28
33
  else:
29
34
  requested_components = list(components.keys())
30
35
 
@@ -78,7 +83,7 @@ for component in requested_components:
78
83
  if result not in enabled_components:
79
84
  enabled_components.append(result)
80
85
 
81
- # Print a friendly summary when running `tilt up`.
86
+ # Print a friendly summary when running `tilt up`.
82
87
  if config.tilt_subcommand == 'up':
83
88
  print("\n📦 Components to install:")
84
89
  for component in enabled_components:
@@ -499,7 +504,7 @@ if "argo-events" in enabled_components:
499
504
  'argo-events-controller-manager',
500
505
  labels=['argo-events'],
501
506
  )
502
-
507
+
503
508
  metaflow_config["METAFLOW_ARGO_EVENTS_EVENT"] = "metaflow-event"
504
509
  metaflow_config["METAFLOW_ARGO_EVENTS_EVENT_BUS"] = "default"
505
510
  metaflow_config["METAFLOW_ARGO_EVENTS_EVENT_SOURCE"] = "argo-events-webhook"
@@ -617,4 +622,4 @@ local_resource(
617
622
  name="generate-configs",
618
623
  cmd=write_config_files(),
619
624
  resource_deps=config_resources,
620
- )
625
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metaflow
3
- Version: 2.15.1
3
+ Version: 2.15.2
4
4
  Summary: Metaflow: More AI and ML, Less Engineering
5
5
  Author: Metaflow Developers
6
6
  Author-email: help@metaflow.org
@@ -26,7 +26,7 @@ License-File: LICENSE
26
26
  Requires-Dist: requests
27
27
  Requires-Dist: boto3
28
28
  Provides-Extra: stubs
29
- Requires-Dist: metaflow-stubs==2.15.1; extra == "stubs"
29
+ Requires-Dist: metaflow-stubs==2.15.2; extra == "stubs"
30
30
  Dynamic: author
31
31
  Dynamic: author-email
32
32
  Dynamic: classifier
@@ -36,7 +36,7 @@ metaflow/tuple_util.py,sha256=_G5YIEhuugwJ_f6rrZoelMFak3DqAR2tt_5CapS1XTY,830
36
36
  metaflow/unbounded_foreach.py,sha256=p184WMbrMJ3xKYHwewj27ZhRUsSj_kw1jlye5gA9xJk,387
37
37
  metaflow/util.py,sha256=mJBkV5tShIyCsLDeM1zygQGeciQVMrVPm_qI8Oi33G0,14656
38
38
  metaflow/vendor.py,sha256=FchtA9tH22JM-eEtJ2c9FpUdMn8sSb1VHuQS56EcdZk,5139
39
- metaflow/version.py,sha256=VW8RqjdxyB49j8TFdvknh5vAqtyjJ9j4ApSZP3QA-zs,28
39
+ metaflow/version.py,sha256=7oX8gtpKJpYIdf69SUJaWUTLRweqR54oqHS_DrQYBXk,28
40
40
  metaflow/_vendor/__init__.py,sha256=y_CiwUD3l4eAKvTVDZeqgVujMy31cAM1qjAB-HfI-9s,353
41
41
  metaflow/_vendor/typing_extensions.py,sha256=0nUs5p1A_UrZigrAVBoOEM6TxU37zzPDUtiij1ZwpNc,110417
42
42
  metaflow/_vendor/zipp.py,sha256=ajztOH-9I7KA_4wqDYygtHa6xUBVZgFpmZ8FE74HHHI,8425
@@ -122,7 +122,7 @@ metaflow/client/filecache.py,sha256=Wy0yhhCqC1JZgebqi7z52GCwXYnkAqMZHTtxThvwBgM,
122
122
  metaflow/cmd/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
123
123
  metaflow/cmd/configure_cmd.py,sha256=o-DKnUf2FBo_HiMVyoyzQaGBSMtpbEPEdFTQZ0hkU-k,33396
124
124
  metaflow/cmd/main_cli.py,sha256=LSehmMjkWojAN1XTtqW6S51ZpGNAdW4_VK5S7qH8-Ts,2982
125
- metaflow/cmd/make_wrapper.py,sha256=NFpSdESs4Ks9xeurmYB5VUyYplhNcONDZJcUP2cf8-8,494
125
+ metaflow/cmd/make_wrapper.py,sha256=N8L4u8QZAryH0sAjRsdEqG-gTj2S4LUsfDizOemrTR0,1604
126
126
  metaflow/cmd/tutorials_cmd.py,sha256=8FdlKkicTOhCIDKcBR5b0Oz6giDvS-EMY3o9skIrRqw,5156
127
127
  metaflow/cmd/util.py,sha256=jS_0rUjOnGGzPT65fzRLdGjrYAOOLA4jU2S0HJLV0oc,406
128
128
  metaflow/cmd/code/__init__.py,sha256=VO4dNM9M9LHYy5nTgEiJvCV1RBl8lpDlYGJm6GIcaBA,7413
@@ -363,12 +363,12 @@ metaflow/user_configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
363
363
  metaflow/user_configs/config_decorators.py,sha256=qCKVAvd0NKgaCxQ2OThes5-DYHXq6A1HqURubYNeFdw,20481
364
364
  metaflow/user_configs/config_options.py,sha256=m6jccSpzI4qUJ7vyYkYBIf8G3V0Caunxg_k7zg4Zlqg,21067
365
365
  metaflow/user_configs/config_parameters.py,sha256=oeJGVKu1ao_YQX6Lg6P2FEv5k5-_F4sARLlVpTW9ezM,15502
366
- metaflow-2.15.1.data/data/share/metaflow/devtools/Makefile,sha256=6B1iQvyfhhukbDnLnzZmadYi9tmyr538hVmKiBIy_Ew,12820
367
- metaflow-2.15.1.data/data/share/metaflow/devtools/Tiltfile,sha256=fpPW_0sDxHL60-9nld5OgV0YO30IPl9luAjukTsl-9o,20391
368
- metaflow-2.15.1.data/data/share/metaflow/devtools/pick_services.sh,sha256=DCnrMXwtApfx3B4S-YiZESMyAFHbXa3VuNL0MxPLyiE,2196
369
- metaflow-2.15.1.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
370
- metaflow-2.15.1.dist-info/METADATA,sha256=uZRHK4OO4RES9LB_ZJGiL0oFxq3Z_VYZZWqnEeMJhnw,6118
371
- metaflow-2.15.1.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
372
- metaflow-2.15.1.dist-info/entry_points.txt,sha256=RvEq8VFlgGe_FfqGOZi0D7ze1hLD0pAtXeNyGfzc_Yc,103
373
- metaflow-2.15.1.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
374
- metaflow-2.15.1.dist-info/RECORD,,
366
+ metaflow-2.15.2.data/data/share/metaflow/devtools/Makefile,sha256=uASGNuQaOrKWePYT8CmIuCvlOusm0P_HVWnGVzX74vs,13340
367
+ metaflow-2.15.2.data/data/share/metaflow/devtools/Tiltfile,sha256=fPinb8a7KvRnYPFsjmIIqqOic3ROjsc_kryHqe-SHGw,20499
368
+ metaflow-2.15.2.data/data/share/metaflow/devtools/pick_services.sh,sha256=DCnrMXwtApfx3B4S-YiZESMyAFHbXa3VuNL0MxPLyiE,2196
369
+ metaflow-2.15.2.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
370
+ metaflow-2.15.2.dist-info/METADATA,sha256=M79nxx71YBOurt_Gu8akE_RP9mA8njbL_o49IfsCISY,6118
371
+ metaflow-2.15.2.dist-info/WHEEL,sha256=rF4EZyR2XVS6irmOHQIJx2SUqXLZKRMUrjsg8UwN-XQ,109
372
+ metaflow-2.15.2.dist-info/entry_points.txt,sha256=RvEq8VFlgGe_FfqGOZi0D7ze1hLD0pAtXeNyGfzc_Yc,103
373
+ metaflow-2.15.2.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
374
+ metaflow-2.15.2.dist-info/RECORD,,