diff --git a/.gitignore b/.gitignore index e04714ba80e58033865bb45e4b9152ad64af7a67..3978fb553540542d7f081976a65609fec06d19df 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ pom.xml.asc *.class /.lein-* /.nrepl-port +foo-bar/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..e271f31dc6d9f636f1ad3743c2d3414fb6f8d71b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: clojure +install: + - lein install +script: + - lein new python foo + - cd foo && make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..b5d24a514ed3f45568226d3e42c124a0e00078bd --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +DEMO_PROJECT_NAME := foo-bar + +default: +test: + lein install + rm -rf $(DEMO_PROJECT_NAME) + lein new python $(DEMO_PROJECT_NAME) + cd $(DEMO_PROJECT_NAME) && make test + rm -rf $(DEMO_PROJECT_NAME) +.PHONY: default test diff --git a/operational b/operational index 1bdf0f1dd8e49b2236a6cc1b24ea5f5679d4338e..7ff5f14706a307db5c4f241b9ef3d6d24030a4b9 100644 --- a/operational +++ b/operational @@ -1,6 +1,6 @@ * COMMENT -*- mode: org -*- #+Date: 2014-05-09 -Time-stamp: <2019-02-27> +Time-stamp: <2019-02-28> #+STARTUP: content * notes :entry: ** 2018-05-02 support test, build and deploy in gocd @@ -57,9 +57,59 @@ Time-stamp: <2019-02-27> virtualenv-$VERSION/LICENSE.txt - update file list in ./src/leiningen/new/python.clj TODO update the code to auto include all files in utils/virtualenv-* dir. +* later :entry: +** 2019-02-28 about the two step CD, should I make it 3 step build? +1. test +2. build production docker image +3. on user approve, deploy to production. + +currently 1 and 2 are run in make ci-build. +check the disk space usage. +sometimes, trivial doc change doesn't require a docker build. +sometimes, version change doesn't require a docker build because of new +feature is still WIP and I won't deploy it. + +- check the disk space usage. + base stretch slim is 55MiB. + app image is additional 55MiB. + the apt-get step 34MiB, unpack deb 21MiB. + + seems reasonable. Could save 34MiB by including python3, libpq in the base + image. + +- does kubernetes remove old images? yes. + + The default is when disk space usage is over 85%, it will clean image until + it hits 80%. + https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/ + +- 2019-02-28 you can config blacklist in add/edit material. + https://docs.gocd.org/current/configuration/admin_add_material.html#blacklist + + https://docs.gocd.org/current/configuration/configuration_reference.html#ignore + + Often you do want to specify a set of files that GoCD should ignore when it + checks for changes. Repository changesets which contain only these files + will not automatically trigger a pipeline. These are detailed in the ignore + section of the configuration reference. + + ignore for this project: + #+BEGIN_SRC conf + .gitignore,LICENSE,README.md,operational,src/leiningen/new/python/README.rst,src/leiningen/new/python/README-dev.rst,src/leiningen/new/python/gitignore + #+END_SRC * current :entry: ** +** 2019-02-28 add gocd support. +// was add trivis-ci support. +- does trivis-ci send email when build failed? +- just create new project on python2.7, python3.5, pypy env. + then run "make test" +- trivis-ci only support github now. + GitLab integration · Issue #5931 · travis-ci/travis-ci · GitHub + https://github.com/travis-ci/travis-ci/issues/5931 +- maybe add gocd support for it instead. + ** 2019-02-24 fix :url in project.clj create a blog post about this template. ** 2016-09-08 support updating site file, deb scripts etc after project is generated. @@ -92,7 +142,7 @@ see example ~/.pylintrc make sure it works on fresh system. use a VM to test it. ** 2014-05-09 add sphinx support -* later :entry: + * done :entry: ** 2019-02-24 drop :repositories from project.clj ** 2019-02-27 another problem on new created project. diff --git a/project.clj b/project.clj index 067daa11477f6502bec94a2267b69e3382a24935..fb6d0ea55090db181323eafbbfd5dacd96dac4bb 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject python/lein-template "1.5.1" +(defproject python/lein-template "1.5.2" :description "lein template for a python project" :url "https://blog.emacsos.com/python-project-template" :license {:name "Eclipse Public License" diff --git a/src/leiningen/new/python/requirements-dev.txt b/src/leiningen/new/python/requirements-dev.txt index 72ec85d031e6890919b72f3060f10dc9a19202fd..a6dbebd0054f7458e38f7470b87a97ec1d1b8b7a 100644 --- a/src/leiningen/new/python/requirements-dev.txt +++ b/src/leiningen/new/python/requirements-dev.txt @@ -1,3 +1,3 @@ -pytest==3.5.1 -pylint==1.8.4 -pycodestyle==2.4.0 +pytest==4.2.0 +pylint==1.9.4 +pycodestyle==2.5.0 diff --git a/src/leiningen/new/python/requirements.txt b/src/leiningen/new/python/requirements.txt index 28bbb2f7856218798df8b8ba29264b3dae677362..f978f93b619a7be3d782c31cf768b625dd68f7e9 100644 --- a/src/leiningen/new/python/requirements.txt +++ b/src/leiningen/new/python/requirements.txt @@ -1,3 +1,3 @@ -wells==1.4.0 -# six==1.10.0 +wells==1.4.1 +# six==1.12.0 # raven==6.0.0