drift-ml 0.1.6__tar.gz → 0.1.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: drift-ml
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: Terminal-first AutoML CLI - chat-based ML engineer
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: requests>=2.28.0
@@ -16,7 +16,7 @@ try:
16
16
  except ImportError:
17
17
  requests = None
18
18
 
19
- ENGINE_TAG = "v0.1.3"
19
+ ENGINE_TAG = "v0.1.4"
20
20
  GITHUB_REPO = "lakshitsachdeva/drift"
21
21
  GITHUB_API = f"https://api.github.com/repos/{GITHUB_REPO}/releases/tags/{ENGINE_TAG}"
22
22
  ENGINE_PORT = os.environ.get("DRIFT_ENGINE_PORT", "8000")
@@ -62,6 +62,13 @@ def _engine_running() -> bool:
62
62
 
63
63
  def _get_asset_download_url(asset_name: str) -> str:
64
64
  """Resolve GitHub release asset to download URL."""
65
+ # Direct URL works for public repos, no API rate limits
66
+ direct_url = f"https://github.com/{GITHUB_REPO}/releases/download/{ENGINE_TAG}/{asset_name}"
67
+ r = requests.head(direct_url, timeout=10, allow_redirects=True)
68
+ if r.status_code == 200:
69
+ return r.url # follow redirects to final URL
70
+
71
+ # Fallback: API (needed for private repos or if direct fails)
65
72
  token = os.environ.get("DRIFT_GITHUB_TOKEN") or os.environ.get("GITHUB_TOKEN")
66
73
  headers = {
67
74
  "User-Agent": "Drift-Engine-Launcher/1.0",
@@ -79,14 +86,9 @@ def _get_asset_download_url(asset_name: str) -> str:
79
86
  data = r.json()
80
87
  for a in data.get("assets", []):
81
88
  if a.get("name") == asset_name:
82
- # Prefer browser_download_url for public repos (no auth needed)
83
- url = a.get("browser_download_url")
89
+ url = a.get("browser_download_url") or a.get("url")
84
90
  if url:
85
91
  return url
86
- # API URL requires Accept: application/octet-stream
87
- api_url = a.get("url")
88
- if api_url:
89
- return api_url
90
92
  raise RuntimeError(f"Asset {asset_name} not found in release {ENGINE_TAG}")
91
93
 
92
94
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: drift-ml
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: Terminal-first AutoML CLI - chat-based ML engineer
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: requests>=2.28.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "drift-ml"
7
- version = "0.1.6"
7
+ version = "0.1.8"
8
8
  description = "Terminal-first AutoML CLI - chat-based ML engineer"
9
9
  requires-python = ">=3.10"
10
10
  dependencies = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes