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

1.1 KiB

Development Setup Guide

Prerequisites

  • Python (version 3.10+)
  • PostgreSQL (version 13+)
  • Git

Clone and Project Setup

# Clone the repository
git clone https://git.allucanget.biz/allucanget/calminer.git
cd calminer

Virtual Environment

# Create and activate a virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1

Install Dependencies

pip install -r requirements.txt

Database Setup

  1. Create database user:

    CREATE USER calminer_user WITH PASSWORD 'your_password';
    
  2. Create database:

    CREATE DATABASE calminer;
    

Environment Variables

  1. Copy .env.example to .env at project root.

  2. Edit .env to set database connection string:

    DATABASE_URL=postgresql://<user>:<password>@localhost:5432/calminer
    
  3. The application uses python-dotenv to load these variables.

Running the Application

# Start the FastAPI server
uvicorn main:app --reload

Testing

pytest

Frontend Setup

(TBD - add when frontend implemented)