fiftyone.geolocation 4.4.44 → 4.4.46
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/options.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"Name": "Ubuntu_Node_18",
|
|
4
4
|
"Image": "ubuntu-20.04",
|
|
5
5
|
"Language": "node",
|
|
6
|
-
"LanguageVersion": "18
|
|
6
|
+
"LanguageVersion": "18",
|
|
7
7
|
"RunPerformance": true,
|
|
8
8
|
"PackageRequirement": true
|
|
9
9
|
},
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Name": "Windows_Node_18",
|
|
12
12
|
"Image": "windows-latest",
|
|
13
13
|
"Language": "node",
|
|
14
|
-
"LanguageVersion": "18
|
|
14
|
+
"LanguageVersion": "18",
|
|
15
15
|
"RunPerformance": true,
|
|
16
16
|
"PackageRequirement": true
|
|
17
17
|
},
|
|
@@ -19,22 +19,23 @@
|
|
|
19
19
|
"Name": "macOS_Node_18",
|
|
20
20
|
"Image": "macos-latest",
|
|
21
21
|
"Language": "node",
|
|
22
|
-
"LanguageVersion": "18
|
|
22
|
+
"LanguageVersion": "18",
|
|
23
23
|
"RunPerformance": true,
|
|
24
24
|
"PackageRequirement": true
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"Name": "Ubuntu_Node_20",
|
|
28
|
+
"Image": "ubuntu-20.04",
|
|
29
|
+
"Language": "node",
|
|
30
|
+
"LanguageVersion": "20",
|
|
31
|
+
"RunPerformance": true,
|
|
32
|
+
"PackageRequirement": true
|
|
33
|
+
},
|
|
33
34
|
{
|
|
34
35
|
"Name": "Windows_Node_20",
|
|
35
36
|
"Image": "windows-latest",
|
|
36
37
|
"Language": "node",
|
|
37
|
-
"LanguageVersion": "20
|
|
38
|
+
"LanguageVersion": "20",
|
|
38
39
|
"RunPerformance": true,
|
|
39
40
|
"PackageRequirement": true
|
|
40
41
|
},
|
|
@@ -42,7 +43,31 @@
|
|
|
42
43
|
"Name": "macOS_Node_20",
|
|
43
44
|
"Image": "macos-latest",
|
|
44
45
|
"Language": "node",
|
|
45
|
-
"LanguageVersion": "20
|
|
46
|
+
"LanguageVersion": "20",
|
|
47
|
+
"RunPerformance": true,
|
|
48
|
+
"PackageRequirement": true
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"Name": "Ubuntu_Node_22",
|
|
52
|
+
"Image": "ubuntu-22.04",
|
|
53
|
+
"Language": "node",
|
|
54
|
+
"LanguageVersion": "22",
|
|
55
|
+
"RunPerformance": true,
|
|
56
|
+
"PackageRequirement": true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"Name": "Windows_Node_22",
|
|
60
|
+
"Image": "windows-latest",
|
|
61
|
+
"Language": "node",
|
|
62
|
+
"LanguageVersion": "22",
|
|
63
|
+
"RunPerformance": true,
|
|
64
|
+
"PackageRequirement": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"Name": "macOS_Node_22",
|
|
68
|
+
"Image": "macos-latest",
|
|
69
|
+
"Language": "node",
|
|
70
|
+
"LanguageVersion": "22",
|
|
46
71
|
"RunPerformance": true,
|
|
47
72
|
"PackageRequirement": true
|
|
48
73
|
}
|
|
@@ -54,8 +54,8 @@ class GeoLocationPipelineBuilder extends PipelineBuilder {
|
|
|
54
54
|
// First we need the cloudRequestEngine
|
|
55
55
|
|
|
56
56
|
const cloudRequestEngineOptions = {
|
|
57
|
-
resourceKey
|
|
58
|
-
cloudRequestOrigin
|
|
57
|
+
resourceKey,
|
|
58
|
+
cloudRequestOrigin
|
|
59
59
|
};
|
|
60
60
|
if (baseURL !== null) {
|
|
61
61
|
cloudRequestEngineOptions.baseURL = baseURL;
|
|
@@ -65,7 +65,7 @@ class GeoLocationPipelineBuilder extends PipelineBuilder {
|
|
|
65
65
|
|
|
66
66
|
// Then add the cloud geo-location engine
|
|
67
67
|
|
|
68
|
-
this.flowElements.push(new GeoLocationCloud({ locationProvider
|
|
68
|
+
this.flowElements.push(new GeoLocationCloud({ locationProvider }));
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
package/package.json
CHANGED
|
@@ -103,7 +103,7 @@ if (isAsync) {
|
|
|
103
103
|
resourceKey: myResourceKey,
|
|
104
104
|
locationProvider: 'fiftyonedegrees'
|
|
105
105
|
}).build();
|
|
106
|
-
|
|
106
|
+
const engine = pipeline.flowElements.location;
|
|
107
107
|
|
|
108
108
|
await testAvailableProperties(done, pipeline, engine);
|
|
109
109
|
});
|
|
@@ -117,7 +117,7 @@ if (isAsync) {
|
|
|
117
117
|
resourceKey: myResourceKey,
|
|
118
118
|
locationProvider: 'fiftyonedegrees'
|
|
119
119
|
}).build();
|
|
120
|
-
|
|
120
|
+
const engine = pipeline.flowElements.location;
|
|
121
121
|
|
|
122
122
|
await testValueTypes(done, pipeline, engine);
|
|
123
123
|
});
|
|
@@ -136,7 +136,7 @@ async function testAvailableProperties (done, pipeline, engine) {
|
|
|
136
136
|
|
|
137
137
|
expectedProperties[engine.dataKey].forEach(key => {
|
|
138
138
|
try {
|
|
139
|
-
|
|
139
|
+
const apv = flowData[engine.dataKey][key];
|
|
140
140
|
if (apv === undefined) {
|
|
141
141
|
done.fail(new Error(`Aspect property value for ${key} should not be undefined.`));
|
|
142
142
|
}
|
|
@@ -168,9 +168,9 @@ async function testValueTypes (done, pipeline, engine) {
|
|
|
168
168
|
|
|
169
169
|
Object.keys(engine.properties).forEach(key => {
|
|
170
170
|
if (expectedProperties[engine.dataKey].includes(key)) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
const property = engine.properties[key.toLowerCase()];
|
|
172
|
+
const expectedType = property.type;
|
|
173
|
+
const apv = flowData[engine.dataKey][key];
|
|
174
174
|
|
|
175
175
|
expect(apv).not.toBeNull();
|
|
176
176
|
expect(apv).toBeDefined();
|
|
@@ -185,8 +185,8 @@ async function testValueTypes (done, pipeline, engine) {
|
|
|
185
185
|
expect.extend({
|
|
186
186
|
// Method to validate a given value has the expected type.
|
|
187
187
|
toBe51DType (received, name, fodType) {
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
const valueType = typeof received;
|
|
189
|
+
let valid = false;
|
|
190
190
|
|
|
191
191
|
switch (fodType) {
|
|
192
192
|
case 'Boolean':
|