Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #67 from AirGrid/release/v0.0.0-dev.17
Browse files Browse the repository at this point in the history
release: v0.0.0-dev.17 MASTER
  • Loading branch information
ydennisy authored Oct 5, 2020
2 parents 3b7a80d + c0f189b commit 23b83ff
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@airgrid/edgekit",
"version": "0.0.0-dev.15",
"version": "0.0.0-dev.17",
"homepage": "https://edgekit.org/",
"author": "AirGrid <https://airgrid.io>",
"license": "MIT",
Expand Down
3 changes: 3 additions & 0 deletions src/audiences/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const sportInterestAudience: AudienceDefinition = {
name: 'Interest | Sport',
version: VERSION,
definition: {
featureVersion: 1,
ttl: TTL_IN_SECS,
lookBack: LOOK_BACK_IN_SECS,
occurrences: OCCURRENCES,
Expand All @@ -27,6 +28,7 @@ export const travelInterestAudience: AudienceDefinition = {
name: 'Interest | Travel',
version: VERSION,
definition: {
featureVersion: 1,
ttl: TTL_IN_SECS,
lookBack: LOOK_BACK_IN_SECS,
occurrences: OCCURRENCES,
Expand All @@ -41,6 +43,7 @@ export const automotiveInterestAudience: AudienceDefinition = {
name: 'Interest | Automotive',
version: VERSION,
definition: {
featureVersion: 1,
ttl: TTL_IN_SECS,
lookBack: LOOK_BACK_IN_SECS,
occurrences: OCCURRENCES,
Expand Down
4 changes: 2 additions & 2 deletions src/engine/translate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const translate = (
isStringArray(audienceDefinition.definition.queryValue)
? [
{
version: audienceDefinition.version,
version: audienceDefinition.definition.featureVersion,
property: audienceDefinition.definition.queryProperty,
filterComparisonType:
audienceDefinition.definition.queryFilterComparisonType,
Expand All @@ -24,7 +24,7 @@ export const translate = (
isVectorQueryValue(audienceDefinition.definition.queryValue)
? [
{
version: audienceDefinition.version,
version: audienceDefinition.definition.featureVersion,
property: audienceDefinition.definition.queryProperty,
filterComparisonType:
audienceDefinition.definition.queryFilterComparisonType,
Expand Down
1 change: 1 addition & 0 deletions test/gdpr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const sportAudience: AudienceDefinition = {
name: 'Sport Audience',
version: 1,
definition: {
featureVersion: 1,
ttl: TTL,
lookBack: 10,
occurrences: 0,
Expand Down
12 changes: 10 additions & 2 deletions test/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const sportAudience: AudienceDefinition = {
name: 'Sport Audience',
version: 1,
definition: {
featureVersion: 1,
ttl: TTL,
lookBack: 10,
occurrences: 2,
Expand All @@ -55,6 +56,7 @@ const lookBackInfinityAudience: AudienceDefinition = {
name: 'Look Back Audience',
version: 1,
definition: {
featureVersion: 1,
ttl: TTL,
lookBack: 0,
occurrences: 2,
Expand All @@ -69,6 +71,7 @@ const lookBackAudience: AudienceDefinition = {
name: 'Look Back Audience',
version: 1,
definition: {
featureVersion: 1,
ttl: TTL,
lookBack: 2,
occurrences: 2,
Expand All @@ -83,6 +86,7 @@ const topicModelAudience: AudienceDefinition = {
name: 'Look Back Audience',
version: 1,
definition: {
featureVersion: 1,
ttl: 100,
lookBack: 2,
occurrences: 1,
Expand Down Expand Up @@ -317,6 +321,7 @@ describe('Topic model run with additional audience', () => {
name: 'Interest | Sport',
version: 1,
definition: {
featureVersion: 1,
occurrences: 1,
ttl: 1000,
lookBack: 1000,
Expand All @@ -334,6 +339,7 @@ describe('Topic model run with additional audience', () => {
name: 'Interest | Sport',
version: 1,
definition: {
featureVersion: 1,
occurrences: 1,
ttl: 1000,
lookBack: 1000,
Expand Down Expand Up @@ -427,8 +433,9 @@ describe('Topic model run version mismatch', () => {
const topicModelAudience: AudienceDefinition = {
id: 'iab-608',
name: 'Interest | Sport',
version: 2,
version: 1,
definition: {
featureVersion: 2,
occurrences: 1,
ttl: 1000,
lookBack: 1000,
Expand All @@ -444,8 +451,9 @@ describe('Topic model run version mismatch', () => {
const keywordsAudience: AudienceDefinition = {
id: 'iab-607',
name: 'Interest | Sport',
version: 2,
version: 1,
definition: {
featureVersion: 2,
occurrences: 1,
ttl: 1000,
lookBack: 1000,
Expand Down
2 changes: 2 additions & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface AudienceDefinition {
name: string;
definition:
| {
featureVersion: number;
ttl: number;
lookBack: number;
occurrences: number;
Expand All @@ -72,6 +73,7 @@ export interface AudienceDefinition {
queryFilterComparisonType: 'vectorDistance';
}
| {
featureVersion: number;
ttl: number;
lookBack: number;
occurrences: number;
Expand Down

0 comments on commit 23b83ff

Please sign in to comment.