diff --git a/ci/conda_requirements.txt b/ci/conda_requirements.txt index 178e0cb60..8dca2d969 100644 --- a/ci/conda_requirements.txt +++ b/ci/conda_requirements.txt @@ -5,3 +5,4 @@ natsort pycryptodome pandas < 2.0.0 werkzeug < 3.0.0 +pip < 25.3 diff --git a/microsetta_private_api/db/patches/0148.sql b/microsetta_private_api/db/patches/0148.sql new file mode 100644 index 000000000..ddc49a033 --- /dev/null +++ b/microsetta_private_api/db/patches/0148.sql @@ -0,0 +1,79 @@ +-- This update to the consent documents serves three purposes: +-- 1) Update the contact information in all consent documents. +-- 2) Add the IRB Protocol number, version, and expiration to all of the consent documents. +-- 3) Fix an oustanding typo in the English versions +-- NOTE: With this patch, we're going to update our internal version number in the database to match the IRB protocol version. + +-- First, we'll create a new version of the documents that are a clone of the last version (v2, created in database patch 0147.sql) +INSERT INTO ag.consent_documents (consent_type, locale, date_time, consent_content, reconsent_required, account_id, version) + SELECT consent_type, locale, NOW(), consent_content, 'true', account_id, 53 + FROM ag.consent_documents + WHERE version = 2; + +-- Next, we'll replace the contact information. It appears there were multiple different sets of verbiage for each language, so we will need to run several different queries to catch all of them. +-- English version I +UPDATE ag.consent_documents + SET consent_content = REPLACE( + consent_content, + 'If you have questions or research-related problems, you may reach Rob Knight at 858-246-1184 or email our help account: microsetta@ucsd.edu.', + 'If you have questions or research-related problems, you may contact:' + ) + WHERE version = 53 AND locale = 'en_US'; + +-- English version II +UPDATE ag.consent_documents + SET consent_content = REPLACE( + consent_content, + 'If you have questions or research-related problems, you may reach us by emailing our help account microsetta@ucsd.edu or Rob Knight at 858-246-1184.', + 'If you have questions or research-related problems, you may contact:' + ) + WHERE version = 53 AND locale = 'en_US'; + +-- Spanish version I +UPDATE ag.consent_documents + SET consent_content = REPLACE( + consent_content, + 'Si tiene preguntas o problemas relacionados con la investigación, puede comunicarse con Rob Knight al 858-246-1184 o enviar un correo electrónico a nuestra cuenta de ayuda: microsetta@ucsd.edu.', + 'Si tiene alguna duda o problemas relacionados con la investigación, puede comunicarse con' + ) + WHERE version = 53 AND locale IN ('es_MX', 'es_ES'); + +-- Spanish version II +UPDATE ag.consent_documents + SET consent_content = REPLACE( + consent_content, + 'Si tiene alguna duda o problemas relacionados con la investigación, puede llamar a Rob Knight al 858-246-1184 o enviar un correo electrónico a nuestra cuenta de ayuda: microsetta@ucsd.edu.', + 'Si tiene alguna duda o problemas relacionados con la investigación, puede comunicarse con' + ) + WHERE version = 53 AND locale IN ('es_MX', 'es_ES'); + +-- Spanish version III +UPDATE ag.consent_documents + SET consent_content = REPLACE( + consent_content, + 'Si tiene alguna duda o problemas relacionados con la investigación, usted puede comunicarse con nosotros enviando un correo electrónico a nuestra cuenta de ayuda microsetta@ucsd.edu o llamando a Rob Knight al 858-246-1184.', + 'Si tiene alguna duda o problemas relacionados con la investigación, puede comunicarse con' + ) + WHERE version = 53 AND locale IN ('es_MX', 'es_ES'); + + +-- Then, we'll tack the IRB protocol number, version, and expiration on. We need to do this in two steps, one for each language we support. +-- English versions +UPDATE ag.consent_documents + SET consent_content = consent_content || '' + WHERE version = 53 AND locale = 'en_US'; + +-- Spanish versions +UPDATE ag.consent_documents + SET consent_content = consent_content || '' + WHERE version = 53 AND locale IN ('es_MX', 'es_ES'); + + +-- Lastly, we'll fix the outstanding typo in the English documents +UPDATE ag.consent_documents + SET consent_content = REPLACE( + consent_content, + 'You may contact UC San Diego Office of IRB Administration', + 'You may contact the UC San Diego Office of IRB Administration' + ) + WHERE version = 53 AND locale = 'en_US'; diff --git a/microsetta_private_api/util/tests/test_google_geocoding.py b/microsetta_private_api/util/tests/test_google_geocoding.py index 2e060031a..53953fd41 100644 --- a/microsetta_private_api/util/tests/test_google_geocoding.py +++ b/microsetta_private_api/util/tests/test_google_geocoding.py @@ -215,7 +215,7 @@ def test_geocode_address(self): obs_long = round(obs_long, 2) self.assertEqual(obs_lat, 32.88) - self.assertEqual(obs_long, -117.23) + self.assertEqual(obs_long, -117.24) self.assertEqual(obs_state, "CA") self.assertEqual(obs_country, "US") self.assertEqual(obs_error, False)