duckrun 0.2.12__tar.gz → 0.2.13__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: duckrun
3
- Version: 0.2.12
3
+ Version: 0.2.13
4
4
  Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
5
5
  Author: mim
6
6
  License: MIT
@@ -20,7 +20,6 @@ def get_token() -> Optional[str]:
20
20
  # Check if we already have a cached token
21
21
  token_env = os.environ.get("AZURE_STORAGE_TOKEN")
22
22
  if token_env and token_env != "PLACEHOLDER_TOKEN_TOKEN_NOT_AVAILABLE":
23
- print("✅ Using existing Azure Storage token")
24
23
  return token_env
25
24
 
26
25
  print("🔐 Starting Azure authentication...")
@@ -38,21 +37,16 @@ def get_token() -> Optional[str]:
38
37
  except Exception as e:
39
38
  print(f"⚠️ Fabric notebook authentication failed: {e}")
40
39
 
41
- # Detect environment type for fallback authentication
40
+ # Try local/VS Code authentication (Azure CLI + browser)
41
+ print("🖥️ Trying local authentication (Azure CLI + browser fallback)...")
42
+ token = _get_local_token()
43
+ if token:
44
+ return token
45
+
46
+ # If local auth failed, fall back to device code flow
47
+ print("🔐 Falling back to device code flow for remote/headless environment...")
42
48
  try:
43
- # Check if we're in Google Colab first
44
- try:
45
- import google.colab
46
- print("🚀 Google Colab detected - using device code flow")
47
- return _get_device_code_token()
48
- except ImportError:
49
- pass
50
-
51
- # For all other environments (including VS Code), try Azure CLI first
52
- # This includes local development, VS Code notebooks, etc.
53
- print("🖥️ Local/VS Code environment detected - trying Azure CLI first, then browser fallback")
54
- return _get_local_token()
55
-
49
+ return _get_device_code_token()
56
50
  except Exception as e:
57
51
  print(f"❌ Authentication failed: {e}")
58
52
  print("💡 Try refreshing and running again, or check your Azure permissions")
@@ -401,15 +401,8 @@ class Duckrun:
401
401
  if not tables:
402
402
  return
403
403
 
404
- # Group tables by schema for display
405
- schema_tables = {}
406
- for schema_name, table_name in tables:
407
- if schema_name not in schema_tables:
408
- schema_tables[schema_name] = []
409
- schema_tables[schema_name].append(table_name)
410
-
411
- attached_count = 0
412
- skipped_tables = []
404
+ # Collect table names for display
405
+ table_names = []
413
406
 
414
407
  for schema_name, table_name in tables:
415
408
  try:
@@ -417,18 +410,22 @@ class Duckrun:
417
410
  # Create proper schema.table structure in DuckDB
418
411
  self.con.sql(f"CREATE SCHEMA IF NOT EXISTS {schema_name}")
419
412
  view_name = f"{schema_name}.{table_name}"
413
+ table_names.append(view_name)
420
414
  else:
421
415
  # Single schema mode - use just table name
422
416
  view_name = table_name
417
+ table_names.append(table_name)
423
418
 
424
419
  self.con.sql(f"""
425
420
  CREATE OR REPLACE VIEW {view_name}
426
421
  AS SELECT * FROM delta_scan('{self.table_base_url}{schema_name}/{table_name}');
427
422
  """)
428
- attached_count += 1
429
423
  except Exception as e:
430
- skipped_tables.append(f"{schema_name}.{table_name}")
431
424
  continue
425
+
426
+ # Print discovered tables as comma-separated list
427
+ if table_names:
428
+ print(", ".join(table_names))
432
429
 
433
430
  except Exception as e:
434
431
  print(f"❌ Error attaching lakehouse: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duckrun
3
- Version: 0.2.12
3
+ Version: 0.2.13
4
4
  Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
5
5
  Author: mim
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "duckrun"
7
- version = "0.2.12"
7
+ version = "0.2.13"
8
8
  description = "Lakehouse task runner powered by DuckDB for Microsoft Fabric"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes