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

New syntax for constraints #39

Closed
4 tasks done
lucapette opened this issue May 26, 2017 · 2 comments
Closed
4 tasks done

New syntax for constraints #39

lucapette opened this issue May 26, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@lucapette
Copy link
Owner

lucapette commented May 26, 2017

Based on a conversation we had on slack. @jorinvo proposed we change the way constrains/range (we should probably just call these "options" so that it's generic enough to work for different generators) this way:

$ fakedata user=enum,John..Joe..James age=int,1..100 # current syntax
$
$ 
$ fakedata user=enum:John,Joe,James age=int:1,100 # new syntax

I think it looks great and I'd proceed right away. The feature requires us to:

  • Change to the way we parse the data
  • Rename constraints to something better (Options maybe?)
  • Update all the integration/unit tests (as we change behavior, we break all the tests :))
  • Update all the examples in the README (which I'd like to test via integration tests at some point but that's a different conversation

It's a very exciting change as it leads to a much simpler (therefore better UI). I can take care of it unless any of you would like to give it a try.

@lucapette lucapette self-assigned this May 30, 2017
@lucapette
Copy link
Owner Author

Just started working on it! All the tests are failing 🎉

This was referenced May 30, 2017
@lucapette lucapette added this to the v1.0.0 milestone May 30, 2017
@lucapette
Copy link
Owner Author

Done in #48

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

1 participant