← All projects

One Streamlit workbench that hosts these tools behind a common entry point with structured logging, a plugin-style QC registry for figure checks, and a multi-file TFL version-comparison tool.

What it adds

Conformance tools check data, not figures. This checks a figure against the dataset that produced it — a class of QC that neither a standard checker nor a manual eyeball reliably catches.

How it works

InputsFigures (PDF / PNG)Source datasetsTFL output versions
Process1Ingestion to extractor2QC registry (plugin checks)3Dataset bridge (figure vs data)4Issue aggregator
OutputsFigure QC issuesTFL diff reportExcel / PDF export

Typical layout

Clinical Data ToolkitSIDEBARFigure QCTFL CompareUtilitiesFigure QCTFL Comp…Issues grouped by categorySide-by-side TFL diffDownloadable run log

By the numbers

v25
Version
209
Test functions
10+
Figure check groups
2
Export formats

Data flow

Several recurring clinical-programming chores — checking figures against their data, comparing two versions of a TFL, inspecting datasets — were scattered across ad-hoc scripts with no shared logging or structure.

Entry point: app.py (one logging setup for all tools)
        |
        +----------------------------+----------------------------+
        v                            v                            v
  Figure QC                    TFL Version Compare          Dataset utilities
  (figureqc/)                                                
   ingestion -> extractor                                   
        |                                                    
        v                                                    
   QC Registry (qc/registry.py)   plugin checks:            
        |   axis / legend / unit / errorbar / structural /  
        |   metadata / cross-figure / advanced_*            
        v                                                    
   Issue Aggregator -> Export (Excel / PDF)

Engineering trade-offs

Plugin-style QC registry for figure checks
Each figure check (axis, legend, unit, errorbar, structural ...) registers itself, so the check set grows without editing a central dispatcher.
One logging setup at the app entry point
Every module uses logging.getLogger(__name__), so all tools write to one run log a user can download.
Pinned dependency ranges with upper bounds
Upper bounds prevent silent adoption of major versions with known breaks, e.g. pyreadstat pinned to 1.2.x for a stable metadata API.
Dataset bridge for figure-vs-data QC
Figures are checked against the dataset that produced them, catching mismatches a visual review would miss.

At a glance

A quick visual read of the countable facts; full detail in the table.

Test functions209
Figure check groups10
Export formats2

Relative scale · values labelled · unit: count

Processing characteristics

MetricValueNotes
Test functions209Counted across the test suite
Versionv25From app.py header and changelog
Figure QC check groups10+axis, legend, unit, errorbar, structural, metadata, cross-figure, advanced_*
Tools hostedFigure QC, TFL Compare, utilitiesMulti-file TFL version compare added in this line
ExportsExcel, PDFIssue export from Figure QC
LoggingStructured, downloadablePer-session run log buffer

Functional wins

01Hosts multiple clinical-programming tools behind one entry point with a single shared logging setup.
02Checks figures against the dataset that produced them through a dataset bridge, catching data-vs-figure mismatches.
03Adds figure checks via a self-registering plugin registry, so the check set grows without touching a central dispatcher.
04Compares two versions of a TFL across multiple files and highlights what changed.

Module dependencies

core
  • Python
  • pydantic
  • pyyaml
  • Pillow
ui
  • streamlit
data
  • pandas
  • numpy
  • openpyxl
  • XlsxWriter
  • pyreadstat
testing
  • pytest