Version 0.1.3 0.1.3
authorThierry Florac <tflorac@ulthar.net>
Tue, 26 Nov 2019 10:10:17 +0100
changeset 19 270c209df927
parent 18 d58d443e3683
child 20 027147fbd5b3
Version 0.1.3
.gitlab-ci.yml
.installed.cfg
buildout.cfg
docs/HISTORY.txt
docs/README.txt
setup.py
src/pyams_template.egg-info/PKG-INFO
--- a/.gitlab-ci.yml	Tue Nov 26 10:09:41 2019 +0100
+++ b/.gitlab-ci.yml	Tue Nov 26 10:10:17 2019 +0100
@@ -42,7 +42,7 @@
     script:
         - pip install pylint-exit anybadge
         - mkdir ./pylint
-        - ./bin/pylint src/pyams_utils/ | tee ./pylint/pylint.log || pylint-exit $?
+        - ./bin/pylint src/pyams_template/ | tee ./pylint/pylint.log || pylint-exit $?
         - PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' ./pylint/pylint.log)
         - anybadge --label=Pylint --file=./pylint/pylint.svg --value=$PYLINT_SCORE 2=red 4=orange 8=yellow 10=green
         - echo "Pylint score is $PYLINT_SCORE"
--- a/.installed.cfg	Tue Nov 26 10:09:41 2019 +0100
+++ b/.installed.cfg	Tue Nov 26 10:10:17 2019 +0100
@@ -1,21 +1,21 @@
 [buildout]
-installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs/lingua.egg-link
-	/home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs/pyams-template.egg-link
-parts = package i18n pyflakes test
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs/pyams-template.egg-link
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs/lingua.egg-link
+parts = package i18n pyflakes pylint test
 
 [package]
-__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pcreate
-	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pviews
-	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/prequest
-	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pserve
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pserve
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pshell
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pcreate
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/proutes
 	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pdistreport
-	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pshell
-	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/proutes
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/prequest
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pviews
 	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/ptweens
-__buildout_signature__ = zc.recipe.egg-d45dd885254d7f32ab7887f3b58424fb zc.buildout-d45dd885254d7f32ab7887f3b58424fb setuptools-d45dd885254d7f32ab7887f3b58424fb
+__buildout_signature__ = zc.recipe.egg-ae182f97b6919d1b51e262d281c45b3c zc.buildout-ae182f97b6919d1b51e262d281c45b3c setuptools-ae182f97b6919d1b51e262d281c45b3c
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
-_e = /var/local/env/pyams/eggs
+_e = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
 eggs = pyams_template
@@ -25,7 +25,7 @@
 	zope.configuration
 	zope.interface
 	zope.schema
-eggs-directory = /var/local/env/pyams/eggs
+eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 find-links = http://download.ztfy.org/eggs
 recipe = zc.recipe.egg
 
@@ -33,46 +33,66 @@
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pybabel
 	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/polint
 	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pot-create
-__buildout_signature__ = zc.recipe.egg-d45dd885254d7f32ab7887f3b58424fb zc.buildout-d45dd885254d7f32ab7887f3b58424fb setuptools-d45dd885254d7f32ab7887f3b58424fb
+__buildout_signature__ = zc.recipe.egg-ae182f97b6919d1b51e262d281c45b3c zc.buildout-ae182f97b6919d1b51e262d281c45b3c setuptools-ae182f97b6919d1b51e262d281c45b3c
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
-_e = /var/local/env/pyams/eggs
+_e = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
 eggs = babel
 	lingua
-eggs-directory = /var/local/env/pyams/eggs
+eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 find-links = http://download.ztfy.org/eggs
 recipe = zc.recipe.egg
 
 [pyflakes]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pyflakes
 	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pyflakes
-__buildout_signature__ = zc.recipe.egg-d45dd885254d7f32ab7887f3b58424fb zc.buildout-d45dd885254d7f32ab7887f3b58424fb setuptools-d45dd885254d7f32ab7887f3b58424fb
+__buildout_signature__ = zc.recipe.egg-ae182f97b6919d1b51e262d281c45b3c zc.buildout-ae182f97b6919d1b51e262d281c45b3c setuptools-ae182f97b6919d1b51e262d281c45b3c
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
-_e = /var/local/env/pyams/eggs
+_e = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
 eggs = pyflakes
