Skip to content

Commit

Permalink
Merge pull request #126 from debiai/5-std-point-widget
Browse files Browse the repository at this point in the history
5 std point widget
  • Loading branch information
Tomansion committed Aug 4, 2023
2 parents 17239c3 + 915e61a commit 214a162
Show file tree
Hide file tree
Showing 23 changed files with 689 additions and 129 deletions.
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ ujson == 4.0.2
sklearn == 0.0
kafka-python == 2.0.2
openapi_spec_validator == 0.2.8
PyYAML == 5.4.1
PyYAML == 6.0
2 changes: 1 addition & 1 deletion backend/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: 0.24.4
version: 0.24.5
title: DebiAI_BACKEND_API
description: DebiAI backend api
contact:
Expand Down
29 changes: 29 additions & 0 deletions frontend/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2",
"language": "en",
"words": [
"cmax",
"cmin",
"colorscale",
"confianceai",
"Debi",
"DebiAI",
"groundtruth",
"irtsysx",
"rgba",
"showscale",
"systemx",
"websrv",
"xaxis",
"yaxis"
],
"flagWords": [],
"ignorePaths": [
"*.svg",
"*.xml",
"*.bat",
"node_modules/",
"build/",
".vscode/"
]
}
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "debiai_frontend",
"version": "0.24.4",
"version": "0.24.5",
"description": "Frontend for Debiai, made with Vuejs",
"license": "Apache-2.0",
"scripts": {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export default {
this.$on("loading", (loading) => (this.loading = loading));
this.$on("errorMessage", this.errorMessage);
this.$on("setExport", this.setExport);
this.$on("drawed", this.drawed);
this.$on("drawn", this.drawn);
this.timeout = null;
this.name = this.title;
},
Expand Down Expand Up @@ -485,7 +485,7 @@ export default {
});
this.$emit("filterCleared");
},
drawed() {
drawn() {
this.selectedDataWarning = false;
// The plot has been drawn, we can save a copy of the local filters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<button
id="drawBtn"
@click="checkMatrix"
:disabled="plotDrawed"
:disabled="plotDrawn"
>
Draw
</button>
Expand Down Expand Up @@ -137,10 +137,10 @@ export default {
// Settings
settings: true,
plotDrawed: false,
plotDrawn: false,
trueAxisSelection: false,
predAxisSelection: false,
currentDrawedColorIndex: null,
currentDrawnColorIndex: null,
};
},
props: {
Expand Down Expand Up @@ -260,7 +260,7 @@ export default {
matrixList.push(this.fillMatrix(allUniques, colorTruth, colorPred));
});
this.currentDrawedColorIndex = this.coloredColumnIndex;
this.currentDrawnColorIndex = this.coloredColumnIndex;
}
this.drawMatrix(matrixList, allUniques);
console.timeEnd("ConfusionMatrix");
Expand Down Expand Up @@ -417,8 +417,8 @@ export default {
responsive: true,
});
this.matrixDrawed = true;
this.$parent.$emit("drawed");
this.matrixDrawn = true;
this.$parent.$emit("drawn");
// Set the filter events
this.divConfusionMatrix.removeListener("plotly_click", this.selectDataOnPlot);
Expand All @@ -434,12 +434,12 @@ export default {
xAxiesSelect(index) {
this.columnTindex = index;
this.trueAxisSelection = false;
this.plotDrawed = false;
this.plotDrawn = false;
},
yAxiesSelect(index) {
this.columnPindex = index;
this.predAxisSelection = false;
this.plotDrawed = false;
this.plotDrawn = false;
},
swap() {
let temp = this.columnPindex;
Expand Down Expand Up @@ -561,7 +561,7 @@ export default {
return this.$store.state.StatisticalAnalysis.coloredColumnIndex;
},
redrawRequiered() {
return !(this.dividePerColor && this.currentDrawedColorIndex !== this.coloredColumnIndex);
return !(this.dividePerColor && this.currentDrawnColorIndex !== this.coloredColumnIndex);
},
},
watch: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
// Settings
settings: true,
significativOnly: false,
matrixDrawed: false,
matrixDrawn: false,
axisSelection: false,
selectedMatrixType: "pearson",
error: false,
Expand Down Expand Up @@ -152,7 +152,7 @@ export default {
.filter((c) => c.nbOccu > 1);
this.axisSelection = false;
this.matrixDrawed = false;
this.matrixDrawn = false;
this.calculate();
},
Expand Down Expand Up @@ -270,8 +270,8 @@ export default {
responsive: true,
});
this.$parent.$emit("drawed");
this.matrixDrawed = true;
this.$parent.$emit("drawn");
this.matrixDrawn = true;
},
// Export
Expand All @@ -285,7 +285,7 @@ export default {
this.$parent.$emit("loading", this.loading);
},
selectedData() {
this.matrixDrawed = false;
this.matrixDrawn = false;
this.$parent.selectedDataWarning = true;
},
significativOnly() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
type="number"
v-model="bins"
:min="1"
@change="plotDrawed = false"
@change="plotDrawn = false"
/>
</div>
</div>
Expand All @@ -197,7 +197,7 @@
id="drawBtn"
type="submit"
@click="checkPlot"
:disabled="plotDrawed"
:disabled="plotDrawn"
>
Draw
</button>
Expand Down Expand Up @@ -241,10 +241,10 @@ export default {
bins: 0,
// Other
plotDrawed: false,
plotDrawn: false,
xAxisSelection: false,
secondAxisSelection: false,
currentDrawedColorIndex: null,
currentDrawnColorIndex: null,
};
},
props: {
Expand Down Expand Up @@ -538,9 +538,9 @@ export default {
displayModeBar: false,
responsive: true,
});
this.currentDrawedColorIndex = this.coloredColumnIndex;
this.plotDrawed = true;
this.$parent.$emit("drawed");
this.currentDrawnColorIndex = this.coloredColumnIndex;
this.plotDrawn = true;
this.$parent.$emit("drawn");
// Set selection events
this.divRepPlot.removeListener("plotly_click", this.selectDataOnPlot);
Expand All @@ -549,7 +549,7 @@ export default {
clearPlot() {
Plotly.purge(this.divRepPlot);
this.plotDrawed = false;
this.plotDrawn = false;
},
// Filters
Expand Down Expand Up @@ -587,9 +587,9 @@ export default {
if (this.coloredColumnIndex != null && this.dividePerColor) {
filters.push({
type: "values",
columnIndex: this.currentDrawedColorIndex,
columnIndex: this.currentDrawnColorIndex,
values: [
"" + this.data.columns[this.currentDrawedColorIndex].uniques[selec.curveNumber],
"" + this.data.columns[this.currentDrawnColorIndex].uniques[selec.curveNumber],
],
});
}
Expand Down Expand Up @@ -641,7 +641,7 @@ export default {
return this.$store.state.StatisticalAnalysis.coloredColumnIndex;
},
redrawRequiered() {
return !(this.currentDrawedColorIndex !== this.coloredColumnIndex);
return !(this.currentDrawnColorIndex !== this.coloredColumnIndex);
},
},
watch: {
Expand All @@ -655,10 +655,10 @@ export default {
this.checkPlot();
},
selectedData: function () {
if (!this.$parent.startFiltering && this.plotDrawed) this.$parent.selectedDataWarning = true;
if (!this.$parent.startFiltering && this.plotDrawn) this.$parent.selectedDataWarning = true;
},
coloredColumnIndex: function () {
this.plotDrawed = false;
this.plotDrawn = false;
},
redrawRequiered(o, n) {
this.$parent.colorWarning = n;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
class="customCbx"
v-model="smooth"
style="display: none"
@click="intervalPlotDrawed = false"
@click="intervalPlotDrawn = false"
/>
<label
:for="'smoothCbxIntPlot' + index"
Expand All @@ -138,7 +138,7 @@
</div>
</div>
<button
:disabled="intervalPlotDrawed"
:disabled="intervalPlotDrawn"
@click="updateTraces"
>
Draw
Expand Down Expand Up @@ -184,7 +184,7 @@ export default {
columnLowerIndex: 0,
// === Other ===
intervalPlotDrawed: false,
intervalPlotDrawn: false,
};
},
props: {
Expand Down Expand Up @@ -265,7 +265,7 @@ export default {
}
// Boolean operation to prevent string or object
if ("smooth" in conf) this.smooth = conf.smooth === true;
this.intervalPlotDrawed = false;
this.intervalPlotDrawn = false;
},
defConfChangeUpdate() {
this.$watch(
Expand Down Expand Up @@ -371,8 +371,8 @@ export default {
let layout = this.gerenateLayout({ colX, colY });
this.drawPlot([upperTrace, lowerTrace, yTrace], layout); // regenererate or generate plot
this.intervalPlotDrawed = true;
this.$parent.$emit("drawed");
this.intervalPlotDrawn = true;
this.$parent.$emit("drawn");
},
// Draw
Expand Down Expand Up @@ -416,22 +416,22 @@ export default {
xAxiesSelect(index) {
this.columnXindex = index;
this.xAxisSelection = false;
this.intervalPlotDrawed = false;
this.intervalPlotDrawn = false;
},
yAxiesSelect(index) {
this.columnYindex = index;
this.yAxisSelection = false;
this.intervalPlotDrawed = false;
this.intervalPlotDrawn = false;
},
upperAxisSelect(index) {
this.columnUpperIndex = index;
this.upperAxisSelection = false;
this.intervalPlotDrawed = false;
this.intervalPlotDrawn = false;
},
lowerAxisSelect(index) {
this.columnLowerIndex = index;
this.lowerAxisSelection = false;
this.intervalPlotDrawed = false;
this.intervalPlotDrawn = false;
},
// Export
Expand All @@ -447,7 +447,7 @@ export default {
},
watch: {
selectedData() {
if (this.intervalPlotDrawed) this.$parent.selectedDataWarning = true;
if (this.intervalPlotDrawn) this.$parent.selectedDataWarning = true;
},
},
};
Expand Down
Loading

0 comments on commit 214a162

Please sign in to comment.