unitysvc-services 0.1.8__tar.gz → 0.1.9__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.

Potentially problematic release.


This version of unitysvc-services might be problematic. Click here for more details.

Files changed (69) hide show
  1. {unitysvc_services-0.1.8/src/unitysvc_services.egg-info → unitysvc_services-0.1.9}/PKG-INFO +1 -1
  2. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/pyproject.toml +1 -1
  3. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/test.py +47 -16
  4. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9/src/unitysvc_services.egg-info}/PKG-INFO +1 -1
  5. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider1/services/service1/service.toml +1 -1
  6. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider1/services/service1/svcreseller.toml +1 -1
  7. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider2/services/service2/service.json +1 -1
  8. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider2/services/service2/svcreseller.json +1 -1
  9. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/CONTRIBUTING.md +0 -0
  10. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/HISTORY.md +0 -0
  11. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/LICENSE +0 -0
  12. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/MANIFEST.in +0 -0
  13. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/README.md +0 -0
  14. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/api-reference.md +0 -0
  15. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/cli-reference.md +0 -0
  16. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/code-examples.md +0 -0
  17. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/contributing.md +0 -0
  18. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/data-structure.md +0 -0
  19. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/development.md +0 -0
  20. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/documenting-services.md +0 -0
  21. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/file-schemas.md +0 -0
  22. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/getting-started.md +0 -0
  23. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/index.md +0 -0
  24. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/installation.md +0 -0
  25. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/usage.md +0 -0
  26. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/docs/workflows.md +0 -0
  27. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/setup.cfg +0 -0
  28. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/__init__.py +0 -0
  29. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/api.py +0 -0
  30. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/cli.py +0 -0
  31. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/format_data.py +0 -0
  32. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/list.py +0 -0
  33. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/models/__init__.py +0 -0
  34. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/models/base.py +0 -0
  35. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/models/listing_v1.py +0 -0
  36. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/models/provider_v1.py +0 -0
  37. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/models/seller_v1.py +0 -0
  38. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/models/service_v1.py +0 -0
  39. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/populate.py +0 -0
  40. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/publisher.py +0 -0
  41. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/py.typed +0 -0
  42. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/query.py +0 -0
  43. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/scaffold.py +0 -0
  44. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/schema/base.json +0 -0
  45. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/schema/listing_v1.json +0 -0
  46. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/schema/provider_v1.json +0 -0
  47. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/schema/seller_v1.json +0 -0
  48. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/schema/service_v1.json +0 -0
  49. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/update.py +0 -0
  50. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/utils.py +0 -0
  51. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services/validator.py +0 -0
  52. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services.egg-info/SOURCES.txt +0 -0
  53. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services.egg-info/dependency_links.txt +0 -0
  54. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services.egg-info/entry_points.txt +0 -0
  55. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services.egg-info/requires.txt +0 -0
  56. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/src/unitysvc_services.egg-info/top_level.txt +0 -0
  57. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/__init__.py +0 -0
  58. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/README.md +0 -0
  59. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider1/README.md +0 -0
  60. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider1/provider.toml +0 -0
  61. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider1/services/service1/code-example.md +0 -0
  62. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider1/terms-of-service.md +0 -0
  63. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider2/README.md +0 -0
  64. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider2/provider.json +0 -0
  65. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider2/services/service2/code-example.md +0 -0
  66. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/provider2/terms-of-service.md +0 -0
  67. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/example_data/seller.json +0 -0
  68. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/test_utils.py +0 -0
  69. {unitysvc_services-0.1.8 → unitysvc_services-0.1.9}/tests/test_validator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitysvc-services
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: SDK for digital service providers on UnitySVC
5
5
  Author-email: Bo Peng <bo.peng@unitysvc.com>
6
6
  Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "unitysvc-services"
7
- version = "0.1.8"
7
+ version = "0.1.9"
8
8
  description = "SDK for digital service providers on UnitySVC"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
