chatup 0.2.7__tar.gz → 0.2.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.
Files changed (88) hide show
  1. {chatup-0.2.7/src/chatup.egg-info → chatup-0.2.9}/PKG-INFO +1 -1
  2. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/__init__.py +1 -1
  3. chatup-0.2.9/src/chatup/cli.py +111 -0
  4. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/zulip.py +3 -1
  5. {chatup-0.2.7 → chatup-0.2.9/src/chatup.egg-info}/PKG-INFO +1 -1
  6. {chatup-0.2.7 → chatup-0.2.9}/tests/test_service_installers.py +3 -0
  7. chatup-0.2.9/tests/test_version.py +45 -0
  8. chatup-0.2.7/src/chatup/cli.py +0 -31
  9. chatup-0.2.7/tests/test_version.py +0 -23
  10. {chatup-0.2.7 → chatup-0.2.9}/LICENSE +0 -0
  11. {chatup-0.2.7 → chatup-0.2.9}/README.md +0 -0
  12. {chatup-0.2.7 → chatup-0.2.9}/pyproject.toml +0 -0
  13. {chatup-0.2.7 → chatup-0.2.9}/setup.cfg +0 -0
  14. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/chrome_for_testing.py +0 -0
  15. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/chromedriver.py +0 -0
  16. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/commands/__init__.py +0 -0
  17. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/commands/chrome_for_testing.py +0 -0
  18. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/commands/chromedriver.py +0 -0
  19. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/commands/playwright.py +0 -0
  20. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/config.py +0 -0
  21. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/const.py +0 -0
  22. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/interaction/__init__.py +0 -0
  23. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/interaction/command_schema.py +0 -0
  24. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/interaction/policy.py +0 -0
  25. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/interaction/warnings.py +0 -0
  26. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/playwright.py +0 -0
  27. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/runtime/__init__.py +0 -0
  28. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/runtime/_managed_artifact.py +0 -0
  29. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/runtime/chrome_for_testing.py +0 -0
  30. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/runtime/chromedriver.py +0 -0
  31. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/runtime/playwright.py +0 -0
  32. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/__init__.py +0 -0
  33. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/assets/hermes/install.sh +0 -0
  34. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/assets/nvm.sh +0 -0
  35. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/cc_connect.py +0 -0
  36. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/claude.py +0 -0
  37. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/cli.py +0 -0
  38. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/codex.py +0 -0
  39. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/crs.py +0 -0
  40. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/cursor_agent.py +0 -0
  41. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/discourse.py +0 -0
  42. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/docker.py +0 -0
  43. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/elements.py +0 -0
  44. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/frp.py +0 -0
  45. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/gitea.py +0 -0
  46. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/hermes.py +0 -0
  47. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/lark_cli.py +0 -0
  48. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/mode_prompt.py +0 -0
  49. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/mysql.py +0 -0
  50. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/nginx.py +0 -0
  51. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/nodejs.py +0 -0
  52. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/opencode.py +0 -0
  53. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/service_credentials.py +0 -0
  54. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/shell_rc.py +0 -0
  55. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/uv.py +0 -0
  56. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/__init__.py +0 -0
  57. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/cli.py +0 -0
  58. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/core.py +0 -0
  59. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/options.py +0 -0
  60. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/render.py +0 -0
  61. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/templates/default/en/AGENTS.md +0 -0
  62. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/templates/default/en/discussion/README.md +0 -0
  63. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/templates/default/en/projects/README.md +0 -0
  64. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/templates/default/zh/AGENTS.md +0 -0
  65. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/templates/default/zh/discussion/README.md +0 -0
  66. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace/templates/default/zh/projects/README.md +0 -0
  67. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/workspace.py +0 -0
  68. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/setup/zsh.py +0 -0
  69. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/utils/__init__.py +0 -0
  70. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/utils/custom_logger.py +0 -0
  71. {chatup-0.2.7 → chatup-0.2.9}/src/chatup/utils/pathing.py +0 -0
  72. {chatup-0.2.7 → chatup-0.2.9}/src/chatup.egg-info/SOURCES.txt +0 -0
  73. {chatup-0.2.7 → chatup-0.2.9}/src/chatup.egg-info/dependency_links.txt +0 -0
  74. {chatup-0.2.7 → chatup-0.2.9}/src/chatup.egg-info/entry_points.txt +0 -0
  75. {chatup-0.2.7 → chatup-0.2.9}/src/chatup.egg-info/requires.txt +0 -0
  76. {chatup-0.2.7 → chatup-0.2.9}/src/chatup.egg-info/top_level.txt +0 -0
  77. {chatup-0.2.7 → chatup-0.2.9}/tests/test_browser_backend_cli.py +0 -0
  78. {chatup-0.2.7 → chatup-0.2.9}/tests/test_chrome_for_testing.py +0 -0
  79. {chatup-0.2.7 → chatup-0.2.9}/tests/test_chromedriver.py +0 -0
  80. {chatup-0.2.7 → chatup-0.2.9}/tests/test_cli_tree_docs.py +0 -0
  81. {chatup-0.2.7 → chatup-0.2.9}/tests/test_crs_setup.py +0 -0
  82. {chatup-0.2.7 → chatup-0.2.9}/tests/test_cursor_agent_setup.py +0 -0
  83. {chatup-0.2.7 → chatup-0.2.9}/tests/test_playwright.py +0 -0
  84. {chatup-0.2.7 → chatup-0.2.9}/tests/test_playwright_cli.py +0 -0
  85. {chatup-0.2.7 → chatup-0.2.9}/tests/test_publish_workflow.py +0 -0
  86. {chatup-0.2.7 → chatup-0.2.9}/tests/test_pyproject_metadata.py +0 -0
  87. {chatup-0.2.7 → chatup-0.2.9}/tests/test_setup_cli.py +0 -0
  88. {chatup-0.2.7 → chatup-0.2.9}/tests/test_workspace_setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chatup
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: ChatArch setup CLI extracted from ChatTool
5
5
  Author-email: rexwzh <1073853456@qq.com>
