documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Example data in developer environment

Open zacharyzollman opened this issue 4 years ago • 4 comments

hi! I was hoping to tweak author and/or book pages in response to some URL ideas (like in BookWyrm issue 1585). I set up the developer environment then concluded that there aren't any preset book or author pages and that the only way to add this information is via an authenticated user who has at least editor-level permissions. It seems like this would require setting up email verification. If I just want to see a representative book page, is there a recommended method for adding an example book (with an author) and/or user? If so, it occurred to me that this could be included in the documentation, perhaps in the permissions or developer environment pages. I apologize if this has been addressed elsewhere. Thanks!

zacharyzollman avatar Dec 17 '21 00:12 zacharyzollman

Yes! This is a very good point. There's another issue somewhere about improving the setup process so that you don't need to have email working as well, which is related to this.

mouse-reeve avatar Dec 17 '21 01:12 mouse-reeve

Oh ok, I think that might be BookWyrm issue 1665

zacharyzollman avatar Dec 17 '21 03:12 zacharyzollman

I think that this maybe should be part of some dev-setup script that could add a book and author + maybe some status posts as mock-data directly into the db? I don't have time to check right now, but shouldn't most of this stuff already exist as part of testing suites, @mouse-reeve ? If so could we just break it out as mock data and have it shared across dev + testing environments?

seedlingattempt avatar Dec 17 '21 13:12 seedlingattempt

I've been creating the test data ad-hoc in the tests, it would probably have been wiser to write a single script that generates test data, but at this point it would be quite an endeavor to refactor the tests.

But it wouldn't be hard to add a script that adds example data to dev.

mouse-reeve avatar Dec 17 '21 14:12 mouse-reeve