Skip to content
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

Initial set up and evaluation logic for server side custom signals #2628

Merged
merged 7 commits into from
Jul 16, 2024

Conversation

kjelko
Copy link
Contributor

@kjelko kjelko commented Jul 12, 2024

Setting up the API interfaces and some evaluation logic for a set of initial operators (just string operatorss for now). Looking for an early review here to just make sure we're all aligned on approach before adding logic for the remaining operators.

PercentCondition
PercentCondition,
CustomSignalOperator,
// CustomSignalCondition,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't needed, mind removing the commented-out import?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, done.

// @public
export type DefaultConfig = {
[key: string]: string | number | boolean;
};

// @public
export type EvaluationContext = {
[key: string]: string | number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API proposal describes PredefinedSignals and UserProvidedSignals types. I think that would make this more self-documenting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@kjelko kjelko merged commit 334961f into ssrc-targeting Jul 16, 2024
10 checks passed
kjelko added a commit that referenced this pull request Aug 20, 2024
…2628)

initial skeleton for custom signal evaluation logic

---------

Co-authored-by: Kevin Elko <kjelko@google.com>
kjelko added a commit that referenced this pull request Sep 5, 2024
* Initial set up and evaluation logic for server side custom signals (#2628)

initial skeleton for custom signal evaluation logic

---------

Co-authored-by: Kevin Elko <kjelko@google.com>

* Add logic for remaining custom signal operators (#2633)

* initial skeleton for custom signal evaluation logic

* adjust some formatting

* remove extra curly brace

* run lint

* Run apidocs

* Split EvaluationContext into UserProvidedSignals and PredefinedSignals

* rerun apidocs

* add logic for remaining custom signal operators

* more test cases

* test cases for numeric operators

* update tests to be way more robust and implement handling for a few edge cases

* update some comments

---------

Co-authored-by: Kevin Elko <kjelko@google.com>

* Ssrc targeting numeric version fixes (#2656)

* refactor numeric version parsing logic and add more test cases

* run lint

* test cases for max num segments

* run lint on tests

---------

Co-authored-by: Kevin Elko <kjelko@google.com>

* fix test ordering

* Export signal types and rerun apidocs

* update docstrings

* uber minor comment fix

---------

Co-authored-by: Kevin Elko <kjelko@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants