/muffin

Python Template Engine

Primary LanguagePythonOtherNOASSERTION

                  .d888 .d888d8b         
                 d88P" d88P" Y8P         
                 888   888               

88888b.d88b. 888 88888888888888888888888b. 888 "888 "88b888 888888 888 888888 "88b 888 888 888888 888888 888 888888 888 888 888 888Y88b 888888 888 888888 888 888 888 888 "Y88888888 888 888888 888

muffin Python project template wizard

Makes starting up new projects with bells and whistles a breeze!

What should a good python template engine have????

  • Should have a modern directory structure: /src and /tests for separated source and testing. /data, /temp, and /logs for managing all the data that will be pouring in.

  • Should have inpeccable documentation:

    • README.md for git
    • Sphinx docs ready to use, and a config file to make the setup really quick.
  • Git ready

    • .gitigore with the essentials ignored.
    • some all-around useful git-hooks
    • Really nice README.md
    • A LICENSE that we can choose from a list of the most popular.
  • Some AWESOME utilities included by default:

    • Sphinx documentation
    • Pytest
    • ipython
    • Konch, with some premade great defaults.
  • Should have SCARY virtual environment support

    • Create a custom virtual environment!
    • Includes
    • Choose from different Python versions
    • Choose different modules to include in the pip install
  • Should be FLEXIBLE!

    • The wizard lets you keep defaults saved so you can just "Enter" through the common ones.
    • The templates folder can be tweaked for your preference,
    • or make your own templates directory structure, it just has to start with 'template'
  • Should be like other AMAZING systems, like Django!

    • Yup, we have a manage.py - and it rocks.
    • Cut down on boring, mundane project maintenance, use manage.py fool!

usage:

$ python pystart

TODO

  • Setup the directory structure

  • /project/

  • /project/src

  • /project/tests

  • /project/data

  • /project/temp

  • /project/logs (still need this)

  • Write startup files:

  • init.py files for root, src, and tests to indicate packages.

  • initial README.md file.

  • .gitignore

  • Command line option to only create a README.md

  • Basic wizard to specify project info:

  • wizard: Project name

  • wizard: Author - Default in my settings

  • wizard: Purpose

  • wizard: Description

  • wizard: License: type

  • wizard: Ask for starting modules(Beautiful Soup, Scrapy, requests)

  • wizard: Ask for Python version(2.7, 3.4, 3.5, etc)(can we list the available ones???)

  • wixard: show available choices if user makes a mistake

  • Remember project defaults for wizard

  • Update defaults when new ones are input from wizard

  • Allow None for some wizard choices

  • Main.py: Create empty

  • Main.py: Module doc

  • Main.py: import logger

  • main.py: config file

  • Main.py: argparse

  • Main.py: main method, "hello project!"

  • Complete check of system requirements to run this script (and to have the ideal environment)

Sys libs

  • is git installed?
  • is virtualenv installed?
  • is python/python3 installed?

Pip libs

  • is pip installed?

  • is autoenv installed?

  • is konch installed?

  • is py.test installed?

  • is ['urllib3[secure]', 'requests[security]', installed for py2?

  • Setup virtualenv

  • Autoenv config file(.env)?

  • Setup.sh script that executes program installs

  • Setup.sh: update pip

  • Setup.sh: initialize git repo

  • Setup.sh: pip install basic packages(autoenv, konch, pytest)

  • Use Python 2(later option to use python3)

  • Option to use PyPy?

  • Option to use Anaconda?

Functional tests for addons

  • Functional test for Selenium

  • Functional test for Beautiful Soup

  • Functional test for requests

  • manage.py - Create a utility to make managing mundane tasks much easier

  • cleanup - clear out the temp, data directories

  • archive - archive the data directory into a gzip/bz, then clear it out.

  • new module(pop): Create Basic template for a new module and it's corresponding test.

  • freeze: create/regenerate requirements.txt for virtualenv

  • setup docs(sphinx)

  • CC-BY-SA 3.0 : http://creativecommons.org/licenses/by-sa/3.0/

  • argparse - debug option, verbose built in

Other modules to ask about: lxml, pillow,

How to check coverage, with pytest? Travis CI? PyPi? Attach githooks?