AI-SDC / ACRO

Tools for the Automatic Checking of Research Outputs. These are the tools for researchers to use as drop-in replacements for commands that produce outputs in Stata Python and R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modify output JSON to be in a file-oriented schema

rpreen opened this issue · comments

Proposed:

{
    "version": "0.4.0",
    "results": {
        "output_0": {
            "uid": "output_0",
            "status": "fail",
            "type": "table",
            "properties": {
                "method": "crosstab"
            },
            "files": [
                {
                    "name": "output_0_0.csv",
                    "sdc": {
                        "summary": {
                            "suppressed": false,
                            "negative": 0,
                            "missing": 0,
                            "threshold": 6,
                            "p-ratio": 0,
                            "nk-rule": 0
                        },
                        "cells": {
                            "negative": [],
                            "missing": [],
                            "threshold": [[0,3], [1,3], [2,3], [3,3], [4,3], [5,3]],
                            "p-ratio": [],
                            "nk-rule": []
                        }
                    }
                }
            ],
            "command": "safe_table = acro.crosstab(df.year, df.grant_type)",
            "summary": "fail; threshold: 6 cells may need suppressing; ",
            "timestamp": "2023-07-08T22:46:03.311271",
            "comments": [
                "This is a cross table between year and grant_type",
                "6 cells were suppressed in this table"
            ],
            "exception": "I really need this."
        },
        "output_8": {
            "uid": "output_8",
            "status": "pass",
            "type": "regression",
            "properties": {
                "method": "ols",
                "dof": 807.0
            },
            "files": [
                {
                    "name": "output_0_0.csv",
                    "sdc": {}
                },
                {
                    "name": "output_8_1.csv",
                    "sdc": {}
                },
                {
                    "name": "output_8_2.csv",
                    "sdc": {}
                }
            ],
            "command": "results = acro.ols(y, x)",
            "summary": "pass; dof=807.0 >= 10",
            "timestamp": "2023-07-08T22:46:03.824138",
            "comments": [],
            "exception": ""
        },
        "output_12": {
            "uid": "output_12",
            "status": "review",
            "type": "custom",
            "properties": {},
            "files": [
                {
                    "name": "XandY.jfif",
                    "sdc": {}
                }
            ],
            "command": "custom",
            "summary": "review",
            "timestamp": "2023-07-08T22:46:04.045266",
            "comments": [
                "This output is an image showing the relationship between X and Y"
            ],
            "exception": "This is just a plot of X and Y."
        }
    }
}