Open Diaoul opened 9 years ago
@Diaoul I like to treat me projects as Python packages and install them with pip. This was you can take advantage of the features available with setuptools. I've even gone so far as to setup devpi to run my own private Python package index.
That changes the layout of the project then, doesn't it?
For example, the alembic folder must be moved under the overolt
package and to leverage on setup.py test
you also need to move the tests
package too right?
Do you use the console_scripts
entry point in setuptools to run the manage.py from the command line?
@mattupstate: sorry for being pushy but I'd like to know how you do it because I think I'm doing it wrong. Thanks :cake:
Generally, I don't make migrations part of the package because migrating a database isn't always necessary when deploying and sometimes requires maintenance specific downtime and DBA level access control. However, in some cases I have made migrations part of the package and an entry point into Alembic to upgrade the database. There is a certain level of Python zen I appreciate in making the migrations as part of the package. But it isn't always necessary to make the package that "complete". Sometimes its just a matter of taste. Other times a matter of user experience.
This is a little out of the topic maybe but you don't speak about deployment. Do you use a fully-fledged setup.py and install it on the server from sdist or do you just git clone?
A sdist seems nicer but I feel like Flask applications don't really fit in them.
Thoughts?