inputlogic / django-api-starter

Boilerplate for starting Django DRF / API projects
2 stars 0 forks source link

Fix and clarify requirements issues #8

Closed weslord closed 5 years ago

weslord commented 5 years ago

Calling ./manage.py test on a fresh install errors out, mixer not found.

weslord commented 5 years ago

Faker 1.0 was a dependency of Factory Boy, which does not appear to be used anywhere in this starter, so I'll remove it. The existing test cases use mixer instead, which depends on Faker 0.9 specifically.

I think Gavin's preference is to use Factory Boy over mixer (or maybe the other way around? @geekforbrains?), but until/unless we re-write the default tests to use it, it's easier to update the requirements to get the starter working out-of-the-box

weslord commented 5 years ago

And while we're discussing requirements, is it worth having requirements.init.txt and requirements.txt in the repo? Is there any case where we wouldn't want to generate requirements.txt from requirements.init.txt?

If so, please enlighten, and I can un-delete requirement.txt and add an explanation to the README.

geekforbrains commented 5 years ago

@weslord We use Factory Boy, not Mixer. There was some preference to Mixer for a short period, however we will not be using it moving forward.

The requirements.init.txt file is meant for installing updated packages (there's no versions in that file) easily. The requirements.txt file is meant as the "last known stable packages". Upon starting a project, I'll typically try setting up with updated packages (init file) to ensure we're using the latest packages. If the project runs without issue, I'll update the requirements.txt file and update the repo. If not, I'll continue with the last-working requirements file. Hopefully that makes sense :)

weslord commented 5 years ago

Makes sense for requirements/init, I'll add that to the docs.

weslord commented 5 years ago

I've removed the one line of code that depended on Mixer. Fresh install should now pass all tests.