Skip to content

Commit

Permalink
Merge pull request #7 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
Update Branch
  • Loading branch information
Tula1 authored Sep 23, 2022
2 parents 41694c1 + 4cf9754 commit 95a43b6
Show file tree
Hide file tree
Showing 117 changed files with 30,738 additions and 19,706 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/compileCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: compileCheck

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

strategy:
matrix:
configuration: [Debug, Release]

# running on 2019 so that .NET version 4.5 and lower can be used
runs-on: windows-2019

# set variables
env:
Solution_Name: Instat.sln
Test_Project_Path: instat\instat.vbproj

# check out r-instat
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

# set up and restore NuGet packages
- name: Setup NuGet
uses: NuGet/[email protected]

- name: Restore NuGet
run: nuget restore $env:Solution_Name


# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

# Create the app package by building and packaging the Windows Application Packaging project
- name: Create the app package
run: msbuild $env:Test_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }}
env:
Appx_Bundle: Always
Appx_Bundle_Platforms: x86|x64
Appx_Package_Build_Mode: StoreUpload
Configuration: ${{ matrix.configuration }}
8 changes: 4 additions & 4 deletions instat/DlgDefineClimaticData.Designer.vb

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

10 changes: 7 additions & 3 deletions instat/Model/DataFrame/clsDataFramePage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,15 @@ Public Class clsDataFramePage
columnHeader.bIsFactor = True
ElseIf strHeaderType.Contains("character") Then
columnHeader.strTypeShortCode = "(C)"
ElseIf strHeaderType.Contains("Date") OrElse strHeaderType.Contains("POSIXct") OrElse
strHeaderType.Contains("POSIXt") OrElse strHeaderType.Contains("hms") OrElse
strHeaderType.Contains("difftime") OrElse strHeaderType.Contains("Duration") OrElse
ElseIf strHeaderType.Contains("Date") OrElse strHeaderType.Contains("Duration") OrElse
strHeaderType.Contains("Period") OrElse strHeaderType.Contains("Interval") Then
columnHeader.strTypeShortCode = "(D)"
ElseIf strHeaderType.Contains("POSIXct") OrElse
strHeaderType.Contains("POSIXt") Then
columnHeader.strTypeShortCode = "(D.T)"
ElseIf strHeaderType.Contains("hms") OrElse
strHeaderType.Contains("difftime") Then
columnHeader.strTypeShortCode = "(T)"
ElseIf strHeaderType.Contains("logical") Then
columnHeader.strTypeShortCode = "(L)"
' Structured columns e.g. "circular" are coded with "(S)"
Expand Down
8 changes: 3 additions & 5 deletions instat/clsInstatOptions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Imports RDotNet
iPreviewRows = clsInstatOptionsDefaults.DEFAULTiPreviewRows
iMaxRows = clsInstatOptionsDefaults.DEFAULTiMaxRows
iMaxCols = clsInstatOptionsDefaults.DEFAULTiMaxCols
strComment = clsInstatOptionsDefaults.DEFAULTstrComment
strComment = Translations.GetTranslation(clsInstatOptionsDefaults.DEFAULTstrComment)
strGraphDisplayOption = clsInstatOptionsDefaults.DEFAULTstrGraphDisplayOption
strLanguageCultureCode = clsInstatOptionsDefaults.DEFAULTstrLanguageCultureCode
strWorkingDirectory = clsInstatOptionsDefaults.DEFAULTstrWorkingDirectory
Expand Down Expand Up @@ -143,10 +143,8 @@ Imports RDotNet
SetCommandInOutpt(clsInstatOptionsDefaults.DEFAULTbCommandsinOutput)
End If

If strComment IsNot Nothing Then
SetComment(strComment)
Else
SetComment(clsInstatOptionsDefaults.DEFAULTstrComment)
If strComment Is Nothing Then
SetComment(Translations.GetTranslation(clsInstatOptionsDefaults.DEFAULTstrComment))
End If

If strGraphDisplayOption IsNot Nothing Then
Expand Down
2 changes: 1 addition & 1 deletion instat/clsInstatOptionsDefaults.vb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Public Class clsInstatOptionsDefaults
Public Shared ReadOnly DEFAULTclrEditor As Color = Color.Black
Public Shared ReadOnly DEFAULTiPreviewRows As Integer = 10
Public Shared ReadOnly DEFAULTiMaxRows As Integer = 1000
Public Shared ReadOnly DEFAULTiMaxCols As Integer = 30
Public Shared ReadOnly DEFAULTiMaxCols As Integer = 50
Public Shared ReadOnly DEFAULTstrComment As String = "Code generated by the dialog,"
Public Shared ReadOnly DEFAULTstrGraphDisplayOption As String = "view_output_window"
Public Shared ReadOnly DEFAULTbChangeDataFrame As Boolean = False
Expand Down
41 changes: 41 additions & 0 deletions instat/clsRegressionDefaults.vb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,38 @@ Public Class clsRegressionDefaults
End Get
End Property

