Commit 7bc9fcd2 authored by Yuanle Song's avatar Yuanle Song
Browse files

v0.14.0 multiple minor changes

- bugfix: add fabfile.py in render file list
- add web.upstart and use that in deb-scripts
- update python .gitignore list
- PEP8 now ignores E402 module level import not at top of file
- http.site and https.site now use proxy_pass instead of uwsgi_pass

  Until uwsgi integration problem is fixed, I have to use other wsgi server.

- set default python version to python 3.4 in setup.py

  many of my new projects use python3 instead of python2.7.
parent 27e84fb2
Loading
Loading
Loading
Loading
+28 −10
Original line number Diff line number Diff line
* COMMENT -*- mode: org -*-
#+Date: 2014-05-09
Time-stamp: <2016-09-06>
Time-stamp: <2016-09-08>
#+STARTUP: content
* current							      :entry:
** 
** 2016-09-08 integrate sanity-check
- in Makefile
 check: just-test
+sanity-check:
+	$(PYTHON) wechat_article_saver_daemon/sanity_check.py
 check-coding-style: bootstrap-dev

- add the template with a dumb check.

** 2016-09-08 support updating site file, deb scripts etc after project is generated.
- the domain in site file could change.
- the pkg name could change.
- whether to use uwsgi could change.

./utils/update_site_file.py --domain foo.emacsos.com --uwsgi
./utils/update_site_file.py --domain foo.emacsos.com --http

** 2016-09-06 support adding celery to existing project.
- This will add a celeryconfig module and a tasks module.
  see examples in
@@ -21,6 +38,16 @@ see example ~/.pylintrc
** 2016-07-27 package name should not have -, auto convert it to _.
- package name is part of module name, - is not valid there.

** 2016-06-30 update it for use with default debian config. (non-yy env)
- update nginx config file
- add support for systemd
- create /data if it doesn't exist. auto use sudo to create the dir if it
  doesn't exist.

  make sure it works on fresh system. use a VM to test it.
** 2014-05-09 add sphinx support
* later								      :entry:
* done								      :entry:
** DONE 2016-06-30 make "lein new python bar" work, without --to-dir .
chmod -R +x utils/

@@ -42,13 +69,6 @@ chmod -R +x utils/
  I think it could be nil when --to-dir is not used.
  yes. it's null when user doesn't use --to-dir option.

** 2016-06-30 update it for use with default debian config. (non-yy env)
- update nginx config file
- add support for systemd
- create /data if it doesn't exist. auto use sudo to create the dir if it
  doesn't exist.

  make sure it works on fresh system. use a VM to test it.
** DONE 2016-06-30 use python3 in venv by default.
- make old code work with python3.
  - add future imports
@@ -124,5 +144,3 @@ chmod -R +x utils/
- it requires me listing all template and plain files. this is bad. should
  just generate the file list on the fly.
** 2014-05-09 add sphinx support
* later								      :entry:
+1 −1
Original line number Diff line number Diff line
(defproject python/lein-template "0.13.0"
(defproject python/lein-template "0.14.0"
  :description "lein template for a python project"
  :repositories [["snapshots"
                  {:url "http://devserv.game.yy.com/nexus/content/repositories/snapshots"
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
                      (.format (new SimpleDateFormat "yyyy-MM-dd")
                               (.getTime cal)))}
        template-files ["Makefile"
                        "fabfile.py"
                        "requirements.txt"
                        "requirements-dev.txt"
                        "setup.py"
@@ -49,6 +50,7 @@
                        "conf/logrotate.conf"
                        "conf/uwsgi.ini"
                        "conf/uwsgi.upstart"
                        "conf/web.upstart"
                        "git-hooks/post-commit"
                        "git-hooks/post-merge"
                        "git-hooks/pre-commit"
+2 −0
Original line number Diff line number Diff line
# BEGIN regular python ignore list
.venv/
bin/
include/
lib/python2.7/
@@ -15,4 +16,5 @@ __pycache__/
.tox
*.deb
doc/_build/
TAGS
# ENG regular python ignore list
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ PYTHONPATH := .
VENV := .venv
PYTEST := env PYTHONPATH=$(PYTHONPATH) PYTEST=1 $(VENV)/bin/py.test
PYLINT := env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/pylint --disable=I0011 --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}"
PEP8 := env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/pep8 --repeat --ignore=E202,E501
PEP8 := env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/pep8 --repeat --ignore=E202,E501,E402
PYTHON := env PYTHONPATH=$(PYTHONPATH) $(VENV)/bin/python
PIP := $(VENV)/bin/pip

Loading