UNLV-CS472-672 / 2024-S-GROUP3-Barbell

A workout-tracking app with a support website that does more than just track workouts. Cross platform in IOS and Android
4 stars 0 forks source link

231 backend mock data generation for demonstration #235

Closed BitsyBirb closed 5 months ago

BitsyBirb commented 5 months ago

What type of PR is this? (Check all that apply)

Description

What did you change? How did you change it? I essentially took Elliot's past script to generate large amounts of randomized data to seed our database and modified it to fit our current schema. That being said, the new script is called newGen.py and it can be found in packages/db/src/scripts/python and its generated .json files are stored in packages/db/src/new-gendata.

I kept the old mock-data as well just in case we'd like to use it for demonstration. Currently the script I updated can generate a lot of data, but it isn't particularly plausible. If I get the chance later tomorrow or Tuesday, I will manually update a lot of the data, especially in exercises, to make it seem more realistic. I can update the script as well but that'd take some more time which we likely don't have.

Tests

How was this tested?

[Optional] Screenshots

Just ran pnpm db:seed at the root and checked if my instance of the database had the new schema + data. It did. image

image

To manually test the script, run it on your machine locally (you might have to install the faker library) to see the generated jsons. You can seed faker differently to get unique results.

Documentation

Link to external documentation:

[Optional] Are there any post-deployment tasks we need to perform?

There is the major to-do of making the data more plausible. As I said, I will likely get to it when I have the chance after finishing my current frontend issue. Will most likely have to be done manually as auto-generating natural language is a bit difficult to say the least. Maybe ChatGPT can help here by having it generate many many unique workout descriptions, names, etc.