jvcli 2.0.11__tar.gz → 2.0.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.
Files changed (82) hide show
  1. {jvcli-2.0.11/jvcli.egg-info → jvcli-2.0.13}/PKG-INFO +1 -1
  2. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/__init__.py +1 -1
  3. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/startproject.py +16 -2
  4. jvcli-2.0.13/jvcli/templates/2.0.0/project/gitignore.example +53 -0
  5. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/exportenv.sh +2 -2
  6. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/importagent.sh +4 -4
  7. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/initagents.sh +2 -2
  8. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/inituser.sh +1 -1
  9. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/serve.sh +1 -1
  10. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/sh/startclient.sh +1 -1
  11. {jvcli-2.0.11 → jvcli-2.0.13/jvcli.egg-info}/PKG-INFO +1 -1
  12. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/SOURCES.txt +1 -0
  13. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_startproject.py +13 -4
  14. {jvcli-2.0.11 → jvcli-2.0.13}/LICENSE +0 -0
  15. {jvcli-2.0.11 → jvcli-2.0.13}/MANIFEST.in +0 -0
  16. {jvcli-2.0.11 → jvcli-2.0.13}/README.md +0 -0
  17. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/api.py +0 -0
  18. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/auth.py +0 -0
  19. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/cli.py +0 -0
  20. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/__init__.py +0 -0
  21. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/app.py +0 -0
  22. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/__init__.py +0 -0
  23. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/page.py +0 -0
  24. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/utils.py +0 -0
  25. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/lib/widgets.py +0 -0
  26. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/__init__.py +0 -0
  27. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/analytics_page.py +0 -0
  28. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/chat_page.py +0 -0
  29. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/dashboard_page.py +0 -0
  30. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/client/pages/graph_page.py +0 -0
  31. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/__init__.py +0 -0
  32. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/auth.py +0 -0
  33. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/client.py +0 -0
  34. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/create.py +0 -0
  35. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/download.py +0 -0
  36. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/info.py +0 -0
  37. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/publish.py +0 -0
  38. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/studio.py +0 -0
  39. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/commands/update.py +0 -0
  40. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/assets/index-DDV79SDu.js +0 -0
  41. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/assets/index-DdMMONxd.css +0 -0
  42. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/index.html +0 -0
  43. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/jac_logo.png +0 -0
  44. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/tauri.svg +0 -0
  45. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio/vite.svg +0 -0
  46. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/assets/index-Bh6lyeXA.js +0 -0
  47. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/assets/index-DdMMONxd.css +0 -0
  48. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/index.html +0 -0
  49. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/jac_logo.png +0 -0
  50. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/tauri.svg +0 -0
  51. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/studio-auth/vite.svg +0 -0
  52. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/action_info.yaml +0 -0
  53. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_descriptor.yaml +0 -0
  54. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_info.yaml +0 -0
  55. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_knowledge.yaml +0 -0
  56. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/agent_memory.yaml +0 -0
  57. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/README.md +0 -0
  58. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/actions/README.md +0 -0
  59. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/daf/README.md +0 -0
  60. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/env.example +0 -0
  61. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/globals.jac +0 -0
  62. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/main.jac +0 -0
  63. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/2.0.0/project/tests/README.md +0 -0
  64. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/CHANGELOG.md +0 -0
  65. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/templates/README.md +0 -0
  66. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli/utils.py +0 -0
  67. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/dependency_links.txt +0 -0
  68. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/entry_points.txt +0 -0
  69. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/requires.txt +0 -0
  70. {jvcli-2.0.11 → jvcli-2.0.13}/jvcli.egg-info/top_level.txt +0 -0
  71. {jvcli-2.0.11 → jvcli-2.0.13}/setup.cfg +0 -0
  72. {jvcli-2.0.11 → jvcli-2.0.13}/setup.py +0 -0
  73. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_api.py +0 -0
  74. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_auth.py +0 -0
  75. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_cli.py +0 -0
  76. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_create.py +0 -0
  77. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_download.py +0 -0
  78. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_info.py +0 -0
  79. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_publish.py +0 -0
  80. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_studio.py +0 -0
  81. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_update.py +0 -0
  82. {jvcli-2.0.11 → jvcli-2.0.13}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jvcli
3
- Version: 2.0.11
3
+ Version: 2.0.13
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -4,5 +4,5 @@ jvcli package initialization.
4
4
  This package provides the CLI tool for Jivas Package Repository.
5
5
  """
6
6
 
7
- __version__ = "2.0.11"
7
+ __version__ = "2.0.13"
8
8
  __supported__jivas__versions__ = ["2.0.0"]
@@ -23,6 +23,7 @@ def startproject(project_name: str, version: str) -> None:
23
23
  Usage:
24
24
  jvcli startproject <project_name> [--version <jivas_version>]
25
25
  """
26
+
26
27
  template_path = os.path.join(TEMPLATES_DIR, version, "project")
27
28
 
28
29
  if not os.path.exists(template_path):
@@ -61,9 +62,22 @@ def startproject(project_name: str, version: str) -> None:
61
62
  with open(template_file_path, "r") as template_file:
62
63
  contents = template_file.read()
63
64
 
64
- # Write `.env` instead of `env.example`
65
+ if file_name == "gitignore.example":
66
+ # Write `.gitignore`
67
+ target_file_path_gitignore = os.path.join(target_dir, ".gitignore")
68
+ with open(target_file_path_gitignore, "w") as gitignore_file:
69
+ gitignore_file.write(contents)
70
+
65
71
  if file_name == "env.example":
66
- target_file_path = os.path.join(target_dir, ".env")
72
+ # Write `.env`
73
+ target_file_path_env = os.path.join(target_dir, ".env")
74
+ with open(target_file_path_env, "w") as env_file:
75
+ env_file.write(contents)
76
+
77
+ # Write `env.example`
78
+ target_file_path_example = os.path.join(target_dir, "env.example")
79
+ with open(target_file_path_example, "w") as example_file:
80
+ example_file.write(contents)
67
81
 
68
82
  with open(target_file_path, "w") as project_file:
69
83
  project_file.write(contents)
@@ -0,0 +1,53 @@
1
+ # Python #
2
+ *.pyc
3
+ __pycache__
4
+ venv
5
+ .pytest_cache
6
+ __jac_gen__
7
+
8
+ # Distribution / packaging
9
+ .Python
10
+ play/
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+ test_source/
28
+
29
+ # Others #
30
+ .coverage
31
+ .session
32
+ *.session.db
33
+ mydatabase/
34
+ actions/jivas/
35
+ .DS_Store
36
+ .vscode
37
+ build
38
+ *Zone.Identifier
39
+ .DS_Store
40
+ parser.out
41
+ codegen_output*
42
+ .qodo
43
+ .files
44
+ *.rdb
45
+ node_modules
46
+ out.dot
47
+ out.txt
48
+ .jvdata
49
+ .env
50
+
51
+ # Mypy files #
52
+ .mypy_cache*
53
+ .jac_mypy_cache*
@@ -2,8 +2,8 @@
2
2
 
3
3
  # Export env vars
4
4
  set -o allexport
5
- if [ -f .env ]; then
6
- source .env
5
+ if [ -f ./.env ]; then
6
+ source ./.env
7
7
  else
8
8
  echo ".env file not found"
9
9
  exit 1
@@ -10,22 +10,22 @@ fi
10
10
  DAF_NAME="$1"
11
11
 
12
12
  # Export env vars
13
- source sh/exportenv.sh
13
+ source ./sh/exportenv.sh
14
14
 
15
15
  # Init the user token
16
- source sh/inituser.sh
16
+ source ./sh/inituser.sh
17
17
 
18
18
  # Wait until JIVAS_TOKEN is set
19
19
  while [ -z "$JIVAS_TOKEN" ]; do
20
20
  echo "Waiting for JIVAS_TOKEN to be initialized..."
21
21
  sleep 1
22
- source sh/inituser.sh
22
+ source ./sh/inituser.sh
23
23
  done
24
24
 
25
25
  # Check if JIVAS_TOKEN is set
26
26
  if [ -n "$JIVAS_TOKEN" ]; then
27
27
 
28
- echo -e "\n\nImporting demo agent...\n"
28
+ echo -e "\n\nImporting agent...\n"
29
29
  # Import the agent
30
30
  AGENT_ID=$(curl --silent --show-error --no-progress-meter \
31
31
  --request POST \
@@ -2,10 +2,10 @@
2
2
  # Script to authenticate and initialize jivas agents
3
3
 
4
4
  # Export env vars
5
- source sh/exportenv.sh
5
+ source ./sh/exportenv.sh
6
6
 
7
7
  # Init the user token
8
- source sh/inituser.sh
8
+ source ./sh/inituser.sh
9
9
 
10
10
  # Check if JIVAS_TOKEN is set
11
11
  if [ -n "$JIVAS_TOKEN" ]; then
@@ -7,7 +7,7 @@ if [ -z "$JIVAS_PORT" ] || [ -z "$JIVAS_PASSWORD" ] || [ -z "$JIVAS_USER" ]; the
7
7
  exit 1
8
8
  fi
9
9
 
10
- if lsof -i :$JIVAS_PORT >/dev/null; then
10
+ if lsof -i :$JIVAS_PORT >/dev/null || netstat -an | grep -q ":$JIVAS_PORT .*LISTEN"; then
11
11
 
12
12
  # Try to login first
13
13
  JIVAS_TOKEN=$(curl --silent --show-error --no-progress-meter \
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Script to serve jivas app
3
3
 
4
- source sh/exportenv.sh
4
+ source ./sh/exportenv.sh
5
5
 
6
6
  # serve jivas app
7
7
  jac jvserve main.jac
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Script to serve jivas client app
3
3
 
4
- source sh/exportenv.sh
4
+ source ./sh/exportenv.sh
5
5
 
6
6
  # launch jivas client app
7
7
  jvcli client launch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jvcli
3
- Version: 2.0.11
3
+ Version: 2.0.13
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -55,6 +55,7 @@ jvcli/templates/2.0.0/agent_knowledge.yaml
55
55
  jvcli/templates/2.0.0/agent_memory.yaml
56
56
  jvcli/templates/2.0.0/project/README.md
57
57
  jvcli/templates/2.0.0/project/env.example
58
+ jvcli/templates/2.0.0/project/gitignore.example
58
59
  jvcli/templates/2.0.0/project/globals.jac
59
60
  jvcli/templates/2.0.0/project/main.jac
60
61
  jvcli/templates/2.0.0/project/actions/README.md
@@ -17,7 +17,7 @@ class TestStartProjectCommand:
17
17
 
18
18
  # Mock file system operations
19
19
  mock_makedirs = mocker.patch("os.makedirs")
20
- mocker.patch("os.path.exists", return_value=True)
20
+ mocker.patch("os.path.exists", side_effect=lambda path: path != "test_project")
21
21
 
22
22
  # Mock open with support for both text and binary modes
23
23
  mock_file = mocker.mock_open(read_data=b"template content")
@@ -45,6 +45,9 @@ class TestStartProjectCommand:
45
45
  "main.jac",
46
46
  "globals.jac",
47
47
  ".env",
48
+ "env.example",
49
+ ".gitignore",
50
+ "gitignore.example",
48
51
  "README.md",
49
52
  "actions/README.md",
50
53
  "daf/README.md",
@@ -58,10 +61,16 @@ class TestStartProjectCommand:
58
61
  ]
59
62
 
60
63
  mock_calls = mock_open.mock_calls
61
- written_files = [
62
- call.args[0] for call in mock_calls if "test_project" in str(call)
64
+ written_files = {
65
+ os.path.normpath(call.args[0])
66
+ for call in mock_calls
67
+ if "test_project" in str(call)
68
+ }
69
+ normalized_expected_files = [
70
+ os.path.normpath(os.path.join("test_project", file))
71
+ for file in expected_files
63
72
  ]
64
- assert len(written_files) == len(expected_files)
73
+ assert set(written_files) == set(normalized_expected_files)
65
74
 
66
75
  # Verify success message
67
76
  mock_click.assert_called_with(
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
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