-
-
Notifications
You must be signed in to change notification settings - Fork 52
Add one-command investor demo (fixes #243) #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add one-command investor demo (fixes #243) #303
Conversation
WalkthroughAdds a new Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as CortexCLI
participant Demo as cortex.demo:run_demo()
participant Branding as cortex.branding:show_banner
participant HW as cortex.hardware_detection:detect_hardware
participant Model as ModelRecommender
participant LLM as MockLLM
participant Kernel as KernelScheduler
participant Runtime as AIRuntime
User->>CLI: run "cortex demo"
CLI->>Demo: invoke run_demo()
Demo->>Branding: show banner/header
Demo->>HW: detect_hardware()
HW-->>Demo: hardware info (CPU, RAM, GPU?)
alt GPU present
Demo->>Model: recommend GPU-optimized models
else CPU only
Demo->>Model: recommend CPU-friendly models
end
Demo->>LLM: run quick mock LLM test (prompt → response)
Demo->>Kernel: query Kernel Scheduler status
Demo->>Runtime: query AI Runtime status
Demo-->>CLI: return status/exit code
CLI-->>User: print demo output/summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cortex/cli.py (1)
542-548: Remove duplicatedemo()method definition.This duplicate method definition overrides the correct implementation at lines 174-182, causing the new demo feature to fail. Python will only use this second definition, which doesn't call
run_demo()as intended.Remove this duplicate method entirely:
- def demo(self): - """Run a demo showing Cortex capabilities without API key""" - show_banner() - console.print() - cx_print("Running Demo...", "info") - # (Keep existing demo logic) - return 0 -
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cortex/cli.py(2 hunks)cortex/demo.py(1 hunks)docs/demo.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs
Files:
cortex/demo.pycortex/cli.py
🧬 Code graph analysis (2)
cortex/demo.py (2)
cortex/hardware_detection.py (1)
detect_hardware(632-634)cortex/branding.py (1)
show_banner(35-46)
cortex/cli.py (1)
cortex/demo.py (1)
run_demo(7-48)
🪛 GitHub Actions: CI
cortex/cli.py
[error] 14-14: Ruff I001: Import block is un-sorted or un-formatted.
🪛 GitHub Check: Lint
cortex/demo.py
[failure] 48-48: Ruff (W292)
cortex/demo.py:48:55: W292 No newline at end of file
[failure] 1-3: Ruff (I001)
cortex/demo.py:1:1: I001 Import block is un-sorted or un-formatted
cortex/cli.py
[failure] 182-182: Ruff (W293)
cortex/cli.py:182:1: W293 Blank line contains whitespace
[failure] 178-178: Ruff (W293)
cortex/cli.py:178:1: W293 Blank line contains whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cortex/cli.py (1)
538-544: Remove duplicatedemo()method definition.This is the second definition of the
demo()method (first at lines 173-179). Python will use this implementation and ignore the first one. Having duplicate method definitions is a critical correctness issue.Based on the PR objectives to implement a full investor demo, the first implementation (lines 173-179) that delegates to
run_demo()appears to be the correct one. Remove this duplicate:- def demo(self): - """Run a demo showing Cortex capabilities without API key""" - show_banner() - console.print() - cx_print("Running Demo...", "info") - # (Keep existing demo logic) - return 0 -
♻️ Duplicate comments (6)
cortex/cli.py (2)
14-30: Fix import order to resolve pipeline failure.The import block is unsorted, causing the Ruff I001 pipeline failure. The
cortex.demoimport should be placed alphabetically among the othercorteximports.Apply this diff to sort the imports:
from cortex.branding import VERSION, console, cx_header, cx_print, show_banner from cortex.coordinator import InstallationCoordinator, StepStatus +from cortex.demo import run_demo from cortex.installation_history import InstallationHistory, InstallationStatus, InstallationType from cortex.llm.interpreter import CommandInterpreter # Import the new Notification Manager from cortex.notification_manager import NotificationManager from cortex.user_preferences import ( PreferencesManager, format_preference_value, print_all_preferences, ) from cortex.validators import ( validate_api_key, validate_install_request, ) -from cortex.demo import run_demoAs per coding guidelines, imports must follow PEP 8 style.
173-179: Remove duplicate method definition—only the seconddemo()will execute.This
demo()method at lines 173-179 is overridden by a duplicate definition at lines 538-544. Python will only use the second definition, making this implementation dead code.If this implementation (which delegates to
run_demo()) is the correct one, remove the duplicate at lines 538-544. Otherwise, remove this one.Additionally, fix the docstring format and trailing whitespace per PEP 8:
def demo(self): - """ - Run the one-command investor demo - """ + """Run the one-command investor demo.""" return run_demo() -As per coding guidelines, docstrings must follow PEP 257 conventions.
cortex/demo.py (4)
1-3: Fix import formatting to resolve pipeline failure.The import block is unsorted (Ruff I001). Standard library imports should be separated from local imports with a blank line.
Apply this diff:
import time + from cortex.hardware_detection import detect_hardware from cortex.branding import show_banner -As per coding guidelines, imports must follow PEP 8 style.
5-5: Add required type hints and docstring per coding guidelines.The function is missing a return type hint and docstring, violating the coding guidelines that require both for all public APIs.
Apply this diff:
-def run_demo(): +def run_demo() -> int: + """ + Run the one-command investor demo showcasing Cortex capabilities. + + Performs a 30-60 second demonstration including hardware detection, + model recommendations, mock LLM test, and system readiness status. + + Returns: + int: Exit code (0 for success) + """ show_banner()As per coding guidelines, type hints and docstrings are required for all public APIs.
15-22: Fix AttributeError—SystemInfo is a dataclass, not a dict.The code uses
.get()method on theSystemInfodataclass returned bydetect_hardware(), but dataclasses don't have dict-like methods. This will raiseAttributeErrorat runtime.Apply this diff to use attribute access:
- print(f"✔ CPU: {hw.get('cpu', 'Unknown')}") - print(f"✔ RAM: {hw.get('memory_gb', 'Unknown')} GB") + print(f"✔ CPU: {hw.cpu if hw.cpu else 'Unknown'}") + print(f"✔ RAM: {hw.memory.total_gb if hw.memory and hw.memory.total_gb else 'Unknown'} GB") - gpu = hw.get("gpu") + gpu = hw.gpu if gpu: print(f"✔ GPU: {gpu}") else: print("⚠️ GPU: Not detected (CPU mode enabled)")Based on the
SystemInfodataclass structure fromcortex/hardware_detection.py.
44-47: Add return value and fix whitespace issues.The function should return an exit code (0 for success) since it's called from CLI context. Additionally, fix trailing whitespace and ensure the file ends with a newline.
Apply this diff:
# 5️⃣ Summary print("\n✅ Demo Complete") print("🎉 Your system is READY for AI workloads\n") - + return 0And ensure the file ends with a single newline character (no trailing whitespace).
As per coding guidelines, Python files must follow PEP 8 formatting.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cortex/cli.py(2 hunks)cortex/demo.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs
Files:
cortex/demo.pycortex/cli.py
🧬 Code graph analysis (2)
cortex/demo.py (2)
cortex/hardware_detection.py (1)
detect_hardware(632-634)cortex/branding.py (1)
show_banner(35-46)
cortex/cli.py (1)
cortex/demo.py (1)
run_demo(5-46)
🪛 GitHub Actions: CI
cortex/cli.py
[error] 14-14: ruff check failure: Import block is un-sorted or un-formatted. I001
🪛 GitHub Check: Lint
cortex/demo.py
[failure] 47-47: Ruff (W292)
cortex/demo.py:47:5: W292 No newline at end of file
[failure] 47-47: Ruff (W293)
cortex/demo.py:47:1: W293 Blank line contains whitespace
[failure] 1-3: Ruff (I001)
cortex/demo.py:1:1: I001 Import block is un-sorted or un-formatted
cortex/cli.py
[failure] 14-30: Ruff (I001)
cortex/cli.py:14:1: I001 Import block is un-sorted or un-formatted
[failure] 179-179: Ruff (W291)
cortex/cli.py:179:39: W291 Trailing whitespace
[failure] 178-178: Ruff (W293)
cortex/cli.py:178:1: W293 Blank line contains whitespace
2e1008b to
a4fca7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (4)
cortex/cli.py (1)
14-31: Fix import order to resolve pipeline failure.The import block remains unsorted, causing the CI pipeline failure (Ruff I001). The
cortex.demoimport on line 31 should be placed alphabetically among the othercorteximports.Apply this diff to fix the import order:
from cortex.branding import VERSION, console, cx_header, cx_print, show_banner from cortex.coordinator import InstallationCoordinator, StepStatus +from cortex.demo import run_demo from cortex.installation_history import InstallationHistory, InstallationStatus, InstallationType from cortex.llm.interpreter import CommandInterpreter # Import the new Notification Manager from cortex.notification_manager import NotificationManager from cortex.user_preferences import ( PreferencesManager, format_preference_value, print_all_preferences, ) from cortex.validators import ( validate_api_key, validate_install_request, ) - -from cortex.demo import run_democortex/demo.py (3)
6-6: Add type hints and docstring per coding guidelines.The function lacks a return type hint and docstring, violating the project's coding guidelines that require both for public APIs.
Apply this diff:
-def run_demo(): +def run_demo() -> int: + """ + Run the one-command investor demo showcasing Cortex capabilities. + + Performs a 30-60 second demonstration including hardware detection, + model recommendations, mock LLM test, and system readiness status. + + Returns: + int: Exit code (0 for success) + """ show_banner()
14-23: Fix AttributeError: SystemInfo is a dataclass, not a dict.The code uses
.get()method onhw(lines 16, 17, 19), butdetect_hardware()returns aSystemInfodataclass, not a dictionary. This will raiseAttributeErrorat runtime.Apply this diff to use attribute access:
hw = detect_hardware() - print(f"✔ CPU: {hw.get('cpu', 'Unknown')}") - print(f"✔ RAM: {hw.get('memory_gb', 'Unknown')} GB") + print(f"✔ CPU: {hw.cpu if hw.cpu else 'Unknown'}") + print(f"✔ RAM: {hw.memory.total_gb if hw.memory and hw.memory.total_gb else 'Unknown'} GB") - gpu = hw.get("gpu") + gpu = hw.gpu if gpu: print(f"✔ GPU: {gpu}") else:Run the following script to verify the SystemInfo structure:
#!/bin/bash # Verify SystemInfo dataclass structure and attributes ast-grep --pattern 'class SystemInfo'
45-48: Add return value and fix EOF formatting.The function should return an exit code (0 for success) since it's called from CLI context. Additionally, line 48 contains trailing whitespace and the file is missing a proper newline at EOF.
Apply this diff:
# 5️⃣ Summary print("\n✅ Demo Complete") print("🎉 Your system is READY for AI workloads\n") - + return 0
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cortex/cli.py(2 hunks)cortex/demo.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs
Files:
cortex/demo.pycortex/cli.py
🧬 Code graph analysis (2)
cortex/demo.py (2)
cortex/branding.py (1)
show_banner(35-46)cortex/hardware_detection.py (1)
detect_hardware(632-634)
cortex/cli.py (1)
cortex/demo.py (1)
run_demo(6-47)
🪛 GitHub Actions: CI
cortex/cli.py
[error] 14-14: Ruff: I001 Import block is un-sorted or un-formatted.
🪛 GitHub Check: Lint
cortex/demo.py
[failure] 48-48: Ruff (W292)
cortex/demo.py:48:5: W292 No newline at end of file
[failure] 48-48: Ruff (W293)
cortex/demo.py:48:1: W293 Blank line contains whitespace
[failure] 1-4: Ruff (I001)
cortex/demo.py:1:1: I001 Import block is un-sorted or un-formatted
cortex/cli.py
[failure] 14-31: Ruff (I001)
cortex/cli.py:14:1: I001 Import block is un-sorted or un-formatted
[failure] 179-179: Ruff (W291)
cortex/cli.py:179:39: W291 Trailing whitespace
🔇 Additional comments (2)
cortex/cli.py (1)
669-670: LGTM!The demo command is properly wired from the argument parser to the CLI method, and the help table correctly includes the new demo entry.
cortex/demo.py (1)
25-38: LGTM!The model recommendations correctly branch on GPU availability, and the mock LLM test safely demonstrates functionality without requiring actual LLM calls.
a4fca7c to
d76ee77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cortex/cli.py (1)
8-23: Fix import order to resolve pipeline failure.The import block is unsorted (Ruff I001), causing the CI pipeline to fail. The
cortex.demoimport should be placed alphabetically betweencortex.coordinatorandcortex.installation_history.Apply this diff:
from cortex.branding import VERSION, console, cx_header, cx_print, show_banner from cortex.coordinator import InstallationCoordinator, StepStatus +from cortex.demo import run_demo from cortex.installation_history import InstallationHistory, InstallationStatus, InstallationType from cortex.llm.interpreter import CommandInterpreter # Import the new Notification Manager from cortex.notification_manager import NotificationManager from cortex.user_preferences import ( PreferencesManager, format_preference_value, print_all_preferences, ) from cortex.validators import ( validate_api_key, validate_install_request, ) -from cortex.demo import run_demo -
♻️ Duplicate comments (5)
cortex/demo.py (4)
1-4: Fix import order to resolve pipeline failure.The import block is unsorted (Ruff I001), causing the CI pipeline to fail. A blank line should separate the standard library import from local imports.
Apply this diff:
import time + from cortex.branding import show_banner from cortex.hardware_detection import detect_hardware -
6-6: Add type hints and docstring per coding guidelines.The function lacks a return type annotation and docstring, violating the project's coding guidelines that require both for public APIs (PEP 8).
Apply this diff:
-def run_demo(): +def run_demo() -> int: + """ + Run the one-command investor demo showcasing Cortex capabilities. + + Performs a 30-60 second demonstration including hardware detection, + model recommendations, mock LLM test, and system readiness status. + + Returns: + int: Exit code (0 for success) + """
14-23: Fix AttributeError: SystemInfo is a dataclass, not a dict.The code uses
.get()method onSystemInfo, but it's a dataclass without dict-like methods. This will raiseAttributeErrorat runtime. Use attribute access instead.Apply this diff:
hw = detect_hardware() - print(f"✔ CPU: {hw.get('cpu', 'Unknown')}") - print(f"✔ RAM: {hw.get('memory_gb', 'Unknown')} GB") + print(f"✔ CPU: {hw.cpu if hw.cpu else 'Unknown'}") + print(f"✔ RAM: {hw.memory.total_gb if hw.memory else 'Unknown'} GB") - gpu = hw.get("gpu") + gpu = hw.gpu if gpu: print(f"✔ GPU: {gpu}")
45-47: Add explicit return value for CLI exit code.The function should return 0 for success since it's invoked from the CLI context where the return value determines the program's exit code.
Apply this diff:
# 5️⃣ Summary print("\n✅ Demo Complete") print("🎉 Your system is READY for AI workloads\n") + return 0cortex/cli.py (1)
172-177: Remove trailing whitespace.Line 177 contains trailing whitespace after the closing comment delimiter, causing a linter failure (Ruff W291).
Apply this diff:
def demo(self): """ Run the one-command investor demo """ return run_demo() - # -------------------------------- + # --------------------------------
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cortex/cli.py(2 hunks)cortex/demo.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs
Files:
cortex/demo.pycortex/cli.py
🧠 Learnings (1)
📚 Learning: 2025-12-11T12:03:24.071Z
Learnt from: CR
Repo: cortexlinux/cortex PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-11T12:03:24.071Z
Learning: Applies to **/*install*.py : Implement audit logging to ~/.cortex/history.db for all package operations
Applied to files:
cortex/cli.py
🧬 Code graph analysis (2)
cortex/demo.py (2)
cortex/branding.py (1)
show_banner(35-46)cortex/hardware_detection.py (1)
detect_hardware(632-634)
cortex/cli.py (1)
cortex/demo.py (1)
run_demo(6-47)
🪛 GitHub Actions: CI
cortex/cli.py
[error] 1-1: Import block is un-sorted or un-formatted (ruff check error).
🪛 GitHub Check: Lint
cortex/demo.py
[failure] 1-4: Ruff (I001)
cortex/demo.py:1:1: I001 Import block is un-sorted or un-formatted
cortex/cli.py
[failure] 177-177: Ruff (W291)
cortex/cli.py:177:39: W291 Trailing whitespace
🔇 Additional comments (1)
cortex/cli.py (1)
558-558: LGTM—Help table update is consistent.The addition of the "notify" command row to the help table correctly documents the new notification management feature.
8e7bf6f to
ca195b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (4)
cortex/demo.py (4)
14-23: Fix dict-like access on SystemInfo dataclass.The code attempts to use
.get()method onSystemInfo(lines 16-17, 19), butSystemInfois a dataclass, not a dictionary. This will raiseAttributeErrorat runtime.Apply this diff to use attribute access:
hw = detect_hardware() - print(f"✔ CPU: {hw.get('cpu', 'Unknown')}") - print(f"✔ RAM: {hw.get('memory_gb', 'Unknown')} GB") + print(f"✔ CPU: {getattr(hw, 'cpu', 'Unknown')}") + print(f"✔ RAM: {getattr(hw.memory, 'total_gb', 'Unknown') if hw.memory else 'Unknown'} GB") - gpu = hw.get("gpu") + gpu = hw.gpu if hasattr(hw, 'gpu') else None if gpu:Alternatively, if you prefer direct attribute access with try-except:
hw = detect_hardware() - print(f"✔ CPU: {hw.get('cpu', 'Unknown')}") - print(f"✔ RAM: {hw.get('memory_gb', 'Unknown')} GB") + cpu_name = hw.cpu if hw.cpu else 'Unknown' + ram_gb = hw.memory.total_gb if hw.memory else 'Unknown' + print(f"✔ CPU: {cpu_name}") + print(f"✔ RAM: {ram_gb} GB") - gpu = hw.get("gpu") + gpu = hw.gpu if gpu:
45-47: Add explicit return value for CLI exit code.The function should return an exit code (0 for success) since it's called from CLI context where the return value is used as the program's exit code.
Apply this diff:
# 5️⃣ Summary print("\n✅ Demo Complete") print("🎉 Your system is READY for AI workloads\n") + return 0
6-6: Add required type hints and docstring for public API.The
run_demo()function is missing type hints and a docstring, which are required by the coding guidelines for all public APIs.As per coding guidelines, apply this diff:
-def run_demo(): +def run_demo() -> int: + """ + Run the one-command investor demo showcasing Cortex capabilities. + + Performs a 30-60 second demonstration including hardware detection, + model recommendations, mock LLM test, and system readiness status. + + Returns: + int: Exit code (0 for success) + """ show_banner()
1-4: Fix import formatting to resolve pipeline failure.The pipeline reports an I001 import formatting error. While the imports appear logically grouped, Ruff may require them to be sorted differently or combined.
Based on the coding guidelines, try reordering the local imports alphabetically:
import time -from cortex.branding import show_banner from cortex.hardware_detection import detect_hardware +from cortex.branding import show_bannerOr combine them if they're from the same level:
import time -from cortex.branding import show_banner -from cortex.hardware_detection import detect_hardware +from cortex.branding import show_banner +from cortex.hardware_detection import detect_hardwareRun
ruff check cortex/demo.pylocally to verify the correct format.
🧹 Nitpick comments (1)
cortex/cli.py (1)
28-28: Consider removing or relocating sys.path manipulation.Modifying
sys.pathafter imports is non-standard. If this is needed for development/testing, it should typically be done before any imports. However, with proper packaging and installation, this line may not be necessary at all.If this line is required, apply this diff to move it before imports:
+import sys +import os +sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) + import argparse import logging -import os -import sysOtherwise, consider removing it entirely if the package is properly installed.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cortex/cli.py(3 hunks)cortex/demo.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs
Files:
cortex/cli.pycortex/demo.py
🧬 Code graph analysis (2)
cortex/cli.py (1)
cortex/demo.py (1)
run_demo(6-47)
cortex/demo.py (2)
cortex/branding.py (1)
show_banner(35-46)cortex/hardware_detection.py (1)
detect_hardware(632-634)
🪛 GitHub Actions: CI
cortex/demo.py
[error] 1-1: ruff check failed. I001 Import block is un-sorted or un-formatted.
🪛 GitHub Check: Lint
cortex/demo.py
[failure] 1-4: Ruff (I001)
cortex/demo.py:1:1: I001 Import block is un-sorted or un-formatted
🔇 Additional comments (4)
cortex/cli.py (4)
10-10: LGTM! Import correctly added and sorted.The import of
run_demofromcortex.demois properly placed in alphabetical order with other cortex module imports.
24-26: LGTM! Appropriate logging configuration.Suppressing noisy log messages at the module level improves the user experience during normal operation. The implementation is correct.
171-176: LGTM! Proper delegation to demo module.The method correctly delegates to
run_demo()and returns its result for use as a CLI exit code. The docstring follows PEP 257 conventions.
557-557: LGTM! Help table updated correctly.The notify command is properly documented in the help table with clear, concise description text.
ad35fe3 to
ab4c237
Compare
message for your changes. Lines starting
ab4c237 to
7267d08
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cortex/cli.py (1)
30-31: Consider removing sys.path manipulation.Inserting the parent directory into
sys.pathat runtime can cause import conflicts if Cortex is installed as a package. This pattern typically indicates a packaging or import structure issue.Consider handling module resolution through proper package installation (
pip install -e .) or by settingPYTHONPATHin the development environment instead.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cortex/cli.py(3 hunks)cortex/demo.py(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- cortex/demo.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Follow PEP 8 style guide
Type hints required in Python code
Docstrings required for all public APIs
Files:
cortex/cli.py
🧬 Code graph analysis (1)
cortex/cli.py (1)
cortex/demo.py (1)
run_demo(7-50)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build Package
🔇 Additional comments (2)
cortex/cli.py (2)
11-11: LGTM!The import is correctly ordered alphabetically, resolving the previous Ruff I001 linting issue.
687-687: LGTM!The help table entry for the
notifycommand is correctly formatted and provides a clear description.
|
|
|



Fixes #243
Adds a single-command investor demo that:
Includes documentation under docs/demo.md.
Summary by CodeRabbit
New Features
Documentation
Help
✏️ Tip: You can customize this high-level summary in your review settings.