-
-
Notifications
You must be signed in to change notification settings - Fork 919
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
Add books module #2310
Comments
Thank you for your feature proposal. We marked it as "waiting for user interest" for now to gather some feedback from our community:
We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements. We will start the implementation based on:
We do this because:
|
What about faker/src/modules/commerce/index.ts Lines 335 to 353 in 24415ee
Would that get relocated here as well? |
What is the status of this request? I could use something like this now |
This is currently waiting for user intrest so unfortunately this wont make it into the code in the next few months. Could you please also detail which properties you need for the books? |
It's waiting for 10 upvotes Where faker doesn't provide the exact data you need you can generally get a good result by just using faker.helpers.arrayElement with an array of static data. Faker-Ruby has a book module so you could grab the data from there https://github.com/faker-ruby/faker/blob/main/lib/locales/en/book.yml |
Team Decision This issue has gathered enough user interest to be considered for inclusion. |
@inkedtree are you still interested in working on this? I would like to work on this as well :) |
Hi @cieslarmichal, |
Ok thanks, I will wait then, I would appreciate if you ping me when I can start working on this :) |
While the implementation cannot start right now, you could already make suggestions on how you want each method to behave and which methods to have exactly. Like will book.title return a random elememt from a fixed list such as |
I am actually developing book application so I know which methods could be useful, I would add methods as follows (open for more suggestions):
|
Generally sounds good to me! Note Id probably remove translator if it's just a random person name, doesn't add much (and if translator, why not illustrator, reviewer, etc) Also not sure releaseYear is needed, too similar to Any methods we choose not to add to books for the MVP because there are too similar methods in other modules could still be referenced via see also and the module introduction. Eg if "author()" only has real authors we can cross reference faker.person.fullName() for people who want fake authors. |
Sounds good :) can't wait to start working on this! |
Is this comming any time soon? :) |
I am ready to implement that, but we are waiting for version v9 to be done (major refactor) |
@xDivisionByZerox do you have any planned date for v9 release? |
Sorry for the late reply. We sadly dont have a fixed release date planed. We will put some more focus on this topic on thursdays, tho. |
Ok I will wait. |
@cieslarmichal In today's meeting we made a new announcement regarding v9 progress. This means that you can technically start with the implementation of the book module if you wish to do so. Please keep in mind that the module itself will not be included in the v9 release, but can be the first thing for v9.1. |
Hello, nice! I will start working on it this week 😄 |
'next' is perfectly fine. The v9 branch is the latest v9 release. In this case v9.0.0-alpha.1. |
Ok thanks :) |
I am starting to work on it, planning to add following methods to MVP:
I will also add a note that isbn can be generated with commerce module. |
created a PR with changes #2949 |
Just commenting here to get some more visibility Should author() return Shakespeare, William Or William Shakespeare |
I will probably go with William Shakespeare as it is more readable and natural in my opinion. |
Clear and concise description of the problem
Add a
faker.books
module which allows for generating random titles, genres and publishers for books.Suggested solution
We could add a
faker.books
module similar to the one provided by faker-ruby. The module could export the following methods:title
: returns a random book titlepublisher
: returns a random publishergenre
: returns a random genreauthor
: returns a random authorAlternative
I am not sure if
author
would be necessary since we already havefaker.person.fullName
.Additional context
If the feature is accepted, I would like to work on it.
The text was updated successfully, but these errors were encountered: