pltr-cli 0.7.0__tar.gz → 0.8.0__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.
Files changed (128) hide show
  1. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/PKG-INFO +1 -1
  2. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/pyproject.toml +1 -1
  3. pltr_cli-0.8.0/src/pltr/__init__.py +1 -0
  4. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/dataset.py +22 -1
  5. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/dataset.py +87 -3
  6. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/uv.lock +1 -1
  7. pltr_cli-0.7.0/src/pltr/__init__.py +0 -1
  8. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/.github/workflows/ci.yml +0 -0
  9. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/.github/workflows/publish.yml +0 -0
  10. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/.github/workflows/test-publish.yml +0 -0
  11. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/.gitignore +0 -0
  12. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/.pre-commit-config.yaml +0 -0
  13. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/CHANGELOG.md +0 -0
  14. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/CLAUDE.md +0 -0
  15. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/LICENSE +0 -0
  16. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/README.md +0 -0
  17. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/RELEASE.md +0 -0
  18. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/children.csv +0 -0
  19. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/README.md +0 -0
  20. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/api/wrapper.md +0 -0
  21. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/examples/csv-upload.md +0 -0
  22. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/examples/gallery.md +0 -0
  23. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/features/dataset-transactions.md +0 -0
  24. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/user-guide/aliases.md +0 -0
  25. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/user-guide/authentication.md +0 -0
  26. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/user-guide/commands.md +0 -0
  27. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/user-guide/quick-start.md +0 -0
  28. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/user-guide/troubleshooting.md +0 -0
  29. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/docs/user-guide/workflows.md +0 -0
  30. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/folder_info.json +0 -0
  31. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/folders.json +0 -0
  32. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/mypy.ini +0 -0
  33. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/scripts/release.py +0 -0
  34. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/__main__.py +0 -0
  35. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/auth/__init__.py +0 -0
  36. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/auth/base.py +0 -0
  37. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/auth/manager.py +0 -0
  38. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/auth/oauth.py +0 -0
  39. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/auth/storage.py +0 -0
  40. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/auth/token.py +0 -0
  41. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/cli.py +0 -0
  42. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/__init__.py +0 -0
  43. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/admin.py +0 -0
  44. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/alias.py +0 -0
  45. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/completion.py +0 -0
  46. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/configure.py +0 -0
  47. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/connectivity.py +0 -0
  48. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/folder.py +0 -0
  49. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/mediasets.py +0 -0
  50. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/ontology.py +0 -0
  51. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/orchestration.py +0 -0
  52. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/project.py +0 -0
  53. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/resource.py +0 -0
  54. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/resource_role.py +0 -0
  55. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/shell.py +0 -0
  56. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/space.py +0 -0
  57. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/sql.py +0 -0
  58. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/commands/verify.py +0 -0
  59. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/config/__init__.py +0 -0
  60. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/config/aliases.py +0 -0
  61. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/config/profiles.py +0 -0
  62. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/config/settings.py +0 -0
  63. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/__init__.py +0 -0
  64. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/admin.py +0 -0
  65. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/base.py +0 -0
  66. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/connectivity.py +0 -0
  67. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/folder.py +0 -0
  68. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/mediasets.py +0 -0
  69. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/ontology.py +0 -0
  70. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/orchestration.py +0 -0
  71. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/project.py +0 -0
  72. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/resource.py +0 -0
  73. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/resource_role.py +0 -0
  74. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/space.py +0 -0
  75. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/services/sql.py +0 -0
  76. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/utils/__init__.py +0 -0
  77. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/utils/alias_resolver.py +0 -0
  78. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/utils/completion.py +0 -0
  79. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/utils/formatting.py +0 -0
  80. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/src/pltr/utils/progress.py +0 -0
  81. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/__init__.py +0 -0
  82. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/conftest.py +0 -0
  83. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/README.md +0 -0
  84. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/__init__.py +0 -0
  85. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/conftest.py +0 -0
  86. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/test_auth_flow.py +0 -0
  87. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/test_cli_integration.py +0 -0
  88. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/test_data_workflows.py +0 -0
  89. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/test_data_workflows_simple.py +0 -0
  90. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/integration/test_simple_integration.py +0 -0
  91. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_auth/__init__.py +0 -0
  92. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_auth/test_base.py +0 -0
  93. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_auth/test_manager.py +0 -0
  94. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_auth/test_oauth.py +0 -0
  95. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_auth/test_storage.py +0 -0
  96. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_auth/test_token.py +0 -0
  97. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/__init__.py +0 -0
  98. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_admin.py +0 -0
  99. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_alias.py +0 -0
  100. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_completion.py +0 -0
  101. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_connectivity.py +0 -0
  102. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_dataset.py +0 -0
  103. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_folder.py +0 -0
  104. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_ontology.py +0 -0
  105. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_orchestration.py +0 -0
  106. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_shell.py +0 -0
  107. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_sql.py +0 -0
  108. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_commands/test_verify_simple.py +0 -0
  109. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_config/__init__.py +0 -0
  110. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_config/test_aliases.py +0 -0
  111. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_config/test_profiles.py +0 -0
  112. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_config/test_settings.py +0 -0
  113. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/__init__.py +0 -0
  114. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_admin.py +0 -0
  115. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_base.py +0 -0
  116. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_connectivity.py +0 -0
  117. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_dataset.py +0 -0
  118. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_dataset_transactions.py +0 -0
  119. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_folder.py +0 -0
  120. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_ontology.py +0 -0
  121. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_orchestration.py +0 -0
  122. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_project.py +0 -0
  123. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_resource.py +0 -0
  124. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_resource_role.py +0 -0
  125. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_space.py +0 -0
  126. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_services/test_sql.py +0 -0
  127. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_utils/__init__.py +0 -0
  128. {pltr_cli-0.7.0 → pltr_cli-0.8.0}/tests/test_utils/test_alias_resolver.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pltr-cli
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: Command-line interface for Palantir Foundry APIs
5
5
  Project-URL: Homepage, https://github.com/anjor/pltr-cli
