Files
calminer/docs/development_setup.md
zwitschi 39c45e720c Add initial implementation of CalMiner with project structure, environment setup, and core features
- Create .env.example for environment variables
- Update README with project structure and development setup instructions
- Implement FastAPI application with API routes for scenarios and parameters
- Add database models for scenarios, parameters, and simulation results
- Introduce validation middleware for JSON requests
- Create services for running simulations and generating reports
- Add testing strategy and directory structure in documentation
2025-10-20 18:37:57 +02:00

72 lines
1.1 KiB
Markdown

# Development Setup Guide
## Prerequisites
- Python (version 3.10+)
- PostgreSQL (version 13+)
- Git
## Clone and Project Setup
```powershell
# Clone the repository
git clone https://git.allucanget.biz/allucanget/calminer.git
cd calminer
```
## Virtual Environment
```powershell
# Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1
```
## Install Dependencies
```powershell
pip install -r requirements.txt
```
## Database Setup
1. Create database user:
```sql
CREATE USER calminer_user WITH PASSWORD 'your_password';
```
2. Create database:
```sql
CREATE DATABASE calminer;
```
## Environment Variables
1. Copy `.env.example` to `.env` at project root.
2. Edit `.env` to set database connection string:
```dotenv
DATABASE_URL=postgresql://<user>:<password>@localhost:5432/calminer
```
3. The application uses `python-dotenv` to load these variables.
## Running the Application
```powershell
# Start the FastAPI server
uvicorn main:app --reload
```
## Testing
```powershell
pytest
```
## Frontend Setup
(TBD - add when frontend implemented)