Repository navigation
Prod release: support unicode in data, load local jsPsych (dev), optimize email task - #1934
Merged
Merged
Conversation
jsPsych local plugin overlay
* use utf-8 encoding for psychds download tmp files: write_overview_to_tmp_file for resp/child overviews; write for all responses JSON in render_to_response (fixes ascii cannot encode character error) * use utf-8 encoding for frame data dict: less likely but possible for researchers to use unicode in frame IDs and keys * add tests for non-ascii characters in all changed file operations
* update announcement email query: remove child/family/study cases where a message line exists, even if sent_timestamp is NULL, to ensure that same email is never resent * add test for study/family/child announcement email targeting with and without an existing message row that has a NULL timestamp * add more test coverage for announcement emails: existing announcement row should only exclude that specific study/family/child combination from potential targets; inactive users should be excluded as potential targets
* optimize get_child_eligibility_for_study performance: run child in age range check first (pure python) to short-circuit majority of ineligible pairs without having to run DB queries (participation eligibility check) or criteria expression evaluation (eligibility check) * cache all of the distinct compiled expressions (keyed on the expression string) so that these do not need to be recompiled every time * update MESSAGE_TARGET_QUERY string to filter study-child pairs on age range eligibility, rather than checking in python post-query: this greatly reduces the number of candidate child-study pairs that the query returns and that the python needs to loop over and check * update test for the number of potential targets (reduced number because of inclusion of age range filtering in SQL query), add assertions for specific child-study targets and for children filtered out from targets due to age range
…se (#1938) * optimize get_child_eligibility_for_study performance: run child in age range check first (pure python) to short-circuit majority of ineligible pairs without having to run DB queries (participation eligibility check) or criteria expression evaluation (eligibility check) * cache all of the distinct compiled expressions (keyed on the expression string) so that these do not need to be recompiled every time * update MESSAGE_TARGET_QUERY string to filter study-child pairs on age range eligibility, rather than checking in python post-query: this greatly reduces the number of candidate child-study pairs that the query returns and that the python needs to loop over and check * update test for the number of potential targets (reduced number because of inclusion of age range filtering in SQL query), add assertions for specific child-study targets and for children filtered out from targets due to age range * add jspsych study type to the check for previous study participation (exclude if child has completed the consent frame) * add tests for excluding child with existing jspsych study response from message targets and including if completed consent frame is false
|
becky-gilbert
marked this pull request as ready for review
September 17, 2026 05:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR moves the following changes into production:
JSPSYCH_LOCAL_PLUGINS(jsPsych local plugin overlay #1933) environment variable, which, when set to True, replaces the DB-defined published package URLs with local versions for chs-jspsych plugins.