fiftyone.geolocation 4.3.0 → 4.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ci/build-and-test.yml +21 -0
- package/ci/common-ci/.github/labels.yml +80 -0
- package/ci/common-ci/.github/workflows/sync-labels.yml +52 -0
- package/ci/common-ci/CiTips.md +30 -1
- package/ci/common-ci/GitVersion.yml +18 -0
- package/ci/common-ci/README.md +155 -17
- package/ci/common-ci/build-and-test.yml +65 -0
- package/ci/common-ci/check-merge-commit-format.yml +56 -0
- package/ci/common-ci/cloud-release-config.json +51 -0
- package/ci/common-ci/create-tag.yml +41 -0
- package/ci/common-ci/deploy.yml +16 -2
- package/ci/common-ci/dotnet/shared-code-signing-steps.yml +20 -0
- package/ci/common-ci/dotnet/shared-extract-and-publish-packages.yml +29 -0
- package/ci/common-ci/go/shared-go-list-stage.yml +64 -0
- package/ci/common-ci/java/readme.md +22 -0
- package/ci/common-ci/java/shared-package-signing-steps.yml +17 -0
- package/ci/{shared-extract-and-publish-packages.yml → common-ci/node/shared-extract-and-publish-packages.yml} +7 -1
- package/ci/common-ci/php/readme.md +15 -0
- package/ci/common-ci/release-config-schema.json +52 -0
- package/ci/common-ci/release-config-template.json +310 -0
- package/ci/common-ci/release-config.json +89 -0
- package/ci/common-ci/release-process.drawio +165 -0
- package/ci/common-ci/release-process.png +0 -0
- package/ci/common-ci/scripts/azure/checkSlot.ps1 +28 -0
- package/ci/common-ci/scripts/modules/51DAuthorizationModule/51DAuthorizationModule.Tests.ps1 +1 -0
- package/ci/common-ci/scripts/modules/51DAuthorizationModule/51DAuthorizationModule.psm1 +16 -0
- package/ci/common-ci/scripts/modules/51DBuildModule/51DBuildModule.Tests.ps1 +3 -0
- package/ci/common-ci/scripts/modules/51DBuildModule/51DBuildModule.psm1 +200 -0
- package/ci/common-ci/scripts/modules/51DDeployModule/51DDeployModule.psm1 +66 -0
- package/ci/common-ci/scripts/modules/51DDownloadDataFileModule/51DDownloadDataFileModule.psm1 +74 -0
- package/ci/common-ci/scripts/modules/51DEnvironmentModule/51DEnvironmentModule.Tests.ps1 +25 -0
- package/ci/common-ci/scripts/modules/51DEnvironmentModule/51DEnvironmentModule.psm1 +22 -0
- package/ci/common-ci/scripts/modules/51DErrorHandleModule/51DErrorHandleModule.Tests.ps1 +1 -0
- package/ci/common-ci/scripts/modules/51DErrorHandleModule/51DErrorHandleModule.psm1 +41 -0
- package/ci/common-ci/scripts/modules/51DGitModule/51DGitModule.Tests.ps1 +5 -0
- package/ci/common-ci/scripts/modules/51DGitModule/51DGitModule.psm1 +702 -0
- package/ci/common-ci/scripts/modules/51DPackageModule/51DPackageModule.Tests.ps1 +842 -0
- package/ci/common-ci/scripts/modules/51DPackageModule/51DPackageModule.psm1 +926 -0
- package/ci/common-ci/scripts/modules/51DPipelineModule/51DPipelineModule.Tests.ps1 +1 -0
- package/ci/common-ci/scripts/modules/51DPipelineModule/51DPipelineModule.psm1 +87 -0
- package/ci/common-ci/scripts/modules/51DPullRequestModule/51DPullRequestModule.Tests.ps1 +194 -0
- package/ci/common-ci/scripts/modules/51DPullRequestModule/51DPullRequestModule.psm1 +653 -0
- package/ci/common-ci/scripts/modules/51DReleaseModule/51DReleaseModule.Tests.ps1 +277 -0
- package/ci/common-ci/scripts/modules/51DReleaseModule/51DReleaseModule.psm1 +554 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/51DReleaseTestEnvModule.Tests.ps1 +1141 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/51DReleaseTestEnvModule.psd1 +0 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/51DReleaseTestEnvModule.psm1 +1465 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/ConfigurationVerifier.Tests.ps1 +318 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/ConfigurationVerifier.psm1 +344 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/ReleaseVerifier.Tests.ps1 +1186 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/ReleaseVerifier.psm1 +900 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/SharedVariables.psm1 +139 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/c-test-env-config.json +268 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/dotnet-deploy-test-env-config.json +700 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/dotnet-test-env-config.json +533 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/go-deploy-test-env-config.json +290 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/go-test-env-config.json +260 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/java-deploy-test-env-config.json +511 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/java-test-env-config.json +388 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/node-deploy-test-env-config.json +419 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/node-test-env-config.json +329 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/php-test-env-config.json +540 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/python-deploy-test-env-config.json +411 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/python-test-env-config.json +321 -0
- package/ci/common-ci/scripts/modules/51DReleaseTestEnvModule/config/test-env-config.json +457 -0
- package/ci/common-ci/scripts/modules/51DRestModule/51DRestModule.psm1 +38 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DApplicationInsightsModule/51DApplicationInsightsModule.psm1 +104 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DChecksModule/51DChecksModule.psm1 +68 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DCloudModule/51DCloudModule.psm1 +155 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DConnectAzureModule/51DConnectAzureModule.psm1 +45 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DSSLBindingsModule/51DSSLBIndingsModule.psm1 +100 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DStagingSlotModule/51DStagingSlotModule.psm1 +50 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DStorageAccountModule/51DStorageAccountModule.psm1 +248 -0
- package/ci/common-ci/scripts/modules/AzurePortalModules/51DTrafficManagerModule/51DTrafficManagerModule.psm1 +58 -0
- package/ci/common-ci/shared-auto-complete-pr-stage.yml +61 -0
- package/ci/common-ci/shared-create-tag-job.yml +19 -30
- package/ci/common-ci/shared-docker-build-steps.yml +34 -0
- package/ci/common-ci/shared-docker-push-steps.yml +32 -0
- package/ci/common-ci/shared-docker-test-http-steps.yml +69 -0
- package/ci/common-ci/shared-git-tag-job.yml +38 -0
- package/ci/common-ci/shared-git-version-job.yml +71 -0
- package/ci/common-ci/shared-publish-github-stage.yml +69 -60
- package/ci/common-ci/shared-submodule-trigger-stage.yml +110 -0
- package/ci/common-ci/shared-variables.yml +3 -0
- package/ci/common-ci/trigger-release-apis.yml +39 -0
- package/ci/create-packages.yml +24 -36
- package/ci/deploy-external.yml +55 -0
- package/ci/{deploy.yml → deploy-internal.yml} +3 -29
- package/ci/shared-build-and-test-platforms.yml +7 -1
- package/ci/shared-build-and-test-stage.yml +9 -2
- package/ci/submodule-trigger.yml +12 -0
- package/examples/examples.test.js +3 -3
- package/geoLocationPipelineBuilder.js +13 -10
- package/package.json +11 -7
- package/setup.js +1 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Using module 51DEnvironmentModule
|
|
2
|
+
|
|
3
|
+
Describe 'GetEnvironmentVariable' {
|
|
4
|
+
It 'Successfully get default in test environment' {
|
|
5
|
+
$curEnv = $Env:51D_ENVIRONMENT
|
|
6
|
+
# Set test environment
|
|
7
|
+
$Env:51D_ENVIRONMENT = "Test"
|
|
8
|
+
$result = [EnvironmentHandler]::GetEnvironmentVariable("test")
|
|
9
|
+
|
|
10
|
+
# Restore the current environment
|
|
11
|
+
$Env:51D_ENVIRONMENT = $curEnv
|
|
12
|
+
$result | Should -Be "default"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
It 'Successfully get value in production environment' {
|
|
16
|
+
$curEnv = $Env:51D_ENVIRONMENT
|
|
17
|
+
# Set test environment
|
|
18
|
+
$Env:51D_ENVIRONMENT = "Production"
|
|
19
|
+
$result = [EnvironmentHandler]::GetEnvironmentVariable("test")
|
|
20
|
+
|
|
21
|
+
# Restore the current environment
|
|
22
|
+
$Env:51D_ENVIRONMENT = $curEnv
|
|
23
|
+
$result | Should -Be "test"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class EnvironmentHandler {
|
|
2
|
+
<#
|
|
3
|
+
.Description
|
|
4
|
+
This function check what value caller should see in current environment.
|
|
5
|
+
This is normally used to make sure that in a test environment, a fake
|
|
6
|
+
value is always used so that we don't accidentally change the production
|
|
7
|
+
environment.
|
|
8
|
+
|
|
9
|
+
.Parameter envVarValue
|
|
10
|
+
Actual environment value
|
|
11
|
+
|
|
12
|
+
.Outputs
|
|
13
|
+
The input value or default if in test environment
|
|
14
|
+
#>
|
|
15
|
+
static [object]GetEnvironmentVariable([object]$envVarValue) {
|
|
16
|
+
if ($Env:51D_ENVIRONMENT -eq 'Test') {
|
|
17
|
+
return "default"
|
|
18
|
+
} else {
|
|
19
|
+
return $envVarValue
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Placeholder for future tests
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<#
|
|
2
|
+
===================== Error Handling =====================
|
|
3
|
+
.Description
|
|
4
|
+
This module contains functions that perform error handling
|
|
5
|
+
actions.
|
|
6
|
+
For more information, please read description of
|
|
7
|
+
each function.
|
|
8
|
+
#>
|
|
9
|
+
|
|
10
|
+
<#
|
|
11
|
+
.Description
|
|
12
|
+
Check a Rest Response and return
|
|
13
|
+
whether it is successful or not.
|
|
14
|
+
|
|
15
|
+
.Parameter Response
|
|
16
|
+
|
|
17
|
+
.Outputs true or false
|
|
18
|
+
#>
|
|
19
|
+
function Test-RestResponse {
|
|
20
|
+
param (
|
|
21
|
+
$Response,
|
|
22
|
+
[string]$ErrorMessage
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
# Check that reponse is not null. This is for cases whereexception occurs
|
|
26
|
+
# when call Invoke-WebRequest and no response is returned.
|
|
27
|
+
if ($Response -eq $null) {
|
|
28
|
+
Write-Host "# ERROR: Response object is null."
|
|
29
|
+
Write-Host "# ERROR: $ErrorMessage"
|
|
30
|
+
return $false
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Check for actual status code
|
|
34
|
+
if ($Response.StatusCode -le 599 -and $Response.StatusCode -ge 400) {
|
|
35
|
+
|
|
36
|
+
Write-Host "# ERROR: Status Code returned $($Response.StatusCode)"
|
|
37
|
+
Write-Host "# ERROR: $ErrorMessage"
|
|
38
|
+
throw "# ERROR: Rest api call failed."
|
|
39
|
+
}
|
|
40
|
+
return $true
|
|
41
|
+
}
|