Public Shared ReadOnly Property clsDefaultGLmNBFunction As RFunction
Get

Dim clsNegativeBinomialFunction As New RFunction

clsNegativeBinomialFunction.SetRCommand("glm.nb")
clsNegativeBinomialFunction.SetPackageName("MASS")
Return clsNegativeBinomialFunction
End Get
End Property

Public Shared ReadOnly Property clsDefaultGLmPolrFunction As RFunction
Get

Dim clsRModelFunction As New RFunction

clsRModelFunction.SetRCommand("polr")
clsRModelFunction.SetPackageName("MASS")
Return clsRModelFunction
End Get
End Property

Public Shared ReadOnly Property clsDefaultGLmMultinomFunction As RFunction
Get

Dim clsMultinomFunction As New RFunction

clsMultinomFunction.SetRCommand("multinom")
clsMultinomFunction.SetPackageName("nnet")
Return clsMultinomFunction
End Get
End Property
Public Shared ReadOnly Property clsDefaultGlmFunction As RFunction
Get

Expand Down Expand Up @@ -91,6 +123,15 @@ Public Class clsRegressionDefaults
End Get
End Property

Public Shared ReadOnly Property clsDefaultAnovaIIFunction As RFunction
Get
Dim clsDefaultRaovFunction As New RFunction
clsDefaultRaovFunction.SetPackageName("car")
clsDefaultRaovFunction.SetRCommand("Anova")
Return clsDefaultRaovFunction
End Get
End Property

Public Shared ReadOnly Property clsDefaultFormulaFunction As RFunction
Get
Dim clsDefaultRModelsFunction As New RFunction
Expand Down
8 changes: 4 additions & 4 deletions instat/dlgAppend.Designer.vb

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

2 changes: 1 addition & 1 deletion instat/dlgCalculator.vb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Public Class dlgCalculator
Me.Width = iBasicWidth * 1.27
ucrBase.iHelpTopicID = 598
Case "Integer"
Me.Width = iBasicWidth * 1.18
Me.Width = iBasicWidth * 1.37
Case Else
Me.Width = iBasicWidth
End Select
Expand Down
16 changes: 8 additions & 8 deletions instat/dlgClimaticCheckDataRain.Designer.vb

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

5 changes: 2 additions & 3 deletions instat/dlgClimaticCheckDataTemperature.vb
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ Public Class dlgClimaticCheckDataTemperature
ucrNudCoeff.SetLinkedDisplayControl(lblCoeff)

ucrChkSame.SetParameter(New RParameter("same", clsSameOp, 1), bNewChangeParameterValue:=False)
ucrChkSame.SetText("Days: (Element1)")
ucrChkSame.SetText("Days:")
ucrChkSame.AddToLinkedControls(ucrNudSame, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=4)

ucrChkJump.SetParameter(New RParameter("jump", clsJumpOp, 1), bNewChangeParameterValue:=False)
ucrChkJump.SetText("Jump: (Element1)")
ucrChkJump.SetText("Jump:")
ucrChkJump.AddToLinkedControls(ucrNudJump, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=10)

ucrChkDifference.SetParameter(New RParameter("diff", clsDiffOp, 1), bNewChangeParameterValue:=False)
Expand Down Expand Up @@ -597,7 +597,6 @@ Public Class dlgClimaticCheckDataTemperature
If ucrReceiverElement1.IsEmpty OrElse ucrReceiverElement2.IsEmpty Then
ucrChkDifference.Enabled = False
ucrNudDifference.Enabled = False
ucrChkDifference.Checked = False
Else
ucrChkDifference.Enabled = True
ucrNudDifference.Enabled = True
Expand Down
2 changes: 1 addition & 1 deletion instat/dlgClimaticDataEntry.vb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Public Class dlgClimaticDataEntry

Private Sub TestOkEnabled()
If Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty Then
ucrBase.OKEnabled(clsSaveDataEntryFunction.ContainsParameter("rows_changed"))
ucrBase.OKEnabled(clsSaveDataEntryFunction.ContainsParameter("rows_changed") OrElse clsCommentsListFunction.ContainsParameter("comment"))
cmdEnterData.Enabled = True
If Not ucrReceiverStation.IsEmpty AndAlso ucrInputSelectStation.IsEmpty Then
cmdEnterData.Enabled = False
Expand Down
4 changes: 2 additions & 2 deletions instat/dlgClimaticSummary.Designer.vb

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

Loading

0 comments on commit 95a43b6

Please sign in to comment.