ets-labs / python-domain-models

Domain models framework for Python projects
BSD 3-Clause "New" or "Revised" License
22 stars 4 forks source link

#16: Possibility to mark filed as required. #18

Closed boonya closed 8 years ago

boonya commented 8 years ago

Issue #16

boonya commented 8 years ago

Dude, seriously, I have no idea what does this error mean https://travis-ci.org/ets-labs/domain_models/jobs/104227992#L121

rmk135 commented 8 years ago

@boonya, great job! Thanks!

One thing here here that would be nice to add - add required=False argument for fields.Model and fields.Collection initializers and pass it to the parent initializer call (like it is done for default argument in these fields).

I didn't use **kwargs for the child fields that have overridden initializer and retained default arg obviously defined, because of making easier IDE introspection and autosuggestion when someone will define a field (**kwargs - is easier to maintain, but worse for the end-user).

rmk135 commented 8 years ago

About the tests failing on 3.2 - it's a travis problem. I checked on our other project - situation is the same. So, no worries.

boonya commented 8 years ago

@rmk135, like this one? https://github.com/ets-labs/domain_models/commit/a6626095e6c6a8ab6ba21c864aee4a3622d23148

boonya commented 8 years ago

BTW, I have added Travis CI & Coveralls bages into README

rmk135 commented 8 years ago

Yeah, like this! Thanks!

rmk135 commented 8 years ago

Regarding the badges - looks good!

I think that will make it like there https://github.com/ets-labs/dependency_injector/blob/master/README.rst in future.

boonya commented 8 years ago

Of course. In future it will be. I think we will add much more bages ;)

boonya commented 8 years ago

I've added more badges ;) https://github.com/ets-labs/domain_models/commit/2e84f1eb1cb8964409739ac2431c3b03adb02ef7