Skip to content
Snippets Groups Projects
Commit 46aa7d12 authored by stevereis's avatar stevereis
Browse files

feat: Add formula into experiment model

parent d1a4831c
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,24 @@ import { ResultUnion } from '../result/common/result-union.model'; ...@@ -3,6 +3,24 @@ import { ResultUnion } from '../result/common/result-union.model';
import { Algorithm } from './algorithm.model'; import { Algorithm } from './algorithm.model';
import { Author } from './author.model'; import { Author } from './author.model';
@ObjectType()
export class Transformation {
@Field({ description: "Variable's id on which to apply the transformation" })
id: string;
@Field({ description: 'Transformation to apply' })
operation: string;
}
@ObjectType()
export class Formula {
@Field(() => [Transformation], { nullable: true, defaultValue: [] })
transformations: Transformation[];
@Field(() => [[String]], { nullable: true, defaultValue: [] })
interactions: string[][];
}
@ObjectType() @ObjectType()
export class Experiment { export class Experiment {
@Field() @Field()
...@@ -53,6 +71,9 @@ export class Experiment { ...@@ -53,6 +71,9 @@ export class Experiment {
@Field(() => [String], { nullable: true, defaultValue: [] }) @Field(() => [String], { nullable: true, defaultValue: [] })
filterVariables?: string[]; filterVariables?: string[];
@Field(() => Formula, { nullable: true })
formula?: Formula;
@Field() @Field()
algorithm: Algorithm; algorithm: Algorithm;
} }
......
...@@ -137,6 +137,19 @@ type Author { ...@@ -137,6 +137,19 @@ type Author {
fullname: String fullname: String
} }
type Transformation {
"""Variable's id on which to apply the transformation"""
id: String!
"""Transformation to apply"""
operation: String!
}
type Formula {
transformations: [Transformation!]
interactions: [[String!]!]
}
type Experiment { type Experiment {
id: String! id: String!
name: String! name: String!
...@@ -154,6 +167,7 @@ type Experiment { ...@@ -154,6 +167,7 @@ type Experiment {
variables: [String!]! variables: [String!]!
coVariables: [String!] coVariables: [String!]
filterVariables: [String!] filterVariables: [String!]
formula: Formula
algorithm: Algorithm! algorithm: Algorithm!
} }
...@@ -174,6 +188,7 @@ type PartialExperiment { ...@@ -174,6 +188,7 @@ type PartialExperiment {
variables: [String!] variables: [String!]
coVariables: [String!] coVariables: [String!]
filterVariables: [String!] filterVariables: [String!]
formula: Formula
algorithm: Algorithm algorithm: Algorithm
} }
...@@ -227,7 +242,7 @@ enum ParamType { ...@@ -227,7 +242,7 @@ enum ParamType {
} }
input FormulaTransformation { input FormulaTransformation {
name: String! id: String!
operation: String! operation: String!
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment