- Removed legacy Alembic migration files and consolidated schema management into a new Pydantic-backed initializer (`scripts/init_db.py`). - Updated `main.py` to ensure the new DB initializer runs on startup, maintaining idempotency. - Adjusted session management in `config/database.py` to prevent DetachedInstanceError. - Introduced new enums in `models/enums.py` for better organization and clarity. - Refactored various models to utilize the new enums, improving code maintainability. - Enhanced middleware to handle JSON validation more robustly, ensuring non-JSON requests do not trigger JSON errors. - Added tests for middleware and enums to ensure expected behavior and consistency. - Updated changelog to reflect significant changes and improvements.
997 B
997 B
CalMiner
A web application to plan mining projects and estimate costs, returns and profitability.
Focuses on ore mining operations and covering parameters such as capital and operational expenditures, resource consumption, production output, and Monte Carlo simulations for risk analysis.
The system is designed to help mining companies make informed decisions by simulating various scenarios and analyzing potential outcomes based on stochastic variables.
Documentation & quickstart
- Detailed developer, architecture, and operations guides live in the companion calminer-docs repository.
- For a local run, create a
.env(see.env.example), install requirements, then executepython -m scripts.init_dbfollowed byuvicorn main:app --reload. The initializer is safe to rerun and seeds demo data automatically. - To wipe and recreate the schema in development, run
CALMINER_ENV=development python -m scripts.reset_dbbefore invoking the initializer again.