From 8ac266ee4cb69cda30afde29218cc1fd5999125a Mon Sep 17 00:00:00 2001 From: chfw Date: Mon, 7 Oct 2019 20:08:03 +0100 Subject: [PATCH 1/2] :lipstick: pump up the version number --- .moban.cd/moban.yml | 4 ++-- docs/conf.py | 2 +- moban/_version.py | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 52dba2a1..4448cc2f 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -4,8 +4,8 @@ organisation: moremoban author: C. W. contact: wangc_2011@hotmail.com license: MIT -version: 0.6.4 -current_version: 0.6.4 +version: 0.6.5 +current_version: 0.6.5 release: 0.6.4 branch: master master: index diff --git a/docs/conf.py b/docs/conf.py index 7f2dd23d..8468720d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ copyright = '2017-2019 Onni Software Ltd.' author = 'C. W.' # The short X.Y version -version = '0.6.4' +version = '0.6.5' # The full version, including alpha/beta/rc tags release = '0.6.4' diff --git a/moban/_version.py b/moban/_version.py index a83896a5..06c83660 100644 --- a/moban/_version.py +++ b/moban/_version.py @@ -1,2 +1,2 @@ -__version__ = "0.6.4" +__version__ = "0.6.5" __author__ = "C. W." diff --git a/setup.py b/setup.py index 15917f45..95ba5d2d 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ NAME = "moban" AUTHOR = "C. W." -VERSION = "0.6.4" +VERSION = "0.6.5" EMAIL = "wangc_2011@hotmail.com" LICENSE = "MIT" ENTRY_POINTS = { From 94837e9c493534bbdc7ec4ecade74e498c8810a0 Mon Sep 17 00:00:00 2001 From: chfw Date: Mon, 7 Oct 2019 20:13:11 +0100 Subject: [PATCH 2/2] :tractor: further code refactoring --- moban/{ => core}/mobanfile/__init__.py | 4 ++-- moban/{ => core}/mobanfile/targets.py | 2 +- moban/{ => core}/mobanfile/templates.py | 0 moban/main.py | 3 ++- tests/mobanfile/test_mobanfile.py | 4 ++-- tests/mobanfile/test_targets.py | 2 +- tests/mobanfile/test_templates.py | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) rename moban/{ => core}/mobanfile/__init__.py (99%) rename moban/{ => core}/mobanfile/targets.py (98%) rename moban/{ => core}/mobanfile/templates.py (100%) diff --git a/moban/mobanfile/__init__.py b/moban/core/mobanfile/__init__.py similarity index 99% rename from moban/mobanfile/__init__.py rename to moban/core/mobanfile/__init__.py index 58e42bbb..3dd51c2d 100644 --- a/moban/mobanfile/__init__.py +++ b/moban/core/mobanfile/__init__.py @@ -10,12 +10,12 @@ from moban.core.utils import verify_the_existence_of_directories from moban.deprecated import handle_copy, handle_requires from moban.core.data_loader import merge -from moban.mobanfile.targets import ( +from moban.core.moban_factory import expand_template_directories +from moban.core.mobanfile.targets import ( parse_targets, extract_target, extract_group_targets, ) -from moban.core.moban_factory import expand_template_directories LOG = logging.getLogger(__name__) diff --git a/moban/mobanfile/targets.py b/moban/core/mobanfile/targets.py similarity index 98% rename from moban/mobanfile/targets.py rename to moban/core/mobanfile/targets.py index caa54812..492399fa 100644 --- a/moban/mobanfile/targets.py +++ b/moban/core/mobanfile/targets.py @@ -4,7 +4,7 @@ from moban import core, constants, exceptions from moban.externals import reporter from moban.core.definitions import TemplateTarget -from moban.mobanfile.templates import handle_template +from moban.core.mobanfile.templates import handle_template LOG = logging.getLogger(__name__) diff --git a/moban/mobanfile/templates.py b/moban/core/mobanfile/templates.py similarity index 100% rename from moban/mobanfile/templates.py rename to moban/core/mobanfile/templates.py diff --git a/moban/main.py b/moban/main.py index ba1adf8a..9d59c7e6 100644 --- a/moban/main.py +++ b/moban/main.py @@ -14,7 +14,8 @@ import logging.config from collections import defaultdict -from moban import core, constants, mobanfile, exceptions +from moban import core, constants, exceptions +from moban.core import mobanfile from moban._version import __version__ from moban.externals import reporter, file_system from moban.core.hashstore import HASH_STORE diff --git a/tests/mobanfile/test_mobanfile.py b/tests/mobanfile/test_mobanfile.py index 7d4c807a..0d010a2f 100644 --- a/tests/mobanfile/test_mobanfile.py +++ b/tests/mobanfile/test_mobanfile.py @@ -6,7 +6,7 @@ @patch("moban.core.moban_factory.MobanEngine.render_to_files") def test_handle_targets(fake_renderer): - from moban.mobanfile import handle_targets + from moban.core.mobanfile import handle_targets TEMPLATE = "copier-test01.csv" OUTPUT = "output.csv" @@ -39,7 +39,7 @@ def test_handle_targets(fake_renderer): @patch("moban.core.moban_factory.MobanEngine.render_to_files") def test_handle_targets_sequence(fake_renderer): - from moban.mobanfile import handle_targets + from moban.core.mobanfile import handle_targets TEMPLATE1 = "a.template.jj2" OUTPUT1 = "filterme.handlebars" # in the future, this could dynamic output diff --git a/tests/mobanfile/test_targets.py b/tests/mobanfile/test_targets.py index 23873aaa..8ede2452 100644 --- a/tests/mobanfile/test_targets.py +++ b/tests/mobanfile/test_targets.py @@ -2,8 +2,8 @@ import fs.path from nose.tools import eq_, raises -from moban.mobanfile import targets from moban.exceptions import GroupTargetNotFound +from moban.core.mobanfile import targets from moban.core.definitions import TemplateTarget TEMPLATE = "a.jj2" diff --git a/tests/mobanfile/test_templates.py b/tests/mobanfile/test_templates.py index cc50421b..469aca91 100644 --- a/tests/mobanfile/test_templates.py +++ b/tests/mobanfile/test_templates.py @@ -1,7 +1,7 @@ import fs.path from mock import patch from nose.tools import eq_ -from moban.mobanfile.templates import handle_template +from moban.core.mobanfile.templates import handle_template class TestHandleTemplateFunction: