Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Conditional Sections #57

Closed
trieloff opened this issue Sep 27, 2018 · 0 comments
Closed

Conditional Sections #57

trieloff opened this issue Sep 27, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@trieloff
Copy link
Contributor

In order to enable testing and personalization on a section-level, conditional sections allow two modes of operation:

  1. strain-dependent sections: sections that have a strain property set, will only be included in the output if the current strain equals either the value of strain or equals any value of strain if strain is an array.
  2. tested sections: sections that have a test property set will only be included in the output if a test selection algorithm has selected them from all other sections that have the same test value. The algorithm will group all sections based on their test value, then hash the section's contents and the current strain name and select the section with the lowest hash value. This algorithm creates a selection that is random, but stable for stable content and strain names.
@trieloff trieloff added the enhancement New feature or request label Sep 27, 2018
trieloff added a commit that referenced this issue Nov 14, 2018
#57

* draft: conditional sections

* section filter

* unit tests for strain-based section filtering

* lint

* add integration test

* make the integration test fail

* fix integration test, flag hidden sections as 'hidden: true'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant