shopcube
shopcube copied to clipboard
FEAT: separate the api and template part
In order to make the new
command work properly (and fix the critical bug #481), we need to break the project into two parts:
- cookiecutter for shopyo (something similar to https://github.com/rehmanis/cookiecutter-python)
- the main shopyo library with all the api, cli etc
For 1.
, we can use the cookiecutter
library and easily wrap shopyo new
command to use it. Some advantages of this approach:
- allows us to do more powerful things like for example, allows user to chose between
mkdocs
vssphinx
, and chose between project structures (ad-hoc layout vs src-layout), as it allows us to add hooks (scripts) that run after or before project generation etc. See for example https://github.com/rehmanis/cookiecutter-python/blob/master/hooks/post_gen_project.py - keep the scaffolding(boiler-plate flask app) part completely separate
- allow user to select additional modules etc and keep all avaliable modules in one place rather than separate them in different repos like shopyo cube (for ecommerce )
- easy to write tests (using maybe
pytest-cookies
)
Now the question is whether we want to restructure this repo (shopyo) into cookiecutter and make a new repo with api part or restrucutre this repo with only api part and make a new repo a cookiecutter with all modules etc.
@rehmanis since we are going on the drawing board, we might want to consider having migrations with the Peewee ORM also etc. Bring in flexibility i mean
@Abdur-rahmaanJ Yes but the idea is to start very simple i.e. the new command should work just as it is now without any options (like to select doc type, database type, modules etc) but using the cookiecutter.
So which approach are we taking? Also we need to create a repo-group and put all repos under it.