[chronojump] Sprint export says how many sets discarded according to R output csv



commit 125e5002156ee99097c4d35018da681723eb5bf3
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Feb 21 12:26:02 2022 +0100

    Sprint export says how many sets discarded according to R output csv

 glade/app1.glade           | 47 ++++++++++++++++++++++++++++++++--------------
 src/exportFiles/sprint.cs  | 10 +++++++++-
 src/gui/app1/chronojump.cs |  1 +
 src/gui/sprint.cs          |  7 +++++++
 4 files changed, 50 insertions(+), 15 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 5c1d0f8e6..bf2d2b2d9 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -22909,7 +22909,7 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_sprint_export_result">
+                                                            <widget class="GtkLabel" 
id="label_sprint_export_discarded">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="xalign">0</property>
@@ -22922,6 +22922,19 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_sprint_export_result">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="selectable">True</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">5</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkAlignment" id="alignment82">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -22949,7 +22962,7 @@ Concentric</property>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">5</property>
+                                                            <property name="position">6</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
@@ -26227,6 +26240,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32597,18 +32613,6 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="pack_type">end</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -32645,6 +32649,18 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="pack_type">end</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -42119,6 +42135,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
diff --git a/src/exportFiles/sprint.cs b/src/exportFiles/sprint.cs
index 76ba34e3e..07490e57a 100644
--- a/src/exportFiles/sprint.cs
+++ b/src/exportFiles/sprint.cs
@@ -35,6 +35,7 @@ public class SprintExport : ExportFiles
        public SprintExport (
                        Gtk.Notebook notebook,
                        Gtk.ProgressBar progressbar,
+                       Gtk.Label labelDiscarded,
                        Gtk.Label labelResult,
                        bool includeImages,
                        int imageWidth, int imageHeight,
@@ -47,7 +48,7 @@ public class SprintExport : ExportFiles
        {
                Button_done = new Gtk.Button();
 
-               assignParams(notebook, progressbar, new Gtk.Label(), labelResult, includeImages,
+               assignParams(notebook, progressbar, labelDiscarded, labelResult, includeImages,
                                imageWidth, imageHeight, isWindows, personID, sessionID, 
exportDecimalSeparator);
 
                this.digitsNumber = digitsNumber;
@@ -159,6 +160,9 @@ public class SprintExport : ExportFiles
                        sprge_l.Add(sprge);
                }
 
+               //discarded = ri_l.Count - sprge_l.Count;
+               //better use discarded below
+
                Util.FileDelete(RunInterval.GetCSVResultsURL());
 
                //no data, maybe because all the tests have just two tracks and cannot be processed as sprint
@@ -185,6 +189,10 @@ public class SprintExport : ExportFiles
                while ( ! ( Util.FileReadable(RunInterval.GetCSVResultsURL()) || cancel ) )
                        ;
 
+               //use this discarded because R discards also
+               List<string> setsProcessedByR = Util.ReadFileAsStringList(RunInterval.GetCSVResultsURL());
+               discarded = ri_l.Count - (setsProcessedByR.Count -1); //-1 for the csv header
+
                if(cancel)
                        return false;
 
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 251a16700..068120eb4 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1414,6 +1414,7 @@ public partial class ChronoJumpWindow
                        else
                                label_sprint_export_data.Text = "";
 
+                       label_sprint_export_discarded.Text = "";
                        label_sprint_export_result.Text = "";
                        button_sprint_export_result_open.Visible = false;
                }
diff --git a/src/gui/sprint.cs b/src/gui/sprint.cs
index 3ca8e487c..0da6e93c2 100644
--- a/src/gui/sprint.cs
+++ b/src/gui/sprint.cs
@@ -53,6 +53,7 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.SpinButton spinbutton_sprint_export_image_width;
        [Widget] Gtk.SpinButton spinbutton_sprint_export_image_height;
        [Widget] Gtk.ProgressBar progressbar_sprint_export;
+       [Widget] Gtk.Label label_sprint_export_discarded;
        [Widget] Gtk.Label label_sprint_export_result;
        [Widget] Gtk.Button button_sprint_export_result_open;
 
@@ -304,6 +305,7 @@ public partial class ChronoJumpWindow
                hbox_sprint_export_width_height.Visible = check_sprint_export_images.Active;
 
                //also hide the label and the open button
+               label_sprint_export_discarded.Text = "";
                label_sprint_export_result.Text = "";
                button_sprint_export_result_open.Visible = false;
        }
@@ -312,6 +314,7 @@ public partial class ChronoJumpWindow
        {
                notebook_sprint_analyze_top.CurrentPage = 0;
 
+               label_sprint_export_discarded.Text = "";
                label_sprint_export_result.Text = "";
                button_sprint_export_result_open.Visible = false;
        }
@@ -325,6 +328,7 @@ public partial class ChronoJumpWindow
                else
                        label_sprint_export_data.Text = "";
 
+               label_sprint_export_discarded.Text = "";
                label_sprint_export_result.Text = "";
                button_sprint_export_result_open.Visible = false;
        }
@@ -335,6 +339,7 @@ public partial class ChronoJumpWindow
 
                label_sprint_export_data.Text = currentSession.Name;
 
+               label_sprint_export_discarded.Text = "";
                label_sprint_export_result.Text = "";
                button_sprint_export_result_open.Visible = false;
        }
@@ -382,6 +387,7 @@ public partial class ChronoJumpWindow
                //continue based on: private void button_run_encoder_export_session (int personID)
                //TODO: sensitive stuff (false)
 
+               label_sprint_export_discarded.Text = "";
                label_sprint_export_result.Text = "";
                button_sprint_export_result_open.Visible = false;
 
@@ -406,6 +412,7 @@ public partial class ChronoJumpWindow
                sprintExport = new SprintExport(
                                notebook_sprint_export,
                                progressbar_sprint_export,
+                               label_sprint_export_discarded,
                                label_sprint_export_result,
                                check_sprint_export_images.Active,
                                Convert.ToInt32(spinbutton_sprint_export_image_width.Value),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]