Skip to content

AntaresSimulatorTeam/AntaREST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Antares Web

A modern web application for managing and editing Antares Simulator studies

CI Coverage License Python React

DocumentationInstallationContributingIssues

Screenshot


About

Antares Web is a web platform developed by RTE to manage, configure, and interact with Antares Simulator, RTE’s adequacy simulation software for power system studies, Antares Simulator. Antares Simulator is an open-source power system simulator that enables detailed modeling of energy consumption, generation, and transportation, performing probabilistic simulations across year-long scenarios with 8760 hourly time-frames.

Antares Web provides a modern REST API and web interface for managing Antares Simulator studies, adding powerful features for collaboration, storage optimization, and advanced editing capabilities.

Key Features

  • RESTful API: Complete API for programmatic access to studies and simulations
  • Modern Web Interface: React-based UI for intuitive study management and editing
  • Application Interoperability: Unique study IDs and standardized endpoints for easy integration
  • Optimized Storage: Matrix data extraction and sharing between studies, with archive mode support
  • Variant Management: Advanced editing description language and generation tools
  • User Management: Complete user accounts and permission system
  • Multi-mode Deployment: Run as a web server, desktop application, or Docker container

Table of Contents


Prerequisites

Before you begin, ensure you have the following installed:

Optional (for specific deployment modes):

  • Docker: For containerized deployment
  • PostgreSQL: For production database (SQLite used by default for development)
  • Redis: For production caching

Installation

Quick Start (Development)

  1. Clone the repository

    git clone https://github.com/AntaresSimulatorTeam/AntaREST.git
    cd AntaREST
  2. Set up Python environment

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    python3 -m pip install --upgrade pip
  3. Install Python dependencies

    pip install -e .                     # Install package in editable mode
    pip install -r requirements-dev.txt  # Install development dependencies
  4. Install frontend dependencies

    cd webapp
    npm install
    cd ..
  5. Run the application

    See the Running the Application section below for detailed instructions on running in development, production, or desktop mode.

Using Docker

Build the Docker image:

docker build --tag antarest .

Run with default configuration:

docker run -p 8080:5000 -e GUNICORN_WORKERS=1 antarest

For production deployment with external database and Redis, see the deployment documentation.

Usage

Running the Application

Development mode (with auto-reload):

Run both backend and frontend in separate terminals:

# Terminal 1 - Backend
python antarest/main.py -c resources/application.yaml --auto-upgrade-db --no-front

# Terminal 2 - Frontend
cd webapp
npm run dev

The API will be available at http://localhost:8080 and the frontend at http://localhost:3000

Production mode (with Gunicorn):

export ANTAREST_CONF=resources/application.yaml
export GUNICORN_WORKERS=4
gunicorn --config conf/gunicorn.py --worker-class=uvicorn.workers.UvicornWorker antarest.wsgi:app

Note: In production, we now use an alternative deployment mode where Gunicorn is not used for load balancing. Instead, we start multiple independent workers on different ports, allowing upstream load balancing to be handled by tools like nginx.

API Documentation

Once the server is running, you can access:

  • Interactive API documentation (Swagger): http://localhost:3000/apidoc
  • OpenAPI specification: http://localhost:8080/openapi.json

Example API calls:

# List all studies
curl http://localhost:8080/v1/studies

# Get specific study details
curl http://localhost:8080/v1/studies/{study_uuid}

# Create a new study
curl -X POST http://localhost:8080/v1/studies \
  -H "Content-Type: application/json" \
  -d '{"name": "My Study", "version": "860"}'

Development

Running Tests

The project uses pytest for testing:

# Run all tests in parallel
pytest -n auto

Code Quality

Linting and formatting (with Ruff):

# Check and fix code style
ruff check antarest/ tests/ --fix

# Format code
ruff format antarest/ tests/

Type checking (with mypy):

mypy

Documentation


Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.

Please read our Contributing Guide to learn about:

  • Setting up your development environment
  • Code style and standards
  • Submitting pull requests
  • Reporting issues

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Copyright © 2007-2025 RTE (https://www.rte-france.com)


Support


About

REST API and web application for Antares-Simulator

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 29