-eggs-directory = /var/local/env/pyams/eggs
+eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 entry-points = pyflakes=pyflakes.scripts.pyflakes:main
 find-links = http://download.ztfy.org/eggs
 initialization = if not sys.argv[1:]: sys.argv[1:] = ["src"]
 recipe = zc.recipe.egg
 scripts = pyflakes
 
+[pylint]
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pylint
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/epylint
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/symilar
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pyreverse
+	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/pylint
+__buildout_signature__ = zc.recipe.egg-ae182f97b6919d1b51e262d281c45b3c zc.buildout-ae182f97b6919d1b51e262d281c45b3c setuptools-ae182f97b6919d1b51e262d281c45b3c
+_b = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
+_d = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
+_e = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
+arguments = sys.argv[1:]
+bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
+develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
+eggs = pyams_template
+	pylint
+eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
+entry-points = pylint=pylint.lint:Run
+find-links = http://download.ztfy.org/eggs
+recipe = zc.recipe.egg
+
 [test]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_template/parts/test
 	/home/tflorac/Dropbox/src/PyAMS/pyams_template/bin/test
-__buildout_signature__ = six-d45dd885254d7f32ab7887f3b58424fb zc.recipe.testrunner-d45dd885254d7f32ab7887f3b58424fb zc.recipe.egg-d45dd885254d7f32ab7887f3b58424fb zc.buildout-d45dd885254d7f32ab7887f3b58424fb zope.exceptions-d45dd885254d7f32ab7887f3b58424fb zope.interface-d45dd885254d7f32ab7887f3b58424fb zope.testrunner-d45dd885254d7f32ab7887f3b58424fb setuptools-d45dd885254d7f32ab7887f3b58424fb
+__buildout_signature__ = six-ae182f97b6919d1b51e262d281c45b3c zc.recipe.egg-ae182f97b6919d1b51e262d281c45b3c zc.recipe.testrunner-ae182f97b6919d1b51e262d281c45b3c zc.buildout-ae182f97b6919d1b51e262d281c45b3c zope.exceptions-ae182f97b6919d1b51e262d281c45b3c zope.interface-ae182f97b6919d1b51e262d281c45b3c zope.testrunner-ae182f97b6919d1b51e262d281c45b3c setuptools-ae182f97b6919d1b51e262d281c45b3c
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
-_e = /var/local/env/pyams/eggs
+_e = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/bin
 develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/develop-eggs
 eggs = pyams_template [test]
-eggs-directory = /var/local/env/pyams/eggs
+eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_template/eggs
 find-links = http://download.ztfy.org/eggs
 location = /home/tflorac/Dropbox/src/PyAMS/pyams_template/parts/test
 recipe = zc.recipe.testrunner
--- a/buildout.cfg	Tue Nov 26 10:09:41 2019 +0100
+++ b/buildout.cfg	Tue Nov 26 10:10:17 2019 +0100
@@ -1,22 +1,14 @@
 [buildout]
-eggs-directory = /var/local/env/pyams/eggs
+eggs-directory = eggs
 extends = http://download.ztfy.org/pyams/pyams-dev.cfg
 find-links = http://download.ztfy.org/eggs
-
 socket-timeout = 3
 
-#allow-picked-versions = false
+versions = versions
+allow-picked-versions = false
 show-picked-versions = true
 newest = false
 
-allow-hosts =
-    bitbucket.org
-    *.python.org
-    *.sourceforge.net
-    github.com
-
-versions = versions
-
 src = src
 develop =
     .
@@ -26,18 +18,13 @@
     package
     i18n
     pyflakes
+    pylint
     test
 
 [package]
 recipe = zc.recipe.egg
-eggs =
-    pyams_template
-    pyramid
-    pyramid_chameleon
-    zope.component
-    zope.configuration
-    zope.interface
-    zope.schema
+eggs = pyams_template
+interpreter = py
 
 [i18n]
 recipe = zc.recipe.egg
