Skip to content
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

Generators to add/remove #51

Closed
lucapette opened this issue Jun 27, 2017 · 4 comments
Closed

Generators to add/remove #51

lucapette opened this issue Jun 27, 2017 · 4 comments
Labels
Milestone

Comments

@lucapette
Copy link
Owner

So far we never had a conversation about which generators make sense for version 1.0.0 and while working on #50 I realised it's a good time to change that. Right now most of what we did is either inherited from phony or imported (as an example) from corpora. In practise, we have the following generators:

animal            animal breed
animal.cat        random cat breed
color             one word color
country           Full country name
country.code      2-digit country code
date              random date in the format YYYY-MM-DD. By default, it generates dates in the last year
domain            domain
domain.tld        valid TLD name from https://data.iana.org/TLD/tlds-alpha-by-domain.txt
double            double number
email             email
emoji             emoji from https://github.com/dariusk/corpora/blob/master/data/words/emojis.json
enum              value from an enum. By default, the enum is foo,bar,baz. It accepts a list of comma-separated values
event.action      clicked|purchased|viewed|watched
file              random value from a file. It accepts a file path. It can be either relative or absolute. The file must contain a value per line
http.method       DELETE|GET|HEAD|OPTION|PATCH|POST|PUT
int               positive integer between 1 and 1000
ipv4              ipv4
ipv6              ipv6
latitude          latitude
longitude         longitude
mac.address       mac address
name              name.first + " " + name.last
name.first        capitalized first name
name.last         capitalized last name
noun              noun from https://github.com/dariusk/corpora/blob/master/data/words/nouns.json
product.category  Beauty|Games|Movies|Tools|..
product.name      invented product name
state             Full US state name
state.code        2-digit US state name
timezone          tz in the form Area/City
username          username using the pattern \w+

I would like to remove the following:

product.category
product.name

and add:

animal.dog
sentence https://github.com/dariusk/corpora/blob/master/data/words/harvard_sentences.json
industry https://github.com/dariusk/corpora/blob/master/data/corporations/industries.json
occupation https://github.com/dariusk/corpora/blob/master/data/humans/occupations.json

At first, I thought we should remove more (and commented in #44 about that) but looking at the data we can import from corpora I realise it's probably nicer if people can choose what to generate even more granularly.

@lucapette lucapette added this to the v1.0.0 milestone Jun 27, 2017
@jorinvo
Copy link
Contributor

jorinvo commented Jun 28, 2017

Since nouns are already in there adding adjectives and verbs would also be nice:
https://github.com/dariusk/corpora/blob/master/data/words/adjs.json
https://github.com/dariusk/corpora/blob/master/data/words/verbs.json

Also fun, but probably less useful, would be to have this list of programming languages:
https://github.com/dariusk/corpora/blob/master/data/technology/programming_languages.json

@lucapette
Copy link
Owner Author

@jorinvo I like that too. So I'll add them to the list. I'm assuming you're fine with what I'd like to remove? If so I'll go ahead and take care of this

@jorinvo
Copy link
Contributor

jorinvo commented Jun 28, 2017

yes, sounds good :)

@lucapette
Copy link
Owner Author

@jorinvo I couldn't add verbs and programming languages with the import code we have as the JSON doesn't follow the convention of the rest of the repository (maybe we should open an issue on the project and discuss that. Having a convention there helps a lot with automation) but since they're addition I think we can add them even when 1.0.0 is already out.

The changes are in #52

lucapette added a commit that referenced this issue Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants