pumpkinseed / fakeit Goto Github PK
View Code? Open in Web Editor NEWFake data generator library with 130+ functions written in Rust
License: MIT License
Fake data generator library with 130+ functions written in Rust
License: MIT License
I'm receiving the following panic when I'm calling fakeit::datetime::date_range
.
You can see the minimum (date_birth_min
) and maximum (date_birth_max
) values which I'm passing into the function.
date_birth_min = 1910-08-27T22:57:50.591270Z
date_birth_max = 1999-05-08T22:57:50.591310Z
thread 'tokio-runtime-worker' panicked at 'invalid or out-of-range datetime', src/libcore/option.rs:1185:5
stack backtrace:
0: std::io::Read::read_exact
1: core::fmt::ArgumentV1::show_usize
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
6: std::panicking::continue_panic_fmt
7: std::panicking::try::do_call
8: std::thread::local::fast::Key<T>::try_initialize
9: std::thread::local::fast::Key<T>::try_initialize
10: core::option::Option<T>::expect
at /private/tmp/rust-20191221-83947-1gnlhtt/rustc-1.40.0-src/src/libcore/option.rs:345
11: chrono::naive::datetime::NaiveDateTime::from_timestamp
at /Users/nathansculli/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.10/src/naive/datetime.rs:110
12: fakeit::datetime::date_range
at /Users/nathansculli/.cargo/registry/src/github.com-1ecc6299db9ec823/fakeit-1.0.0/src/datetime.rs:66
Use of 2018 edition of Rust instead of 2015.
Reported form Rust's community discord by @Kixiron
The password generator can't rely on seconds when generating new passwords.
Reported form Rust's community discord by @Plecra
Reported from Reddit.
A minor typo in the README:
In the examples for user_agent
you have use fakeit::unique;
but you should have use fakeit::user_agent;
The current rand crate is super slow. It takes 400 microsec to generate a random number. Write something which is faster.
There is a missing functionality in payment.rs.
"hehe" - quote from the review
pub fn bool() -> bool {
if misc::random::<i64>(0, 1) == 1 {
return true;
}
false
}
Reported form Rust's community discord by @Plecra
https://github.com/PumpkinSeed/fakeit/blob/master/src/misc.rs#L78 has a problem with 0,5, it has more letters in it.
Reported form Rust's community discord by @Plecra
Compare the rand::rngs::SmallRng with the current random package and measure the differences.
Reported form Rust's community discord by @Plecra
Repeatable fake data is very important for testing use cases:
implementation:
At minimum, creating a local FakeIt
as such, should be possible:
FakeIt::new(2314907).word();
Ideally you would also be able to set a global seed for ergonomics, so you do not have to create a FakeIt
instance.
Add all of the possible tags to the resolve_tag function in generator.rs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.