6
6
  License-Expression: MIT
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.2.7"
5
+ __version__ = "0.2.9"
@@ -0,0 +1,111 @@
1
+ from __future__ import annotations
2
+
3
+ import inspect
4
+
5
+ import click
6
+
7
+ from chatup import __version__
8
+ from chatup.commands.chrome_for_testing import cli as chrome_for_testing_cli
9
+ from chatup.commands.chromedriver import cli as chromedriver_cli
10
+ from chatup.commands.playwright import cli as playwright_cli
11
+ from chatup.setup.cli import register_setup_commands
12
+
13
+
14
+ def _purpose(command: click.Command) -> str:
15
+ text = command.short_help or inspect.getdoc(command.callback) or ""
16
+ return " ".join(text.strip().split()).rstrip(".")
17
+
18
+
19
+ def _parameter_piece(parameter: click.Parameter) -> str | None:
20
+ if getattr(parameter, "hidden", False) or parameter.name == "help":
21
+ return None
22
+ if isinstance(parameter, click.Argument):
23
+ piece = parameter.name.upper().replace("_", "-")
24
+ if not parameter.required:
25
+ piece = f"[{piece}]"
26
+ if parameter.nargs == -1:
27
+ piece = f"{piece}..."
28
+ return piece
29
+ if not isinstance(parameter, click.Option):
30
+ return None
31
+ option_names = [name for name in (*parameter.opts, *parameter.secondary_opts) if name.startswith("--")]
32
+ if not option_names:
33
+ option_names = [name for name in (*parameter.opts, *parameter.secondary_opts) if name.startswith("-")]
34
+ if not option_names:
35
+ return None
36
+ if parameter.is_flag or parameter.flag_value is not None:
37
+ piece = "/".join(option_names)
38
+ else:
39
+ metavar = parameter.metavar or parameter.name.upper().replace("_", "-")
40
+ piece = f"{'/'.join(option_names)} {metavar}"
41
+ if not parameter.required:
42
+ piece = f"[{piece}]"
43
+ return piece
44
+
45
+
46
+ def _command_signature(name: str, command: click.Command) -> str:
47
+ pieces = [piece for piece in (_parameter_piece(parameter) for parameter in command.params) if piece]
48
+ return " ".join([name, *pieces])
49
+
50
+
51
+ def _render_command_tree(command: click.Command, name: str, prefix: str, is_last: bool, lines: list[str]) -> None:
52
+ connector = "└── " if is_last else "├── "
53
+ line = f"{prefix}{connector}{_command_signature(name, command)}"
54
+ purpose = _purpose(command)
55
+ if purpose:
56
+ line = f"{line} # {purpose}"
57
+ lines.append(line)
58
+ if not isinstance(command, click.Group):
59
+ return
60
+ children = [(child_name, child) for child_name, child in command.commands.items() if not child.hidden]
61
+ child_prefix = prefix + (" " if is_last else "│ ")
62
+ for index, (child_name, child) in enumerate(children):
63
+ _render_command_tree(child, child_name, child_prefix, index == len(children) - 1, lines)
64
+
65
+
66
+ def _render_cli_tree(root: click.Group) -> str:
67
+ children = [(name, command) for name, command in root.commands.items() if not command.hidden]
68
+ lines = [f"chatup # {_purpose(root)}"]
69
+ root_options = [
70
+ ("--help", "Show help for the current command."),
71
+ ("--version", "Show package version."),
72
+ ("--tree", "Print the registered CLI tree."),
73
+ ]
74
+ for index, (option, purpose) in enumerate(root_options):
75
+ is_last = not children and index == len(root_options) - 1
76
+ lines.append(f"{'└──' if is_last else '├──'} {option} # {purpose}")
77
+ for index, (child_name, child) in enumerate(children):
78
+ _render_command_tree(child, child_name, "", index == len(children) - 1, lines)
79
+ return "\n".join(lines)
80
+
81
+
82
+ @click.group(
83
+ context_settings={"help_option_names": ["-h", "--help"]},
84
+ invoke_without_command=True,
85
+ no_args_is_help=True,
86
+ )
87
+ @click.version_option(__version__, prog_name="chatup")
88
+ @click.option("--tree", "show_tree", is_flag=True, is_eager=True, help="Print the registered CLI tree.")
89
+ @click.pass_context
90
+ def main(ctx: click.Context, show_tree: bool) -> None:
91
+ """ChatUp CLI for ChatArch bootstrap workflows."""
92
+
93
+ if show_tree:
94
+ click.echo(_render_cli_tree(ctx.command))
95
+ ctx.exit()
96
+
97
+
98
+ @main.command(name="doctor")
99
+ def doctor() -> None:
100
+ """Check that ChatUp is installed and callable."""
101
+ click.echo(f"chatup {__version__} ok")
102
+
103
+
104
+ register_setup_commands(main)
105
+ main.add_command(chrome_for_testing_cli)
106
+ main.add_command(chromedriver_cli)
107
+ main.add_command(playwright_cli)
108
+
109
+
110
+ if __name__ == "__main__":
111
+ main()
@@ -119,6 +119,7 @@ services:
119
119
  memcached:
