-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading metadata information to google buckets #9092
Conversation
@Vitalis95 thanks for the first go at this. I have two comments
|
@jkmusyoka , have made the changes. Do we need |
@Vitalis95 just to follow the same as in Patrick's Import from Climsoft. |
@Vitalis95 the |
@jkmusyoka , I have added the |
@jkmusyoka , over to you. I have tested from my end its fine |
@Vitalis95 the However the other part |
@jkmusyoka , on the |
@Vitalis95 well spotted. That was my fault. The dialog is all done now, thanks for the hard work. I ll do some final testing tomorrow and if all goes well, I ll approve so the changes are merged. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@N-thony this is now ready for merging with master. Over to you.
Thanks @Vitalis95 and @lilyclements
Private Sub sdgMetadataGoogleBuckets_Load(sender As Object, e As EventArgs) Handles MyBase.Load | ||
autoTranslate(Me) | ||
End Sub | ||
Public Sub InitialiseControls() | ||
ucrSelectorMetadata.SetParameter(New RParameter("metadata_data", 0)) | ||
ucrSelectorMetadata.SetParameterIsrfunction() | ||
|
||
ucrReceiverStation.SetParameter(New RParameter("station_var", 1)) | ||
ucrReceiverStation.Selector = ucrSelectorMetadata | ||
ucrReceiverStation.SetParameterIsString() | ||
ucrReceiverStation.SetClimaticType("station") | ||
ucrReceiverStation.bAutoFill = True | ||
|
||
ucrReceiverLongititude.SetParameter(New RParameter("longitude_var", 2)) | ||
ucrReceiverLongititude.Selector = ucrSelectorMetadata | ||
ucrReceiverLongititude.SetParameterIsString() | ||
ucrReceiverLongititude.SetClimaticType("lon") | ||
ucrReceiverLongititude.bAutoFill = True | ||
|
||
ucrReceiverLatitude.SetParameter(New RParameter("latitude_var", 3)) | ||
ucrReceiverLatitude.Selector = ucrSelectorMetadata | ||
ucrReceiverLatitude.SetParameterIsString() | ||
ucrReceiverLatitude.SetClimaticType("lat") | ||
ucrReceiverLatitude.bAutoFill = True | ||
|
||
ucrReceiverElavation.SetParameter(New RParameter("elevation_var", 4)) | ||
ucrReceiverElavation.Selector = ucrSelectorMetadata | ||
ucrReceiverElavation.SetParameterIsString() | ||
ucrReceiverElavation.SetClimaticType("alt") | ||
ucrReceiverElavation.bAutoFill = True | ||
|
||
ucrReceiverDistrict.SetParameter(New RParameter("district_var", 5)) | ||
ucrReceiverDistrict.Selector = ucrSelectorMetadata | ||
ucrReceiverDistrict.SetParameterIsString() | ||
ucrReceiverDistrict.SetClimaticType("district") | ||
ucrReceiverDistrict.bAutoFill = True | ||
End Sub | ||
Public Sub SetRCode(clsNewRSyntax As RSyntax, clsNewUpdateMetadataInfoFunction As RFunction, Optional bReset As Boolean = False) | ||
If Not bControlsInitialised Then | ||
InitialiseControls() | ||
End If | ||
clsRsyntax = clsNewRSyntax | ||
clsUpdateMetadataInfoFunction = clsNewUpdateMetadataInfoFunction | ||
|
||
ucrReceiverDistrict.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) | ||
ucrReceiverElavation.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) | ||
ucrReceiverLatitude.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) | ||
ucrReceiverLongititude.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) | ||
ucrReceiverStation.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) | ||
ucrSelectorMetadata.SetRCode(clsUpdateMetadataInfoFunction, bReset, bCloneIfNeeded:=True) | ||
End Sub | ||
|
||
Private Sub ucrReceiverLongititude_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverLongititude.ControlValueChanged, ucrReceiverStation.ControlValueChanged, ucrReceiverLatitude.ControlValueChanged, ucrReceiverElavation.ControlValueChanged, ucrReceiverDistrict.ControlValueChanged, ucrSelectorMetadata.ControlValueChanged | ||
If Not (ucrReceiverElavation.IsEmpty OrElse ucrReceiverDistrict.IsEmpty OrElse ucrReceiverLatitude.IsEmpty OrElse ucrReceiverLongititude.IsEmpty OrElse ucrReceiverStation.IsEmpty) Then | ||
clsRsyntax.AddToBeforeCodes(clsUpdateMetadataInfoFunction, 1) | ||
Else | ||
clsRsyntax.RemoveFromBeforeCodes(clsUpdateMetadataInfoFunction) | ||
End If | ||
End Sub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one line space between the subs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@N-thony , we don't call this sub dialog any more in the main dialog. We have made the changes on the main dialog. Is there way I can remove the sub-dialog changes from this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Vitalis95 I'm not sure about this. It was done usually by @lloyddewit
Public clsRsyntax As New RSyntax | ||
Public clsExportRinstatToBucketFunction, clsUpdateMetadataInfoFunction, ClsGcsAuthFileFunction, clsSummariesFunction As New RFunction | ||
Public clsReforMattAnnualSummariesFunction, clsReformatCropSuccessFunction, clsReformatSeasonStartFunction, clsReformatTempSummariesFunction, clsReformatMonthlyTempSummaries As New RFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have them as Private variables?
Fixes #9075
@lilyclements @jkmusyoka , have a look at it