Magrep
Python
FastAPI
Oracle
Docker

MAGREP started with me fixing the legacy C++ application to generate more complete witness reports. I then built a Python proof-of-concept that replicated the old behaviour but added a key feature: letting users edit the underlying data before reports are generated.
I collaborated to migrate the front end and data collection into APEX, and built out the backend microservices for data analysis and document generation, which is designed to plug cleanly into APEX and PL/SQL while keeping complex logic out of the database.
The most interesting part is the new reporting engine. Rather than hardcoded scripts, it's a modular spec-driven system built on FastAPI and Quarto. Pass it a JSON specification and it dynamically generates both PDF and HTML output, this allows for new report formats to be added without touching existing code. Each report is defined as a tree of typed blocks (section, text, table, figure, repeater), with each block declaring its data source, layout, and render options. Data is resolved from Oracle via stored procedures, with {{token}} placeholders substituted from request metadata at runtime.
A core part of the analysis service is fitting the Summers scaling law to critical current measurements for Nb₃Sn superconducting wire:
Given measured triplets, the service uses Levenberg-Marquardt least squares (scipy.optimize.least_squares) to extract the material parameters and . It can also correct to a target temperature using the fitted scaling law, and find intersections between a magnet load line and the fitted critical surface — a key acceptance criterion for accelerator magnets.
python-oracledb thick mode with a lifespan-managed connection pool