120
120
  image: "memcached:alpine"
121
121
  restart: unless-stopped
122
+ user: "0:0"
122
123
  command:
123
124
  - "sh"
124
125
  - "-euc"
@@ -126,7 +127,8 @@ services:
126
127
  echo 'mech_list: plain' > "$$SASL_CONF_PATH"
127
128
  echo "zulip@$$HOSTNAME:$$(cat $$MEMCACHED_PASSWORD_FILE)" > "$$MEMCACHED_SASL_PWDB"
128
129
  echo "zulip@localhost:$$(cat $$MEMCACHED_PASSWORD_FILE)" >> "$$MEMCACHED_SASL_PWDB"
129
- exec memcached -S
130
+ chown memcache:memcache "$$SASL_CONF_PATH" "$$MEMCACHED_SASL_PWDB"
131
+ exec memcached -S -u memcache
130
132
  secrets:
131
133
  - zulip__memcached_password
132
134
  environment:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chatup
3
- Version: 0.2.7
3
+ Version: 0.2.9
4
4
  Summary: ChatArch setup CLI extracted from ChatTool
5
5
  Author-email: rexwzh <1073853456@qq.com>
6
6
  License-Expression: MIT
@@ -78,6 +78,9 @@ def test_zulip_setup_writes_compose_with_bind_mounts_and_hidden_admin_password(t
78
78
  assert "ZULIP_ADMIN_PASSWORD=secret-password" in admin_env.read_text(encoding="utf-8")
79
79
  text = compose.read_text(encoding="utf-8")
80
80
  assert "127.0.0.1:3099:80" in text
81
+ assert 'user: "0:0"' in text
82
+ assert "chown memcache:memcache" in text
83
+ assert "exec memcached -S -u memcache" in text
81
84
  assert str(home / "data" / "postgresql-14") in text
82
85
  assert str(home / "data" / "zulip") in text
83
86
  assert "SETTING_ZULIP_ADMINISTRATOR: \"admin@example.com\"" in text
@@ -0,0 +1,45 @@
1
+ from click.testing import CliRunner
2
+
3
+ from chatup import __version__
4
+ from chatup.cli import main
5
+
6
+
7
+ def test_version_present():
8
+ assert __version__ == "0.2.9"
9
+
10
+
11
+ def test_cli_help():
12
+ result = CliRunner().invoke(main, ["--help"])
13
+
14
+ assert result.exit_code == 0
15
+ assert "ChatUp CLI" in result.output
16
+ assert "doctor" in result.output
17
+ assert "--tree" in result.output
18
+
19
+
20
+ def test_cli_tree_lists_registered_command_surface():
21
+ result = CliRunner().invoke(main, ["--tree"])
22
+
23
+ assert result.exit_code == 0, result.output
24
+ assert "chatup # ChatUp CLI for ChatArch bootstrap workflows" in result.output
25
+ assert "├── --help # Show help for the current command." in result.output
26
+ assert "├── --version # Show package version." in result.output
27
+ assert "├── --tree # Print the registered CLI tree." in result.output
28
+ for command in [
29
+ "doctor",
30
+ "workspace",
31
+ "chrome-for-testing",
32
+ "chromedriver",
33
+ "playwright",
34
+ ]:
35
+ assert command in result.output
36
+ assert "chrome-for-testing" in result.output
37
+ assert "│ ├── install" in result.output
38
+ assert "│ └── gc" in result.output
39
+
40
+
41
+ def test_cli_doctor():
42
+ result = CliRunner().invoke(main, ["doctor"])
43
+
44
+ assert result.exit_code == 0
45
+ assert "chatup 0.2.9 ok" in result.output
@@ -1,31 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import click
4
-
5
- from chatup import __version__
6
- from chatup.commands.chrome_for_testing import cli as chrome_for_testing_cli
7
- from chatup.commands.chromedriver import cli as chromedriver_cli
8
- from chatup.commands.playwright import cli as playwright_cli
9
- from chatup.setup.cli import register_setup_commands
10
-
11
-
12
- @click.group(context_settings={"help_option_names": ["-h", "--help"]})
13
- @click.version_option(__version__, prog_name="chatup")
14
- def main() -> None:
15
- """ChatUp CLI for ChatArch bootstrap workflows."""
16
-
17
-
18
- @main.command(name="doctor")
19
- def doctor() -> None:
20
- """Check that ChatUp is installed and callable."""
21
- click.echo(f"chatup {__version__} ok")
22
-
23
-
24
- register_setup_commands(main)
25
- main.add_command(chrome_for_testing_cli)
26
- main.add_command(chromedriver_cli)
27
- main.add_command(playwright_cli)
28
-
29
-
30
- if __name__ == "__main__":
31
- main()
@@ -1,23 +0,0 @@
1
- from click.testing import CliRunner
2
-
3
- from chatup import __version__
4
- from chatup.cli import main
5
-
6
-
7
- def test_version_present():
8
- assert __version__ == "0.2.7"
9
-
10
-
11
- def test_cli_help():
12
- result = CliRunner().invoke(main, ["--help"])
13
-
14
- assert result.exit_code == 0
15
- assert "ChatUp CLI" in result.output
16
- assert "doctor" in result.output
17
-
18
-
19
- def test_cli_doctor():
20
- result = CliRunner().invoke(main, ["doctor"])
21
-
22
- assert result.exit_code == 0
23
- assert "chatup 0.2.7 ok" in result.output
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