Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,47 @@ See **SETUP_CREDENTIALS.md** for API credential issues.

---

## Developer Guide

This section provides instructions for setting up a development environment, running tests, and understanding the project's internal structure.

### Development Environment Setup

1. **Clone the repository:**
```bash
git clone https://github.com/your-repo/K1_Lightwave.git
cd K1_Lightwave
```

2. **Create a virtual environment:**
```bash
python3 -m venv .venv
source .venv/bin/activate
```

3. **Install dependencies:**
```bash
pip install -r requirements.txt
```

### Running Tests

To run the test suite, use the following command:
```bash
python3 -m unittest discover -s tests
```

### Project Structure Overview

- `elite_pcb_designer.py`: The main entry point and orchestrator for the PCB design process.
- `design_preparation.py`: Handles the initial loading and preparation of the design files.
- `component_placement.py`: Manages the intelligent placement of components.
- `automated_routing.py`: Orchestrates the automated routing process.
- `design_validation.py`: Performs final validation and generates manufacturing files.
- `tests/`: Contains the unit tests for the project.

---

## License & Credits

K1 Lightwave design pipeline. Built with KiCad, Python, Claude AI, and open-source EDA tools.
Expand Down
Binary file removed __pycache__/automated_routing.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/automated_routing.cpython-313.pyc
Binary file not shown.
Binary file removed __pycache__/automated_routing.cpython-39.pyc
Binary file not shown.
Binary file removed __pycache__/component_placement.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/component_placement.cpython-313.pyc
Binary file not shown.
Binary file removed __pycache__/component_placement.cpython-39.pyc
Binary file not shown.
Binary file removed __pycache__/design_preparation.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/design_preparation.cpython-313.pyc
Binary file not shown.
Binary file removed __pycache__/design_preparation.cpython-39.pyc
Binary file not shown.
Binary file removed __pycache__/design_validation.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/design_validation.cpython-313.pyc
Binary file not shown.
Binary file removed __pycache__/design_validation.cpython-39.pyc
Binary file not shown.
Binary file removed __pycache__/elite_pcb_designer.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/elite_pcb_designer.cpython-313.pyc
Binary file not shown.
Binary file removed __pycache__/elite_pcb_designer.cpython-39.pyc
Binary file not shown.
Binary file removed __pycache__/freerouting_config.cpython-313.pyc
Binary file not shown.
Binary file removed __pycache__/ipc_standards_library.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/test_elite_pcb_designer.cpython-312.pyc
Binary file not shown.
Binary file removed __pycache__/test_ipc_standards.cpython-312.pyc
Binary file not shown.
11 changes: 11 additions & 0 deletions agent/dfm/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,23 @@ class DFMCheck:
"""Single DFM check result."""

def __init__(self, rule: str, message: str, status: str = "PASS", severity: str = "INFO"):
"""Initializes a new DFM check.
Args:
rule (str): The name of the rule being checked.
message (str): A description of the check.
status (str): The status of the check (PASS or FAIL).
severity (str): The severity of the check (INFO, WARNING, or ERROR).
"""
self.rule = rule
self.message = message
self.status = status # PASS or FAIL
self.severity = severity # INFO, WARNING, ERROR

def to_dict(self) -> Dict[str, Any]:
"""Converts the DFM check to a dictionary.
Returns:
Dict[str, Any]: A dictionary representation of the DFM check.
"""
return {
"rule": self.rule,
"message": self.message,
Expand Down
1 change: 0 additions & 1 deletion agent/drivers/kicad_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

class KiCadCLIError(Exception):
"""Raised when a kicad-cli command fails."""
pass


def _run_cmd(args, description=""):
Expand Down
8 changes: 7 additions & 1 deletion agent/orchestrator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,32 @@

class OrchestratorError(Exception):
"""Raised when orchestrator encounters a fatal error."""
pass


class Phase:
"""Context manager for tracking phase execution."""

def __init__(self, phase_num, description):
"""Initializes a new phase.
Args:
phase_num (int): The number of the phase.
description (str): A description of the phase.
"""
self.phase_num = phase_num
self.description = description
self.start_time = None
self.end_time = None

def __enter__(self):
"""Starts the phase and prints a header."""
self.start_time = datetime.now()
print(f"\n{'=' * 70}")
print(f"PHASE {self.phase_num}: {self.description}")
print(f"{'=' * 70}")
return self

def __exit__(self, exc_type, exc_val, exc_tb):
"""Ends the phase and prints a summary."""
self.end_time = datetime.now()
elapsed = (self.end_time - self.start_time).total_seconds()
if exc_type is None:
Expand Down
1 change: 0 additions & 1 deletion agent/routing/freerouting.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

class FreeRoutingError(Exception):
"""Raised when FreeRouting operation fails."""
pass


def route(jar_path, dsn_file, ses_output, timeout_s=1800, max_retries=1):
Expand Down
Loading
Loading