@@ -57,9 +44,17 @@
 on_install = true
 cmds = ${buildout:develop}/bin/${pyflakes:scripts}
 
+[pylint]
+recipe = zc.recipe.egg
+eggs =
+    pyams_template
+    pylint
+entry-points = pylint=pylint.lint:Run
+arguments = sys.argv[1:]
+
 [test]
 recipe = zc.recipe.testrunner
 eggs = pyams_template [test]
 
 [versions]
-pyams_template = 0.1.2
+pyams_template = 0.1.3
--- a/docs/HISTORY.txt	Tue Nov 26 10:09:41 2019 +0100
+++ b/docs/HISTORY.txt	Tue Nov 26 10:10:17 2019 +0100
@@ -1,6 +1,11 @@
 History
 =======
 
+0.1.3
+-----
+ - added Gitlab-CI integration
+ - code cleanup
+
 0.1.2
 -----
  - added "override_template" and "override_layout" functions to override class template or layout
--- a/docs/README.txt	Tue Nov 26 10:09:41 2019 +0100
+++ b/docs/README.txt	Tue Nov 26 10:10:17 2019 +0100
@@ -1,3 +1,38 @@
-===============
-PyAMS Templates
-===============
+======================
+PyAMS_template package
+======================
+
+.. contents::
+
+
+What is PyAMS
+=============
+
+PyAMS (Pyramid Application Management Suite) is a small suite of packages written for applications
+and content management with the Pyramid framework.
+
+**PyAMS** is actually mainly used to manage web sites through content management applications (CMS),
+see PyAMS_content package), but many features are generic and can be used inside any kind of web
+application.
+
+
+What is PyAMS_template ?
+========================
+
+PyAMS is using Chameleon internally as HTML templates engine.
+
+This package, which is essentially an adaptation of "z3c.template" package for Pyramid, allows to
+separate the definition of a view and of it's template; this template selection can actually be
+based on the view but also on the request layer (see "PyAMS_skin" package to get more information
+about layers).
+
+PyAMS_template package provides a "template_config" decorator, which allows you to define a template
+for a given view, and a "layout_config" decorator, which allows to define a "layout" template;
+layout templates are particularly useful when using "pagelets", which are defined into another
+package (see PyAMS_pagelet).
+
+You can also override a template definition for a given view, without creating a new view class,
+just by using the "override_template" or "override_layout" functions.
+
+View and layout templates can also be declared using ZCML instead of Python code, by using the
+<template /> and <layout /> directives.
--- a/setup.py	Tue Nov 26 10:09:41 2019 +0100
+++ b/setup.py	Tue Nov 26 10:10:17 2019 +0100
@@ -25,7 +25,7 @@
 README = os.path.join(DOCS, 'README.txt')
 HISTORY = os.path.join(DOCS, 'HISTORY.txt')
 
-version = '0.1.2'
+version = '0.1.3'
 long_description = open(README).read() + '\n\n' + open(HISTORY).read()
 
 tests_require = []
@@ -61,6 +61,7 @@
           # -*- Extra requirements: -*-
           'pyramid',
           'pyramid_chameleon',
+          'venusian',
           'zope.component',
           'zope.configuration',
           'zope.interface',
--- a/src/pyams_template.egg-info/PKG-INFO	Tue Nov 26 10:09:41 2019 +0100
+++ b/src/pyams_template.egg-info/PKG-INFO	Tue Nov 26 10:10:17 2019 +0100
@@ -1,12 +1,11 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: pyams-template
-Version: 0.1.2
+Version: 0.1.3
 Summary: PyAMS base template interfaces and classes
 Home-page: http://hg.ztfy.org/pyams/pyams_template
 Author: Thierry Florac
 Author-email: tflorac@ulthar.net
 License: ZPL
-Description-Content-Type: UNKNOWN
 Description: ===============
         PyAMS Templates
         ===============
@@ -35,3 +34,4 @@
 Classifier: Programming Language :: Python
 Classifier: Framework :: Pyramid
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Provides-Extra: test