@@ -720,26 +720,38 @@ def run(
720
720
  if verbose and result["stdout"]:
721
721
  console.print(f" [dim]stdout:[/dim] {result['stdout'][:200]}")
722
722
 
723
- # Save successful test output to .out file
724
- if result.get("stdout") and result.get("listing_file") and result.get("actual_filename"):
723
+ # Save successful test output to .out and .err files
724
+ if result.get("listing_file") and result.get("actual_filename"):
725
725
  listing_file = Path(result["listing_file"])
726
726
  actual_filename = result["actual_filename"]
727
-
728
- # Create filename: {listing_stem}_{actual_filename}.out
729
- # e.g., "svclisting_test.py.out" for svclisting.json and test.py
730
727
  listing_stem = listing_file.stem
731
- output_filename = f"{listing_stem}_{actual_filename}.out"
728
+
729
+ # Create filename pattern: {service_name}_{listing_stem}_{actual_filename}.out/.err
730
+ # e.g., "llama-3-1-405b-instruct_svclisting_test.py.out"
731
+ base_filename = f"{service_name}_{listing_stem}_{actual_filename}"
732
+ out_filename = f"{base_filename}.out"
733
+ err_filename = f"{base_filename}.err"
732
734
 
733
735
  # Save to listing directory
734
- output_path = listing_file.parent / output_filename
736
+ out_path = listing_file.parent / out_filename
737
+ err_path = listing_file.parent / err_filename
735
738
 
736
739
  # Write stdout to .out file
737
740
  try:
738
- with open(output_path, "w", encoding="utf-8") as f:
739
- f.write(result["stdout"])
740
- console.print(f" [dim]→ Output saved to:[/dim] {output_path}")
741
+ with open(out_path, "w", encoding="utf-8") as f:
742
+ f.write(result["stdout"] or "")
743
+ console.print(f" [dim]→ Output saved to:[/dim] {out_path}")
741
744
  except Exception as e:
742
745
  console.print(f" [yellow]⚠ Failed to save output: {e}[/yellow]")
746
+
747
+ # Write stderr to .err file
748
+ try:
749
+ with open(err_path, "w", encoding="utf-8") as f:
750
+ f.write(result["stderr"] or "")
751
+ if result["stderr"]:
752
+ console.print(f" [dim]→ Error output saved to:[/dim] {err_path}")
753
+ except Exception as e:
754
+ console.print(f" [yellow]⚠ Failed to save error output: {e}[/yellow]")
743
755
  else:
744
756
  console.print(f" [red]✗ Failed[/red] - {result['error']}")
745
757
  if verbose:
@@ -748,16 +760,36 @@ def run(
748
760
  if result["stderr"]:
749
761
  console.print(f" [dim]stderr:[/dim] {result['stderr'][:200]}")
750
762
 
751
- # Write failed test content to current directory
752
- if result.get("rendered_content") and result.get("listing_file") and result.get("actual_filename"):
763
+ # Write failed test outputs and script to current directory
764
+ if result.get("listing_file") and result.get("actual_filename"):
753
765
  listing_file = Path(result["listing_file"])
754
766
  actual_filename = result["actual_filename"]
755
767
  listing_stem = listing_file.stem
756
768
 
757
769
  # Create filename: failed_{service_name}_{listing_stem}_{actual_filename}
770
+ # This will be the base name for .out, .err, and the script file
758
771
  failed_filename = f"failed_{service_name}_{listing_stem}_{actual_filename}"
759
772
 
760
- # Prepare content with environment variables as header comments
773
+ # Write stdout to .out file in current directory
774
+ out_filename = f"{failed_filename}.out"
775
+ try:
776
+ with open(out_filename, "w", encoding="utf-8") as f:
777
+ f.write(result["stdout"] or "")
778
+ console.print(f" [yellow]→ Output saved to:[/yellow] {out_filename}")
779
+ except Exception as e:
780
+ console.print(f" [yellow]⚠ Failed to save output: {e}[/yellow]")
781
+
782
+ # Write stderr to .err file in current directory
783
+ err_filename = f"{failed_filename}.err"
784
+ try:
785
+ with open(err_filename, "w", encoding="utf-8") as f:
786
+ f.write(result["stderr"] or "")
787
+ console.print(f" [yellow]→ Error output saved to:[/yellow] {err_filename}")
788
+ except Exception as e:
789
+ console.print(f" [yellow]⚠ Failed to save error output: {e}[/yellow]")
790
+
791
+ # Write failed test script content to current directory (for debugging)
792
+ # rendered_content is always set if we got here (set during template rendering)
761
793
  content_with_env = result["rendered_content"]
762
794
 
763
795
  # Add environment variables as comments at the top
@@ -774,14 +806,13 @@ def run(
774
806
 
775
807
  content_with_env = env_header + content_with_env
776
808
 
777
- # Write to current directory
778
809
  try:
779
810
  with open(failed_filename, "w", encoding="utf-8") as f:
780
811
  f.write(content_with_env)
781
- console.print(f" [yellow]→ Test content saved to:[/yellow] {failed_filename}")
812
+ console.print(f" [yellow]→ Test script saved to:[/yellow] {failed_filename}")
782
813
  console.print(" [dim] (includes environment variables for reproduction)[/dim]")
783
814
  except Exception as e:
784
- console.print(f" [yellow]⚠ Failed to save test content: {e}[/yellow]")
815
+ console.print(f" [yellow]⚠ Failed to save test script: {e}[/yellow]")
785
816
 
786
817
  console.print()
787
818
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitysvc-services
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: SDK for digital service providers on UnitySVC
5
5
  Author-email: Bo Peng <bo.peng@unitysvc.com>
6
6
  Maintainer-email: Bo Peng <bo.peng@unitysvc.com>
@@ -78,7 +78,7 @@ name = "Fireworks API"
78
78
  title = "Python Code Example"
79
79
  description = "Example code to use the model"
80
80
  mime_type = "python"
81
- category = "code_examples"
81
+ category = "code_example"
82
82
  file_path = "code-example.md"
83
83
  is_active = true
84
84
  is_public = true
@@ -12,7 +12,7 @@ api_endpoint = "${GATEWAY_BASE_URL}/p/example-provider1"
12
12
  title = "Python Code Example"
13
13
  description = "Example code to use the model"
14
14
  mime_type = "python"
15
- category = "code_examples"
15
+ category = "code_example"
16
16
  file_path = "code-example.md"
17
17
  is_active = true
18
18
  is_public = true
@@ -32,7 +32,7 @@
32
32
  "api_key": "your_api_key_here",
33
33
  "documents": [
34
34
  {
35
- "category": "code_examples",
35
+ "category": "code_example",
36
36
  "description": "Example code to use the model",
37
37
  "file_path": "code-example.md",
38
38
  "is_active": true,
@@ -11,7 +11,7 @@
11
11
  "api_key": null,
12
12
  "documents": [
13
13
  {
14
- "category": "code_examples",
14
+ "category": "code_example",
15
15
  "description": "Example code to use the model",
16
16
  "file_path": "code-example.md",
17
17
  "is_active": true,