You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Populate BB2 Django models with large number of records
219
219
220
220
Run migrate.sh will in turn execute a django command among other things:
221
-
221
+
```
222
222
python manage.py create_test_user_and_application
223
+
```
223
224
224
225
this will populate BB2 Django models User, UserProfile, Application, Crosswalk, AccessToken with:
225
226
226
-
one user 'fred', one app 'TestApp', one access token, and one corresponding crosswalk entry, which can be used for minimum test, for local tests that require large number of users, applications, etc. there
227
-
is a command to help with that:
228
-
227
+
one user 'fred', one app 'TestApp', one access token, and one corresponding crosswalk entry, which can be used for minimum test, for local tests that require large number of users, applications, etc.
which by default, generates 150 dev users, each having 1-5 apps, and 100 bene users. To change the number of users and apps generated, use the `-d`, `-a` and `-b` flags:
234
+
```
235
+
python manage.py create_test_users_and_applications_batch -d <number of dev users> -b <number of bene users> -a <maximum number of apps per dev user>
236
+
```
237
+
These are also listed when specifying `--help` on the command.
230
238
231
-
which generates 50 dev users, each has 1-5 apps, and 30k bene users which have following relations:
239
+
The generated users and appshave the following relations:
232
240
233
241
1. dev users and apps created date are spread over past 700 days randomly
234
242
2. each bene sign up (grant access) with 1-3 apps by aproximately: 70% 1 app, 25% 2 apps, 5% 3 apps and
235
243
3. among these sign up (access token grants): 80% with demographic scopes, 20% deny demo access
236
244
4. benes sign up dates are randomized and set to a date approximately 10 days after apps created date
237
245
5. apps' client type, grant type, opt in/out of demographic info access are also randomly generated per a percent distribution
238
246
239
-
the data generation command assumes that the 30k synthetic beneficiary records in rif files are present
247
+
The data generation command assumes that the number of synthetic beneficiary records desired are in the rif files
240
248
under BB2 local repo base directory:
241
249
242
250
<bb2_local_repo_base>/synthetic-data/
243
251
244
-
for detailed info about the synthetic data and how to fetch them, refer to: https://github.com/CMSgov/beneficiary-fhir-data/blob/master/apps/bfd-model/bfd-model-rif-samples/dev/design-sample-data-sets.md
245
252
246
253
## Running tests from your host
247
254
@@ -282,7 +289,6 @@ convertion using the following command:
282
289
283
290
```
284
291
git config --global core.autocrlf true
285
-
286
292
```
287
293
288
294
in case, with above git core.autocrlf setting, some steps e.g. migrate.sh still chokes (file not found etc.),
0 commit comments