Add initial project structure and documentation
- Created architecture documentation outlining high-level design, module organization, data flow, security model, performance considerations, testing strategy, and deployment architecture. - Added pyproject.toml for project metadata and dependencies management. - Introduced requirements files for development and production dependencies. - Set up testing configuration with pytest and tox. - Established basic directory structure for source code and tests, including __init__.py files. - Implemented a sample web application (index.html) for drag-and-drop functionality. - Configured VS Code workspace settings for Python development.
This commit is contained in:
commit
61aa33633c
34 changed files with 5342 additions and 0 deletions
1
tests/__init__.py
Normal file
1
tests/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
"""Unit tests initialization."""
|
||||
21
tests/conftest.py
Normal file
21
tests/conftest.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
"""Test fixtures and utilities."""
|
||||
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def temp_test_dir():
|
||||
"""Provide a temporary directory for tests."""
|
||||
with TemporaryDirectory() as tmpdir:
|
||||
yield Path(tmpdir)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def sample_test_file(temp_test_dir):
|
||||
"""Provide a sample test file."""
|
||||
test_file = temp_test_dir / "test_file.txt"
|
||||
test_file.write_text("Test content")
|
||||
yield test_file
|
||||
1
tests/integration/__init__.py
Normal file
1
tests/integration/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
"""Integration tests initialization."""
|
||||
1
tests/unit/__init__.py
Normal file
1
tests/unit/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
"""Unit tests initialization."""
|
||||
65
tests/unit/test_project_structure.py
Normal file
65
tests/unit/test_project_structure.py
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
"""Minimal test to verify project structure."""
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def test_project_structure():
|
||||
"""Verify essential project directories exist."""
|
||||
root = Path(__file__).parent.parent.parent
|
||||
|
||||
essential_dirs = [
|
||||
"src/webdrop_bridge",
|
||||
"tests/unit",
|
||||
"tests/integration",
|
||||
"build/scripts",
|
||||
"docs",
|
||||
"webapp",
|
||||
]
|
||||
|
||||
for dir_path in essential_dirs:
|
||||
full_path = root / dir_path
|
||||
assert full_path.exists(), f"Missing directory: {dir_path}"
|
||||
assert full_path.is_dir(), f"Not a directory: {dir_path}"
|
||||
|
||||
|
||||
def test_essential_files():
|
||||
"""Verify essential configuration files exist."""
|
||||
root = Path(__file__).parent.parent.parent
|
||||
|
||||
essential_files = [
|
||||
"pyproject.toml",
|
||||
"setup.py",
|
||||
"pytest.ini",
|
||||
"tox.ini",
|
||||
".env.example",
|
||||
"README.md",
|
||||
"DEVELOPMENT_PLAN.md",
|
||||
"LICENSE",
|
||||
]
|
||||
|
||||
for file_path in essential_files:
|
||||
full_path = root / file_path
|
||||
assert full_path.exists(), f"Missing file: {file_path}"
|
||||
assert full_path.is_file(), f"Not a file: {file_path}"
|
||||
|
||||
|
||||
def test_python_package_structure():
|
||||
"""Verify Python package __init__ files exist."""
|
||||
root = Path(__file__).parent.parent.parent
|
||||
|
||||
packages = [
|
||||
"src/webdrop_bridge",
|
||||
"src/webdrop_bridge/core",
|
||||
"src/webdrop_bridge/ui",
|
||||
"src/webdrop_bridge/utils",
|
||||
"tests",
|
||||
]
|
||||
|
||||
for pkg_path in packages:
|
||||
init_file = root / pkg_path / "__init__.py"
|
||||
assert init_file.exists(), f"Missing __init__.py in {pkg_path}"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main([__file__, "-v"])
|
||||
Loading…
Add table
Add a link
Reference in a new issue