PolyHedra / PROJECT_SETUP.md
yf176
Deploy Polyhedra to HF Spaces
891fe52
|
Raw History Blame Contribute Delete
3.52 kB
# Polyhedra - Project Setup Complete
## Created Structure
```
poly/
src/polyhedra/ # Main package
services/ # Service layer (business logic)
schemas/ # Pydantic data models
server.py # MCP server entry point
__init__.py # Package initialization
tests/ # Test suite
test_services/ # Service tests
test_schemas/ # Schema tests
conftest.py # Pytest fixtures
test_project_setup.py # Setup validation tests
docs/ # Project documentation
prd.md # Product requirements
epics/ # Epic definitions
stories/ # User stories (12 total)
.poly/embeddings/ # RAG embeddings cache
pyproject.toml # Project config & dependencies
README.md # Project overview
CONTRIBUTING.md # Development guidelines
LICENSE # MIT License
.gitignore # Git exclusions
```
## Key Files Created
### Configuration
- **pyproject.toml**: Project metadata, dependencies, build config
- **pytest.ini**: Test configuration (via tool.pytest section)
- **.gitignore**: Python, IDE, and project-specific exclusions
### Source Code
- **src/polyhedra/__init__.py**: Package exports and version
- **src/polyhedra/server.py**: MCP server skeleton with basic tool
- **tests/conftest.py**: Shared test fixtures
- **tests/test_project_setup.py**: Basic validation tests
### Documentation
- **README.md**: Installation, quick start, development guide
- **CONTRIBUTING.md**: Development workflow and guidelines
- **LICENSE**: MIT License
## Dependencies Configured
### Core Dependencies
- mcp>=1.0.0 (MCP protocol SDK)
- httpx>=0.25.0 (Async HTTP client)
- pydantic>=2.0.0 (Data validation)
- bibtexparser>=2.0.0 (BibTeX parsing)
- sentence-transformers>=2.2.0 (Embeddings for RAG)
- numpy>=1.24.0 (Vector operations)
### Dev Dependencies
- pytest>=7.4.0 (Test framework)
- pytest-asyncio>=0.21.0 (Async test support)
- pytest-cov>=4.1.0 (Coverage reporting)
- black>=23.0.0 (Code formatter)
- ruff>=0.1.0 (Linter)
- mypy>=1.5.0 (Type checker)
## Next Steps
### 1. Set Up Development Environment
```bash
# Create virtual environment
python -m venv venv
.\venv\Scripts\Activate.ps1
# Install package in development mode
pip install -e ".[dev]"
```
### 2. Verify Setup
```bash
# Run setup validation tests
pytest tests/test_project_setup.py -v
# Check that imports work
python -c "import polyhedra; print(polyhedra.__version__)"
```
### 3. Begin Story Development
Stories are ready in docs/stories/:
- **STORY-001**: Semantic Scholar Integration (5 pts) - READY
- **STORY-002**: Citation Management (3 pts)
- **STORY-003**: RAG Retrieval (5 pts)
- **STORY-004**: File & Context Management (3 pts)
- **STORY-005**: Project Initialization (2 pts)
- ...and 7 more stories
Use *develop-story command when ready to implement!
## Development Workflow
```bash
# Format code
black src tests
# Lint
ruff check src tests
# Type check
mypy src
# Run tests with coverage
pytest --cov=polyhedra --cov-report=term-missing
# All checks
black src tests ; ruff check src tests ; mypy src ; pytest
```
## Project Status
Project structure initialized
Build configuration complete
Testing framework configured
Code quality tools configured
Documentation created
12 user stories defined and ready
**Ready for development!**