6
6
  Project-URL: Repository, https://github.com/anjor/pltr-cli
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pltr-cli"
3
- version = "0.7.0"
3
+ version = "0.8.0"
4
4
  description = "Command-line interface for Palantir Foundry APIs"
5
5
  authors = [
6
6
  { name = "anjor", email = "anjor@umd.edu" },
@@ -0,0 +1 @@
1
+ __version__ = "0.8.0"
@@ -585,9 +585,30 @@ def upload_file(
585
585
 
586
586
  except (ProfileNotFoundError, MissingCredentialsError) as e:
587
587
  formatter.print_error(f"Authentication error: {e}")
588
+ raise typer.Exit(1)
589
+ except FileNotFoundError as e:
590
+ formatter.print_error(f"File error: {e}")
591
+ raise typer.Exit(1)
592
+ except RuntimeError as e:
593
+ # RuntimeError from our service layer contains detailed error info
594
+ error_msg = str(e)
595
+ formatter.print_error(f"Upload failed: {error_msg}")
596
+
597
+ # If it looks like our enhanced error message, extract the suggestion part
598
+ if ". Suggestions: " in error_msg:
599
+ main_error, suggestions = error_msg.split(". Suggestions: ", 1)
600
+ formatter.print_error(main_error)
601
+ formatter.print_info(f"💡 Suggestions: {suggestions}")
602
+
588
603
  raise typer.Exit(1)
589
604
  except Exception as e:
590
- formatter.print_error(f"Failed to upload file: {e}")
605
+ # Fallback for any other exceptions
606
+ formatter.print_error(
607
+ f"Unexpected error during file upload: {type(e).__name__}: {e}"
608
+ )
609
+ formatter.print_info(
610
+ "💡 Try running the command again or check your connection"
611
+ )
591
612
  raise typer.Exit(1)
592
613
 
593
614
 
@@ -319,9 +319,93 @@ class DatasetService(BaseService):
319
319
  "transaction_rid": getattr(result, "transaction_rid", transaction_rid),
320
320
  }
321
321
  except Exception as e:
322
- raise RuntimeError(
323
- f"Failed to upload file {file_path} to dataset {dataset_rid}: {e}"
324
- )
322
+ # Try to extract more detailed error information
323
+ error_msg = str(e).strip()
324
+ error_type = type(e).__name__
325
+
326
+ # Check for common HTTP/API errors
327
+ if hasattr(e, "response") and hasattr(e.response, "status_code"):
328
+ status_code = e.response.status_code
329
+ if hasattr(e.response, "text"):
330
+ response_text = e.response.text[:500] # Limit to 500 chars
331
+ error_details = f"HTTP {status_code}: {response_text}"
332
+ else:
333
+ error_details = f"HTTP {status_code}"
334
+ error_msg = f"{error_details} ({error_type}: {error_msg})"
335
+ elif hasattr(e, "status_code"):
336
+ error_msg = f"HTTP {e.status_code}: {error_msg}"
337
+ elif hasattr(e, "message"):
338
+ error_msg = f"{error_type}: {e.message}"
339
+ else:
340
+ if error_msg:
341
+ error_msg = f"{error_type}: {error_msg}"
342
+ else:
343
+ error_msg = f"{error_type} (no additional details available)"
344
+
345
+ # Add context about what might have gone wrong
346
+ context_hints = []
347
+ error_lower = error_msg.lower()
348
+
349
+ if (
350
+ "permission" in error_lower
351
+ or "forbidden" in error_lower
352
+ or "401" in error_msg
353
+ or "403" in error_msg
354
+ ):
355
+ context_hints.append(
356
+ "Check your authentication credentials and dataset permissions"
357
+ )
358
+ if "not found" in error_lower or "404" in error_msg:
359
+ context_hints.append(
360
+ "Verify the dataset RID and transaction RID are correct"
361
+ )
362
+ if "transaction" in error_lower:
363
+ context_hints.append(
364
+ "Check if the transaction is still open and not expired"
365
+ )
366
+ if "schema" in error_lower or "validation" in error_lower:
367
+ context_hints.append(
368
+ "The file might not match the expected dataset schema"
369
+ )
370
+ if (
371
+ "invalidparametercombination" in error_lower
372
+ or "invalid parameter" in error_lower
373
+ ):
374
+ context_hints.append(
375
+ "The combination of parameters (dataset RID, transaction RID, branch) may be invalid"
376
+ )
377
+ context_hints.append(
378
+ "Try without --transaction-rid, or verify the transaction belongs to this dataset"
379
+ )
380
+ if (
381
+ "opentransactionalreadyexists" in error_lower
382
+ or "transaction already exists" in error_lower
383
+ ):
384
+ context_hints.append(
385
+ "There's already an open transaction for this dataset"
386
+ )
387
+ context_hints.append(
388
+ "Use the existing transaction with --transaction-rid, or commit/abort it first"
389
+ )
390
+ context_hints.append(
391
+ "List transactions with: pltr dataset transactions list "
392
+ + dataset_rid
393
+ )
394
+
395
+ # Try to get more detailed error information from the exception
396
+ if hasattr(e, "__dict__"):
397
+ for attr in ["detail", "details", "error_message", "description"]:
398
+ if hasattr(e, attr):
399
+ detail = getattr(e, attr)
400
+ if detail and str(detail).strip():
401
+ error_msg += f" - {detail}"
402
+ break
403
+
404
+ full_error = f"Failed to upload file {file_path.name} to dataset {dataset_rid}: {error_msg}"
405
+ if context_hints:
406
+ full_error += f". Suggestions: {'; '.join(context_hints)}"
407
+
408
+ raise RuntimeError(full_error)
325
409
 
326
410
  def download_file(
327
411
  self,
@@ -710,7 +710,7 @@ wheels = [
710
710
 
711
711
  [[package]]
712
712
  name = "pltr-cli"
713
- version = "0.7.0"
713
+ version = "0.8.0"
714
714
  source = { editable = "." }
715
715
  dependencies = [
716
716
  { name = "click-repl" },
@@ -1 +0,0 @@
1
- __version__ = "0.7.0"
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
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