- 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
1.1 KiB
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
-
Create database user:
CREATE USER calminer_user WITH PASSWORD 'your_password'; -
Create database:
CREATE DATABASE calminer;
Environment Variables
-
Copy
.env.exampleto.envat project root. -
Edit
.envto set database connection string:DATABASE_URL=postgresql://<user>:<password>@localhost:5432/calminer -
The application uses
python-dotenvto load these variables.
Running the Application
# Start the FastAPI server
uvicorn main:app --reload
Testing
pytest
Frontend Setup
(TBD - add when frontend implemented)