Skip to content

Commit

Permalink
Use our Thor infrastructure for loading data (#966)
Browse files Browse the repository at this point in the history
* move data over to sample-data in thor
  • Loading branch information
epugh committed Feb 28, 2024
1 parent 7806c1c commit 803387c
Show file tree
Hide file tree
Showing 7 changed files with 587 additions and 463 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bin/setup_docker
If you want to create some cases that have 100's and 1000's of queries, then do:

```
bin/docker r bin/rake db:seed:large_cases
bin/docker r bundle exec thor sample_data:large_data
```

This is useful for stress testing Quepid! Especially the front end application!
Expand Down Expand Up @@ -230,6 +230,18 @@ bin/docker r bin/rake db:seed:large_cases

You will have two users, `quepid+100sOfQueries@o19s.com` and `quepid+1000sOfQueries@o19s.com` to test with.

### Notebook Testing

If you want to test the Jupyterlite notebooks, or work with a "real" case and book, then run

```
bin/docker r bundle exec thor sample_data:haystack_party
```

You will have lots of user data from the Haystack rating party book and case to work with. This data is source from the public case https://app.quepid.com/case/6789/try/12?sort=default and https://app.quepid.com/books/25



## IV. Debugging

### Debugging Ruby
Expand Down Expand Up @@ -542,7 +554,7 @@ heroku restart -a quepid-staging

## Seed Data

The following accounts are created through the seeds. They all follow the following format:
The following accounts are created through the `bin/setup_docker` process. They all follow the following format:

```
email: quepid+[type]@o19s.com
Expand Down
2 changes: 1 addition & 1 deletion bin/setup_docker
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ Dir.chdir APP_ROOT do
system "bin/docker r bin/rake db:migrate"

puts "\n== Setting up Seed Data for Development =="
system "bin/docker r bin/rake db:seed:sample_users"
system "bin/docker r bundle exec thor sample_data:sample_data"
end
3 changes: 3 additions & 0 deletions bin/setup_jupyterlite
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ Dir.chdir APP_ROOT do
puts "\n== Downloading and extracting Jupyter Lite Build =="
system "bin/docker r bash -c 'rm -rf /srv/app/public/notebooks && wget -qO- #{JUPYTER_BUILD_DOWNLOAD_URL} | tar -C /srv/app/public -zxf -'"
end

puts "\n== Setting up Sample Data for Notebok Development =="
system "bin/docker r bundle exec thor sample_data:haystack_party"
Loading

0 comments on commit 803387c

Please sign in to comment.