- Create new dss/ Python package at project root - Move MCP core from tools/dss_mcp/ to dss/mcp/ - Move storage layer from tools/storage/ to dss/storage/ - Move domain logic from dss-mvp1/dss/ to dss/ - Move services from tools/api/services/ to dss/services/ - Move API server to apps/api/ - Move CLI to apps/cli/ - Move Storybook assets to storybook/ - Create unified dss/__init__.py with comprehensive exports - Merge configuration into dss/settings.py (Pydantic-based) - Create pyproject.toml for proper package management - Update startup scripts for new paths - Remove old tools/ and dss-mvp1/ directories Architecture changes: - DSS is now MCP-first with 40+ tools for Claude Code - Clean imports: from dss import Projects, Components, FigmaToolSuite - No more sys.path.insert() hacking - apps/ contains thin application wrappers (API, CLI) - Single unified Python package for all DSS logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
83 lines
1.6 KiB
Python
83 lines
1.6 KiB
Python
import pytest
|
|
from pathlib import Path
|
|
|
|
@pytest.fixture(scope="function")
|
|
def mock_react_project(tmp_path: Path) -> Path:
|
|
"""
|
|
Creates a temporary mock React project structure for testing.
|
|
"""
|
|
project_dir = tmp_path / "test-project"
|
|
project_dir.mkdir()
|
|
|
|
# Create src directory
|
|
src_dir = project_dir / "src"
|
|
src_dir.mkdir()
|
|
|
|
# Create components directory
|
|
components_dir = src_dir / "components"
|
|
components_dir.mkdir()
|
|
|
|
# Component A
|
|
(components_dir / "ComponentA.jsx").write_text("""
|
|
import React from 'react';
|
|
import './ComponentA.css';
|
|
|
|
const ComponentA = () => {
|
|
return <div className="component-a">Component A</div>;
|
|
};
|
|
|
|
export default ComponentA;
|
|
""")
|
|
|
|
(components_dir / "ComponentA.css").write_text("""
|
|
.component-a {
|
|
color: blue;
|
|
}
|
|
""")
|
|
|
|
# Component B
|
|
(components_dir / "ComponentB.tsx").write_text("""
|
|
import React from 'react';
|
|
import ComponentA from './ComponentA';
|
|
|
|
const ComponentB = () => {
|
|
return (
|
|
<div>
|
|
<ComponentA />
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ComponentB;
|
|
""")
|
|
|
|
# App.js
|
|
(src_dir / "App.js").write_text("""
|
|
import React from 'react';
|
|
import ComponentB from './components/ComponentB';
|
|
|
|
function App() {
|
|
return (
|
|
<div className="App">
|
|
<ComponentB />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default App;
|
|
""")
|
|
|
|
# package.json
|
|
(project_dir / "package.json").write_text("""
|
|
{
|
|
"name": "test-project",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"dependencies": {
|
|
"react": "^18.0.0"
|
|
}
|
|
}
|
|
""")
|
|
|
|
return project_dir
|