From aad44b3a42101e1bedb376a2b4c440fca4a0b1c3 Mon Sep 17 00:00:00 2001 From: chfw Date: Wed, 11 Sep 2019 22:56:06 +0100 Subject: [PATCH 01/12] :sparkles: support cli option -e, user defined extension. resolves #257 --- moban/constants.py | 2 ++ moban/core/moban_factory.py | 8 +++++++- moban/main.py | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/moban/constants.py b/moban/constants.py index 8b86bb64..d726f084 100644 --- a/moban/constants.py +++ b/moban/constants.py @@ -37,7 +37,9 @@ LABEL_VERSION = "version" LABEL_GROUP = "group" LABEL_DEFINE = "define" +LABEL_EXTENSION = "extension" CLI_DICT = "user_dict" +EXTENSION_DICT = "user_extensions" DEFAULT_CONFIGURATION_DIRNAME = ".%s.cd" % PROGRAM_NAME DEFAULT_TEMPLATE_DIRNAME = ".%s.td" % PROGRAM_NAME diff --git a/moban/core/moban_factory.py b/moban/core/moban_factory.py index adc4c1b1..e19b6b5b 100644 --- a/moban/core/moban_factory.py +++ b/moban/core/moban_factory.py @@ -22,7 +22,13 @@ def __init__(self): self.options_registry = {} def register_extensions(self, extensions): - self.extensions.update(extensions) + for template_type in extensions.keys(): + if template_type in self.extensions: + self.extensions[template_type] = self.extensions[ + template_type + ].union(extensions[template_type]) + else: + self.extensions[template_type] = extensions[template_type] def register_options(self, template_types): # need the value of 'template_types' diff --git a/moban/main.py b/moban/main.py index d7872b1b..e1250ced 100644 --- a/moban/main.py +++ b/moban/main.py @@ -12,6 +12,7 @@ import logging import argparse import logging.config +from collections import defaultdict from moban import ( core, @@ -41,6 +42,7 @@ def main(): options[constants.CLI_DICT] = handle_custom_variables( options.pop(constants.LABEL_DEFINE) ) + handle_custom_variables(options.pop(constants.LABEL_EXTENSION)) OPTIONS.update(options) handle_verbose(options[constants.LABEL_VERBOSE]) @@ -155,6 +157,12 @@ def create_parser(): nargs="+", help="to take a list of VAR=VALUEs", ) + parser.add_argument( + "-e", + "--%s" % constants.LABEL_EXTENSION, + nargs="+", + help="to add an extension to TEMPLATE_TYPE=EXTENSION_NAME", + ) return parser @@ -265,6 +273,16 @@ def handle_custom_variables(list_of_definitions): return custom_data +def handle_custom_extensions(list_of_definitions): + user_extensions = defaultdict(set) + if list_of_definitions: + for definition in list_of_definitions: + key, value = definition.split("=") + user_extensions[key].append(value) + + core.ENGINES.register_options(user_extensions) + + def handle_verbose(verbose_level): if verbose_level > len(LOG_LEVEL): verbose_level = 3 From cfc93602a35ab73c68929e59ab6e6989d7e20889 Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 08:43:39 +0100 Subject: [PATCH 02/12] :bug: update code --- moban/core/moban_factory.py | 5 +++++ moban/main.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/moban/core/moban_factory.py b/moban/core/moban_factory.py index e19b6b5b..04395b5c 100644 --- a/moban/core/moban_factory.py +++ b/moban/core/moban_factory.py @@ -23,6 +23,11 @@ def __init__(self): def register_extensions(self, extensions): for template_type in extensions.keys(): + log.debug( + "Registering extensions: {0}={1}".format( + template_type, extensions[template_type] + ) + ) if template_type in self.extensions: self.extensions[template_type] = self.extensions[ template_type diff --git a/moban/main.py b/moban/main.py index e1250ced..12e45df6 100644 --- a/moban/main.py +++ b/moban/main.py @@ -42,7 +42,7 @@ def main(): options[constants.CLI_DICT] = handle_custom_variables( options.pop(constants.LABEL_DEFINE) ) - handle_custom_variables(options.pop(constants.LABEL_EXTENSION)) + handle_custom_extensions(options.pop(constants.LABEL_EXTENSION)) OPTIONS.update(options) handle_verbose(options[constants.LABEL_VERBOSE]) @@ -278,9 +278,9 @@ def handle_custom_extensions(list_of_definitions): if list_of_definitions: for definition in list_of_definitions: key, value = definition.split("=") - user_extensions[key].append(value) + user_extensions[key].add(value) - core.ENGINES.register_options(user_extensions) + core.ENGINES.register_extensions(user_extensions) def handle_verbose(verbose_level): From 65a4a3751363cb32e224407ec0b2fa51cdb93d4b Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 20:34:55 +0100 Subject: [PATCH 03/12] :sparkles: support cli extensions. #257 --- moban/core/moban_factory.py | 19 +++++++++++------ moban/jinja2/engine.py | 11 ++++++---- moban/main.py | 12 +++++------ .../test_command_line_options.py | 21 +++++++++++++++++++ tests/requirements.txt | 1 + 5 files changed, 47 insertions(+), 17 deletions(-) diff --git a/moban/core/moban_factory.py b/moban/core/moban_factory.py index 04395b5c..9f4800f7 100644 --- a/moban/core/moban_factory.py +++ b/moban/core/moban_factory.py @@ -1,6 +1,7 @@ import os import sys import logging +from collections import defaultdict from moban import utils, reporter, constants, exceptions, file_system from fs.errors import ResourceNotFound @@ -18,22 +19,24 @@ class MobanFactory(PluginManager): def __init__(self): super(MobanFactory, self).__init__(constants.TEMPLATE_ENGINE_EXTENSION) - self.extensions = {} + self.extensions = defaultdict(set) self.options_registry = {} def register_extensions(self, extensions): - for template_type in extensions.keys(): + for user_template_type in extensions.keys(): + template_type = self.get_primary_key(user_template_type) + log.debug( "Registering extensions: {0}={1}".format( - template_type, extensions[template_type] + user_template_type, extensions[user_template_type] ) ) if template_type in self.extensions: self.extensions[template_type] = self.extensions[ - template_type + user_template_type ].union(extensions[template_type]) else: - self.extensions[template_type] = extensions[template_type] + self.extensions[template_type] = extensions[user_template_type] def register_options(self, template_types): # need the value of 'template_types' @@ -45,6 +48,7 @@ def get_engine(self, template_type, template_dirs, context_dirs): template_dirs = utils.verify_the_existence_of_directories( template_dirs ) + if template_type in self.options_registry: custom_engine_spec = self.options_registry[template_type] engine_cls = self.load_me_now( @@ -54,7 +58,10 @@ def get_engine(self, template_type, template_dirs, context_dirs): else: engine_cls = self.load_me_now(template_type) engine_extensions = self.extensions.get(template_type) - options = dict(extensions=engine_extensions) + if engine_extensions: + options = dict(extensions=list(engine_extensions)) + else: + options = dict() template_fs = file_system.get_multi_fs(template_dirs) engine = engine_cls(template_fs, options) return MobanEngine(template_fs, context_dirs, engine) diff --git a/moban/jinja2/engine.py b/moban/jinja2/engine.py index eadf6df3..02eaba6e 100644 --- a/moban/jinja2/engine.py +++ b/moban/jinja2/engine.py @@ -2,6 +2,7 @@ import logging from importlib import import_module +import fs.errors from moban import constants, file_system from jinja2 import Template, Environment from lml.loader import scan_plugins_regex @@ -87,7 +88,6 @@ def __init__(self, template_fs, options=None): # because it is modified here env_params["extensions"] += extensions import_module_of_extension(extensions) - env_params.update(options) self.jj2_environment = Environment(**env_params) for filter_name, filter_function in FILTERS.get_all(): @@ -117,10 +117,13 @@ def get_template(self, template_file): """ try: template = self.jj2_environment.get_template(template_file) + return template except TemplateNotFound: - content = file_system.read_unicode(template_file) - return Template(content) - return template + try: + content = file_system.read_unicode(template_file) + return self.jj2_environment.from_string(content) + except fs.errors.ResourceNotFound: + return self.jj2_environment.from_string(template_file) def get_template_from_string(self, string): return Template(string) diff --git a/moban/main.py b/moban/main.py index 12e45df6..0a42da90 100644 --- a/moban/main.py +++ b/moban/main.py @@ -38,16 +38,15 @@ def main(): """ parser = create_parser() options = vars(parser.parse_args()) + handle_verbose(options[constants.LABEL_VERBOSE]) + load_engine_factory_and_engines() # Error: jinja2 if removed HASH_STORE.IGNORE_CACHE_FILE = options[constants.LABEL_FORCE] - options[constants.CLI_DICT] = handle_custom_variables( - options.pop(constants.LABEL_DEFINE) + handle_custom_variables(options.pop(constants.LABEL_DEFINE)) + options[constants.EXTENSION_DICT] = handle_custom_extensions( + options.pop(constants.LABEL_EXTENSION) ) - handle_custom_extensions(options.pop(constants.LABEL_EXTENSION)) OPTIONS.update(options) - handle_verbose(options[constants.LABEL_VERBOSE]) - moban_file = options[constants.LABEL_MOBANFILE] - load_engine_factory_and_engines() # Error: jinja2 if removed if moban_file is None: moban_file = find_default_moban_file() if moban_file: @@ -279,7 +278,6 @@ def handle_custom_extensions(list_of_definitions): for definition in list_of_definitions: key, value = definition.split("=") user_extensions[key].add(value) - core.ENGINES.register_extensions(user_extensions) diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index 302b99ff..ccffe6f7 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -499,3 +499,24 @@ def test_pypi_pkg_example(_): content = f.read() eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."') os.unlink("test_pypi_pkg_example.py") + + +def test_add_extension(): + test_args = [ + "moban", + "-t", + "{{ python_version }}", + "-e", + "jinja2='jinja2_python_version.PythonVersionExtension'", + ] + with patch.object(sys, "argv", test_args): + from moban.main import main + + main() + with open("moban.output") as f: + content = f.read() + eq_( + content, + "{}.{}".format(sys.version_info[0], sys.version_info[1]), + ) + os.unlink("moban.output") diff --git a/tests/requirements.txt b/tests/requirements.txt index 055d0047..176572ca 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -14,3 +14,4 @@ arrow;python_version!="3.4" jinja2_time pypifs gitfs2 +jinja2-python-version From 0e7d4e8dddd69ac4ccc3c2371b35dc0ee19a1cfc Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 21:08:56 +0100 Subject: [PATCH 04/12] :green_heart: updated broken tests --- moban/main.py | 3 +- .../test_command_line_options.py | 51 ++++++++----------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/moban/main.py b/moban/main.py index 0a42da90..c458a9ac 100644 --- a/moban/main.py +++ b/moban/main.py @@ -41,7 +41,8 @@ def main(): handle_verbose(options[constants.LABEL_VERBOSE]) load_engine_factory_and_engines() # Error: jinja2 if removed HASH_STORE.IGNORE_CACHE_FILE = options[constants.LABEL_FORCE] - handle_custom_variables(options.pop(constants.LABEL_DEFINE)) + options[constants.CLI_DICT] = handle_custom_variables( + options.pop(constants.LABEL_DEFINE)) options[constants.EXTENSION_DICT] = handle_custom_extensions( options.pop(constants.LABEL_EXTENSION) ) diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index ccffe6f7..1de1698e 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -109,15 +109,6 @@ def tearDown(self): os.unlink(self.config_file) -@raises(Exception) -def test_missing_configuration(): - test_args = ["moban", "-t", "a.jj2"] - with patch.object(sys, "argv", test_args): - from moban.main import main - - main() - - class TestNoOptions: def setUp(self): self.config_file = ".moban.yml" @@ -476,7 +467,7 @@ def test_git_repo_example(_): main() with open("test_git_repo_example.py") as f: content = f.read() - eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."') + eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."\n') os.unlink("test_git_repo_example.py") @@ -497,26 +488,26 @@ def test_pypi_pkg_example(_): main() with open("test_pypi_pkg_example.py") as f: content = f.read() - eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."') + eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."\n') os.unlink("test_pypi_pkg_example.py") -def test_add_extension(): - test_args = [ - "moban", - "-t", - "{{ python_version }}", - "-e", - "jinja2='jinja2_python_version.PythonVersionExtension'", - ] - with patch.object(sys, "argv", test_args): - from moban.main import main - - main() - with open("moban.output") as f: - content = f.read() - eq_( - content, - "{}.{}".format(sys.version_info[0], sys.version_info[1]), - ) - os.unlink("moban.output") +#def test_add_extension(): +# test_args = [ +# "moban", +# "-t", +# "{{ python_version }}", +# "-e", +# "jinja2='jinja2_python_version.PythonVersionExtension'", +# ] +# with patch.object(sys, "argv", test_args): +# from moban.main import main +# +# main() +# with open("moban.output") as f: +# content = f.read() +# eq_( +# content, +# "{}.{}".format(sys.version_info[0], sys.version_info[1]), +# ) +# os.unlink("moban.output") From f4b0578f02ec06ec2266a33bbc3b2994015cdcbc Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 21:11:13 +0100 Subject: [PATCH 05/12] :fire: take the test for now --- .../test_command_line_options.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index 1de1698e..47083b8a 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -490,24 +490,3 @@ def test_pypi_pkg_example(_): content = f.read() eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."\n') os.unlink("test_pypi_pkg_example.py") - - -#def test_add_extension(): -# test_args = [ -# "moban", -# "-t", -# "{{ python_version }}", -# "-e", -# "jinja2='jinja2_python_version.PythonVersionExtension'", -# ] -# with patch.object(sys, "argv", test_args): -# from moban.main import main -# -# main() -# with open("moban.output") as f: -# content = f.read() -# eq_( -# content, -# "{}.{}".format(sys.version_info[0], sys.version_info[1]), -# ) -# os.unlink("moban.output") From a90419a9938b5b16fa532314009caf50c1124585 Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 21:14:16 +0100 Subject: [PATCH 06/12] :shirt: update coding style --- moban/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moban/main.py b/moban/main.py index c458a9ac..d8d66563 100644 --- a/moban/main.py +++ b/moban/main.py @@ -42,7 +42,8 @@ def main(): load_engine_factory_and_engines() # Error: jinja2 if removed HASH_STORE.IGNORE_CACHE_FILE = options[constants.LABEL_FORCE] options[constants.CLI_DICT] = handle_custom_variables( - options.pop(constants.LABEL_DEFINE)) + options.pop(constants.LABEL_DEFINE) + ) options[constants.EXTENSION_DICT] = handle_custom_extensions( options.pop(constants.LABEL_EXTENSION) ) From b97843d45b04bbdbb2c3d206212f30735723b186 Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 21:21:33 +0100 Subject: [PATCH 07/12] :microscope: add test case --- .../test_command_line_options.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index 47083b8a..447c70cf 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -490,3 +490,24 @@ def test_pypi_pkg_example(_): content = f.read() eq_(content, '__version__ = "0.1.1rc3"\n__author__ = "C.W."\n') os.unlink("test_pypi_pkg_example.py") + + +def test_add_extension(): + test_args = [ + "moban", + "-t", + "{{ python_version }}", + "-e", + "jinja2=jinja2_python_version.PythonVersionExtension", + ] + with patch.object(sys, "argv", test_args): + from moban.main import main + + main() + with open("moban.output") as f: + content = f.read() + eq_( + content, + "{}.{}".format(sys.version_info[0], sys.version_info[1]), + ) + os.unlink("moban.output") From d1e06c05b7ef474b19ca6ca1d93a5549a68d1101 Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 21:23:38 +0100 Subject: [PATCH 08/12] :books: update change log --- .moban.cd/changelog.yml | 1 + CHANGELOG.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.moban.cd/changelog.yml b/.moban.cd/changelog.yml index 175c5d8f..08adfdaf 100644 --- a/.moban.cd/changelog.yml +++ b/.moban.cd/changelog.yml @@ -5,6 +5,7 @@ releases: - action: Added details: - "`#322`: Implicit targets with template extensions default to copy" + - "`#257`: '-e' to load extensions for template engines, i.e. jinja2" date: tbd version: 0.6.2 - changes: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2e7e14c8..9bdf6c94 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,6 +9,8 @@ Added #. `#322 `_: Implicit targets with template extensions default to copy +#. `#257 `_: '-e' to load + extensions for template engines, i.e. jinja2 0.6.1 - 10.09.2019 -------------------------------------------------------------------------------- From ec411a34b17596c0c3fb01a4102beaa1841315e6 Mon Sep 17 00:00:00 2001 From: chfw Date: Fri, 13 Sep 2019 21:27:25 +0100 Subject: [PATCH 09/12] :fire: do not test -e on python 2 because 3rd party extension does not work on python 2, which is not an issue beyond 2020 --- tests/integration_tests/test_command_line_options.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index 447c70cf..b9c11f2b 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -3,6 +3,7 @@ from shutil import copyfile from mock import patch +from nose import SkipTest from nose.tools import eq_, raises, assert_raises from moban.definitions import TemplateTarget @@ -493,6 +494,8 @@ def test_pypi_pkg_example(_): def test_add_extension(): + if sys.version_info[0] == 2: + raise SkipTest("jinja2-python-version does not support python 2") test_args = [ "moban", "-t", From 28f0038135ad3795381eaa723506610131e02bf8 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 14 Sep 2019 09:17:56 +0100 Subject: [PATCH 10/12] :bug: check jj2, alias of jinja2 works too --- moban/core/moban_factory.py | 2 +- .../test_command_line_options.py | 44 ++++++++++++------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/moban/core/moban_factory.py b/moban/core/moban_factory.py index 9f4800f7..e430f097 100644 --- a/moban/core/moban_factory.py +++ b/moban/core/moban_factory.py @@ -34,7 +34,7 @@ def register_extensions(self, extensions): if template_type in self.extensions: self.extensions[template_type] = self.extensions[ user_template_type - ].union(extensions[template_type]) + ].union(extensions[user_template_type]) else: self.extensions[template_type] = extensions[user_template_type] diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index b9c11f2b..8abafc62 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -496,21 +496,31 @@ def test_pypi_pkg_example(_): def test_add_extension(): if sys.version_info[0] == 2: raise SkipTest("jinja2-python-version does not support python 2") - test_args = [ - "moban", - "-t", - "{{ python_version }}", - "-e", - "jinja2=jinja2_python_version.PythonVersionExtension", + test_commands = [ + [ + "moban", + "-t", + "{{ python_version }}", + "-e", + "jinja2=jinja2_python_version.PythonVersionExtension", + ], + [ + "moban", + "-t", + "{{ python_version }}", + "-e", + "jj2=jinja2_python_version.PythonVersionExtension", + ] ] - with patch.object(sys, "argv", test_args): - from moban.main import main - - main() - with open("moban.output") as f: - content = f.read() - eq_( - content, - "{}.{}".format(sys.version_info[0], sys.version_info[1]), - ) - os.unlink("moban.output") + for test_args in test_commands: + with patch.object(sys, "argv", test_args): + from moban.main import main + + main() + with open("moban.output") as f: + content = f.read() + eq_( + content, + "{}.{}".format(sys.version_info[0], sys.version_info[1]), + ) + os.unlink("moban.output") From 11f569adf58ecb6a0d6dbaf5cacc17cd44e70a21 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 14 Sep 2019 09:19:08 +0100 Subject: [PATCH 11/12] :shirt: code style and variable name update --- moban/jinja2/engine.py | 4 ++-- tests/integration_tests/test_command_line_options.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/moban/jinja2/engine.py b/moban/jinja2/engine.py index 02eaba6e..87aeb76d 100644 --- a/moban/jinja2/engine.py +++ b/moban/jinja2/engine.py @@ -12,7 +12,7 @@ from jinja2_fsloader import FSLoader JINJA2_LIBRARIES = "^moban_jinja2_.+$" -JINJA2_EXENSIONS = [ +JINJA2_EXTENSIONS = [ "moban.jinja2.filters.repr", "moban.jinja2.filters.github", "moban.jinja2.filters.text", @@ -146,7 +146,7 @@ def apply_template(self, template, data, output): def load_jinja2_extensions(): - scan_plugins_regex(JINJA2_LIBRARIES, "moban", None, JINJA2_EXENSIONS) + scan_plugins_regex(JINJA2_LIBRARIES, "moban", None, JINJA2_EXTENSIONS) def is_extension_list_valid(extensions): diff --git a/tests/integration_tests/test_command_line_options.py b/tests/integration_tests/test_command_line_options.py index 8abafc62..bd333cf0 100644 --- a/tests/integration_tests/test_command_line_options.py +++ b/tests/integration_tests/test_command_line_options.py @@ -510,12 +510,12 @@ def test_add_extension(): "{{ python_version }}", "-e", "jj2=jinja2_python_version.PythonVersionExtension", - ] + ], ] for test_args in test_commands: with patch.object(sys, "argv", test_args): from moban.main import main - + main() with open("moban.output") as f: content = f.read() From ee870c21c44b625a876866db658165dbb0f38b88 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 14 Sep 2019 09:22:23 +0100 Subject: [PATCH 12/12] :books: prepare for release --- .moban.cd/changelog.yml | 3 ++- .moban.cd/moban.yml | 2 +- CHANGELOG.rst | 4 +++- docs/conf.py | 2 +- setup.py | 6 +++--- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.moban.cd/changelog.yml b/.moban.cd/changelog.yml index 08adfdaf..d6e6d4ab 100644 --- a/.moban.cd/changelog.yml +++ b/.moban.cd/changelog.yml @@ -6,7 +6,8 @@ releases: details: - "`#322`: Implicit targets with template extensions default to copy" - "`#257`: '-e' to load extensions for template engines, i.e. jinja2" - date: tbd + - "`#333`: command line template fails with version 0.6.1" + date: 15.09.2019 version: 0.6.2 - changes: - action: Fixed diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 6acc0cb6..0f245d75 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -6,7 +6,7 @@ contact: wangc_2011@hotmail.com license: MIT version: 0.6.2 current_version: 0.6.2 -release: 0.6.1 +release: 0.6.2 branch: master master: index command_line_interface: "moban" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9bdf6c94..e271273f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,7 @@ Change log ================================================================================ -0.6.2 - tbd +0.6.2 - 15.09.2019 -------------------------------------------------------------------------------- Added @@ -11,6 +11,8 @@ Added with template extensions default to copy #. `#257 `_: '-e' to load extensions for template engines, i.e. jinja2 +#. `#333 `_: command line + template fails with version 0.6.1 0.6.1 - 10.09.2019 -------------------------------------------------------------------------------- diff --git a/docs/conf.py b/docs/conf.py index 1bdbbf0e..c7d0042f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,7 +27,7 @@ # The short X.Y version version = '0.6.2' # The full version, including alpha/beta/rc tags -release = '0.6.1' +release = '0.6.2' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index d2b70c4a..1030de0f 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ "Yet another jinja2 cli command for static text generation" ) URL = "https://github.com/moremoban/moban" -DOWNLOAD_URL = "%s/archive/0.6.1.tar.gz" % URL +DOWNLOAD_URL = "%s/archive/0.6.2.tar.gz" % URL FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"] KEYWORDS = [ "python", @@ -97,8 +97,8 @@ } # You do not need to read beyond this line PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) -GS_COMMAND = ("gs moban v0.6.1 " + - "Find 0.6.1 in changelog for more details") +GS_COMMAND = ("gs moban v0.6.2 " + + "Find 0.6.2 in changelog for more details") NO_GS_MESSAGE = ("Automatic github release is disabled. " + "Please install gease to enable it.") UPLOAD_FAILED_MSG = (