refactor: drop cc_ prefix from module names#144
Merged
Conversation
Rename the four cc_-prefixed modules to plain names for readability:
cc_config.py -> config.py
cc_daemon/ -> daemon/
cc_kernel/ -> kernel/
cc_mcp/ -> mcp_client/
The MCP client is named mcp_client/ rather than bare mcp/ to avoid
shadowing Python's namespace and the modelcontextprotocol package.
Test files test_cc_daemon_*.py are renamed to test_daemon_*.py to match.
References updated across .py, docs/, RFCs, README, CONTRIBUTING,
pyproject.toml (py-modules + packages.find), and ci.yml using
whole-word matching so unrelated tokens (cc_bin, cc_script, cv_acc_mean,
cc_tool_call_debug, etc.) are left untouched.
Fix two name-collision regressions surfaced by the rename, where the
now-generic module name clashed with a same-scope local variable:
- tests/test_setup_wizard.py: `import config` shadowed the `config`
dict param of the wizard helper; alias the module to `_config_mod`.
- examples/kernel_e2e_smoke.py: `with kernel.Kernel.open() as kernel`
self-shadowed the module; and `_run_demo`'s `kernel` instance param
collided with module-level `kernel.ScheduleSpec`/`SandboxPolicy`.
Bind the context var as `kern` and import the classes at module level.
Full suite: 2449 passed, 3 skipped.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename the four cc_-prefixed modules to plain names for readability:
cc_config.py -> config.py
cc_daemon/ -> daemon/
cc_kernel/ -> kernel/
cc_mcp/ -> mcp_client/
The MCP client is named mcp_client/ rather than bare mcp/ to avoid shadowing Python's namespace and the modelcontextprotocol package. Test files test_cc_daemon_.py are renamed to test_daemon_.py to match.
References updated across .py, docs/, RFCs, README, CONTRIBUTING, pyproject.toml (py-modules + packages.find), and ci.yml using whole-word matching so unrelated tokens (cc_bin, cc_script, cv_acc_mean, cc_tool_call_debug, etc.) are left untouched.
Fix two name-collision regressions surfaced by the rename, where the now-generic module name clashed with a same-scope local variable:
import configshadowed theconfigdict param of the wizard helper; alias the module to_config_mod.with kernel.Kernel.open() as kernelself-shadowed the module; and_run_demo'skernelinstance param collided with module-levelkernel.ScheduleSpec/SandboxPolicy. Bind the context var askernand import the classes at module level.Full suite: 2449 passed, 3 skipped.