IDEMSInternational / R-Instat

A statistics software package powered by R
http://r-instat.org/
GNU General Public License v3.0
38 stars 103 forks source link

Remove unused (sub)dialogs from the project #6481

Open lloyddewit opened 3 years ago

lloyddewit commented 3 years ago

In PR #6478, @shadrackkibet observed that there are a number of (sub)dialogs that are not used.

I investigated and identified 63 (sub)dialogs that I believe are not used and can be safely deleted from the project. Each of these (sub)dialogs is associated with up to 4 files. So removing these (sub)dialogs could result in 200+ fewer files in the project.

@dannyparsons @shadrackkibet Please can you do a sanity check on the list below. If you have no objections, then I will create a PR that removes these (sub)dialogs from the project.

> dlgAdvanceOptions
> dlgAlignment
> dlgAnnualRaintotal
> dlgBackupManager
> dlgBoxplotCountVariable
> dlgBoxplotMethod
> dlgCPTtoTabularData
> dlgCliBoxplot
> dlgCliPlot
> dlgColumnMetadata
> dlgCorruptionDescribe
> dlgCorruptionModel
> dlgCorruptionOrganise
> dlgCountsTotals
> dlgCreateClimateObject
> dlgCumulativeExceedance
> dlgDayMonth
> dlgDeleteModels
> dlgExpand
> dlgExportforPICSA
> dlgExtremeEvents
> dlgFlatFrequencyTable
> dlgFormat
> dlgFreezeColumns
> dlgFreqTables
> dlgGammaDistr
> dlgGeneralisedLinearModels
> dlgGraphsGUI
> dlgHistogramMethod
> dlgInventoryMethod
> dlgLockUnlock
> dlgMissingData
> dlgMissingDataTable
> dlgOutputforCPT
> dlgPasteNewColumns
> dlgPasteNewDataFrame
> dlgPopulationPyramids
> dlgPrepare
> dlgRemoveUnusedLabels
> dlgReorderSheet
> dlgSeasonalSummary
> dlgSeasonalSummaryRain
> dlgSelect
> dlgSelectAndStuck
> dlgSelectColumns
> dlgSpellLength
> dlgStemAndLeaf
> dlgSubset
> dlgSurvivalDefine
> dlgSurvivalDescribe
> dlgSurvivalModel
> dlgSurvivalRates
> dlgThreeSummaries
> dlgTwoSampleNonparametricTest
> dlgVariableSets
> sdgAddLink
> sdgComment
> sdgDescribeTwoVarGraph
> sdgDistributionOptions
> sdgFactorDataFrame
> sdgFitCorruptionModelDisplay
> sdgFrequency
> sdgRestrict
lloyddewit commented 3 years ago

Please ignore this comment. It is just a personal record of some of the commands I used to identify unused (sub)dialogs:

 1208  grep ShowDialog *.vb |awk -F'.' '{print $2}'| awk -F' ' '{print $2}'| sort -u > ~/tmpDlgsUsed.txt
 1221  ls -l dlg*.vb |awk -F' ' '{print $9}' | awk -F'.' '{print $1}' |sort -u > ~/tmpDlgsAll.txt
 1223  ls -l sdg*.vb |awk -F' ' '{print $9}' | awk -F'.' '{print $1}' |sort -u >> ~/tmpDlgsAll.txt
 1226  sort -u ~/tmpDlgsAll.txt > ~/tmpDlgsAllSorted.txt
 1231  diff /home/stephen/tmpDlgsUsed.txt /home/stephen/tmpDlgsAllSorted.txt > ~/tmpDlgsUnused.txt
 1243  awk -F' ' '{print "grep -i " $2 " *.vb"}' ~/tmpDlgsUnused.txt > ~/tmpDlgsUnusedGrep.txt
 1244  chmod +x ~/tmpDlgsUnusedGrep.txt
 1246  ~/tmpDlgsUnusedGrep.txt > ~/tmpDlgsUnusedGrepResults.txt
 1248  cp ~/tmpDlgsUnused.txt ~/tmpDlgsUnusedEdited.txt
 1249  vi ~/tmpDlgsUnusedEdited.txt
shadrackkibet commented 3 years ago

@lloyddewit I did check all these dialogs. I make observations as follows;

Apart from the dialogs mentioned above. I think the rest should be removed from the project.

lilyclements commented 3 years ago
  1. @lilyclements created the following dialogs for her project on survival analysis.
  1. dlgSurvivalDefine - I think we should delete this because it is superseded by dlgSurvivalObject which has already been implemented.
  2. dlgSurvivalDescribe
  3. dlgSurvivalModel
  4. dlgSurvivalRates

Can confirm this is true so definitely delete 1 and 4. Hopefully a describe and model survival dialog can be implemented eventually but as of yet I'm not sure when that can be. If you want to delete 2 and 3 for now then I'm fine with that.

lloyddewit commented 3 years ago

@shadrackkibet @lilyclements Thank you for the very helpful feedback.

- I think `dlgBackupManager` was to be added under the tools menu see merged PR #4321.

@rdstern is dlgBackupManager still needed? If so, then should we add it to the 'File' or 'Tools' menu (see PR #4321)?

  1. dlgFlatFrequencyTable - It was added into frmmain in merged PR #3258. I can't find where it was removed. I think we should add it back? @rdstern Should we add this dialog back?
  2. dlgFreezeColumns - I remember we had a placeholder on the right-click sometimes back and we deleted it because the right click was becoming too long. Not sure if we need it again perhaps @rdstern can confirm? I think it is superseded by the upcoming select columns dialog and therefore we should delete? @rdstern still needed?
  3. dlgStemAndLeaf - Stem and leaf is needed for a new dialog suggested in #6177. Therefore no need to create a new form. We will keep
  4. @lilyclements created the following dialogs for her project on survival analysis.
  1. dlgSurvivalDefine - I think we should delete this because it is superseded by dlgSurvivalObject which has already been implemented.
  2. dlgSurvivalDescribe
  3. dlgSurvivalModel
  4. dlgSurvivalRates

@rdstern Do you expect to add 2 and 3 to R-Instat? Or can we delete all 4 dialogs?

* `dlgSelectColumns` is a new dialog I created in PR #6475 and I am working on it.

We will keep

  • sdgDistributionOptions is a new subdialog and has an open PR #6214 We will keep NB: Good to check if there are any other new dialogs that others are working on. I think there is none. Perhaps someone else should confirm?

  • dlgVariableSets I remember this was Patrick's first dialog in 2017. There was a attempt to add it into frmmain in closed PR #4017 but not sure why it was not added. @rdstern Should we add this dialog to R-Instat?

@africanmathsinitiative/developers At the top of this PR is a list of dialogs we plan to delete from the project. Please scan through this list. If you still need any of these dialogs then please let me know by end Wed 26/05/21, thanks