-
Notifications
You must be signed in to change notification settings - Fork 62
GPII-3138: Update snapsets in data base #626
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
Changes from 49 commits
74dde50
ee30bb2
1c0f38a
b5dd8c0
f7068c0
e2f4e63
554ae82
f145f66
8f54a33
67f7bd6
c48d7ae
f029df2
5f2f1b5
750cdf3
0e41600
22d6605
574236f
d6547d3
8520379
ef1e721
0181c42
9bb64af
a4541ba
e026465
f4c41a6
6723b6e
2e0bb55
fae02da
831a762
582b3d7
c401c97
54defe7
58fdde7
0862af6
79abd7d
2b8cbeb
59f03a8
6ee716e
9a090a1
a9eec11
a4cf452
63c1a11
7ce1b84
afc6888
75456ba
230c8f0
23b27e4
33f1741
2c48ca5
d9ac25e
ebde69d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,12 +98,22 @@ have set the `NODE_ENV` variable. | |
|
|
||
| ### Convert Preferences Data | ||
|
|
||
| GPII has 2 set of preferences JSON5 data files: | ||
|
|
||
| * The preferences files for running GPII are located at %gpii-universal/testData/preferences | ||
| * The preferences files for running node tests are located at %gpii-universal/tests/data/preferences | ||
|
|
||
| When any preferences file in either one of these 2 directories are modified, running `npm run postinstall` will generate | ||
| GPII has two sets of preferences JSON5 data files, located at `%gpii-universal/testData/preferences` and `%gpii-universal/tests/data/preferences`: | ||
|
|
||
| * The preferences files for running GPII and for integration tests are located at | ||
| `%gpii-universal/testData/preferences`. These files are converted into two types of preferences safes and GPII keys: | ||
| * They are converted into `snapset` preferences safes and GPII keys and placed into the | ||
| `%gpii-universal/build/dbData/snapset/` folder. These are used to update the snapsets in CouchDB when GPII is | ||
| run in a production or staging configuration. | ||
| * They are also converted into `user` preferences safes and GPII keys and placed into the | ||
| `%gpii-universal/build/dbData/user/` folder. These are used with PouchDB when GPII runs in a development | ||
|
||
| configuration or when running GPII integration tests. | ||
| * The preferences files for running node tests are located at `%gpii-universal/tests/data/preferences`. These files | ||
| are converted into preferences safes and GPII keys: | ||
| * They are converted into `user` preferences safes and GPII keys and placed into the | ||
| `%gpii-universal/build/tests/dbData/user` folder. These are used during testing with PouchDB. | ||
|
|
||
| When any preferences file in either one of these two directories are modified, running `npm run postinstall` will generate | ||
| gpiiKeys.json and prefsSafes.json, the files that are in the structure to be loaded into PouchDB/CouchDB, based off | ||
| these directories. This step is needed for the modification to be applied to GPII. | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,6 @@ | |
| "test:vagrantProduction": "vagrant ssh -c 'cd /home/vagrant/sync/universal; DISPLAY=:0; ./scripts/vagrantCloudBasedContainers.sh'", | ||
| "posttest": "node node_modules/nyc/bin/nyc.js report -r text-summary -r html --report-dir reports --temp-directory coverage", | ||
| "start": "node gpii.js", | ||
| "postinstall": "node scripts/browserifyTestDependency.js && node scripts/convertPrefs.js testData/preferences/ build/dbData/ && node scripts/convertPrefs.js tests/data/preferences/ build/tests/dbData/" | ||
| "postinstall": "node scripts/browserifyTestDependency.js && node scripts/convertPrefs.js testData/preferences/ build/dbData/snapset/ snapset && node scripts/convertPrefs.js testData/preferences/ build/dbData/user/ user && node scripts/convertPrefs.js tests/data/preferences/ build/tests/dbData/ user" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you update this README section to add which set of data are converted to what prefs type and why? Thanks.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, but I'm not sure about everything. Here's what I know and where I'm unclear:
The main problem is number 2, but am I right about everything else?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Number 2 is also for running integration tests with PouchDB. Both data sets from |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading "when GPII is run in a production or staging configuration" reminds me the use of config files in
gpii/configsdirectory. All those configs use pouchDB at the backend.Probably adjust this sentence to express datasets in this folder are:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cindyli I've reworked the whole section to:
testData\dbData\README.txt, and