From 9235e2ed1e21c7c9282fbaab43c2543e6b6a3f62 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 8 Jul 2019 13:55:04 +0700 Subject: [PATCH 01/19] :shirt: fix import order in reporter.py --- moban/reporter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moban/reporter.py b/moban/reporter.py index b706ef79..e79ad989 100644 --- a/moban/reporter.py +++ b/moban/reporter.py @@ -1,6 +1,5 @@ -import moban.constants as constants - import crayons +import moban.constants as constants MESSAGE_TEMPLATING = "Templating {0} to {1}" MESSAGE_UP_TO_DATE = "Everything is up to date!" From 60c6ed84124731895cbdf951884c82c788b15e4c Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 8 Jul 2019 13:06:02 +0700 Subject: [PATCH 02/19] :shirt: sync style from pypi-mobans-pkg 0.0.5 --- .moban.d/setup.py | 2 +- setup.py | 45 ++++++++++++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/.moban.d/setup.py b/.moban.d/setup.py index 901b9222..ee8313e0 100644 --- a/.moban.d/setup.py +++ b/.moban.d/setup.py @@ -3,4 +3,4 @@ {%block platform_block%} {%endblock%} -{%block morefiles%} 'CONTRIBUTORS.rst',{%endblock%} +{%block morefiles%} "CONTRIBUTORS.rst",{%endblock%} diff --git a/setup.py b/setup.py index 06ee131a..75ca297a 100644 --- a/setup.py +++ b/setup.py @@ -32,12 +32,22 @@ VERSION = "0.4.5" EMAIL = "wangc_2011@hotmail.com" LICENSE = "MIT" -ENTRY_POINTS = {"console_scripts": ["moban = moban.main:main"]} -DESCRIPTION = "Yet another jinja2 cli command for static text generation" +ENTRY_POINTS = { + "console_scripts": [ + "moban = moban.main:main" + ], +} +DESCRIPTION = ( + "Yet another jinja2 cli command for static text generation" +) URL = "https://github.com/moremoban/moban" DOWNLOAD_URL = "%s/archive/0.4.5.tar.gz" % URL FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"] -KEYWORDS = ["python", "jinja2", "moban"] +KEYWORDS = [ + "python", + "jinja2", + "moban", +] CLASSIFIERS = [ "Topic :: Software Development :: Libraries", @@ -49,8 +59,11 @@ "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + ] INSTALL_REQUIRES = [ @@ -66,19 +79,16 @@ PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"]) -EXTRAS_REQUIRE = {} +EXTRAS_REQUIRE = { +} # 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.4.5 " + "Find 0.4.5 in changelog for more details" -NO_GS_MESSAGE = ( - "Automatic github release is disabled. " - + "Please install gease to enable it." -) +PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) +GS_COMMAND = ("gs moban v0.4.5 " + + "Find 0.4.5 in changelog for more details") +NO_GS_MESSAGE = ("Automatic github release is disabled. " + + "Please install gease to enable it.") UPLOAD_FAILED_MSG = ( - 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND -) + 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND) HERE = os.path.abspath(os.path.dirname(__file__)) @@ -121,7 +131,9 @@ def run(self): sys.exit() -SETUP_COMMANDS.update({"publish": PublishCommand}) +SETUP_COMMANDS.update({ + "publish": PublishCommand +}) def has_gease(): @@ -132,7 +144,6 @@ def has_gease(): """ try: import gease # noqa - return True except ImportError: return False @@ -201,5 +212,5 @@ def filter_out_test_code(file_handle): zip_safe=False, entry_points=ENTRY_POINTS, classifiers=CLASSIFIERS, - cmdclass=SETUP_COMMANDS, + cmdclass=SETUP_COMMANDS ) From 0d8124221a54e029f15c2c84fb4a82d771dc4163 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 8 Jul 2019 10:33:33 +0700 Subject: [PATCH 03/19] :green_heart: check local repo using moban in CI Ensure that this repo is leading by example, and eating its own dogfood. Also reduces flake8 ignore list to only W503,W504, and updates the flake8 max line length to match black. And separate commands in test.bat with %errorlevel% handling. --- .moban.cd/moban.yml | 2 +- .travis.yml | 2 +- Makefile | 10 ++++++++++ lint.sh | 2 +- test.bat | 8 +++++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 56490822..480c0f13 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -27,4 +27,4 @@ dependencies: - giturlparse>=0.9.1 description: Yet another jinja2 cli command for static text generation scm_host: github.com -lint: sh lint.sh \ No newline at end of file +lint_command: make lint install_test format install update diff --git a/.travis.yml b/.travis.yml index d7b0b96d..6706df51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ stages: python: 3.6 stage: lint install: pip install flake8 - script: sh lint.sh + script: make lint install_test format install update jobs: include: diff --git a/Makefile b/Makefile index d275cdef..6315255a 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,21 @@ all: test +install: + pip install . + +install_test: + pip install -r tests/requirements.txt + update: moban -m mobanfile + git diff --exit-code test: bash test.sh +lint: + bash lint.sh + format: isort -y $(find moban -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo) black -l 79 moban diff --git a/lint.sh b/lint.sh index b53891e2..08f7c655 100644 --- a/lint.sh +++ b/lint.sh @@ -1 +1 @@ -flake8 . --exclude=.moban.d,docs --ignore=E203,E121,E123,E126,E226,E24,E704,W503,W504 +flake8 --max-line-length=88 --exclude=.moban.d,docs --ignore=W503,W504 diff --git a/test.bat b/test.bat index 7f79f8f4..399c6eda 100644 --- a/test.bat +++ b/test.bat @@ -1,3 +1,9 @@ pip freeze -nosetests --with-coverage --cover-package=moban --cover-package=tests && flake8 . --exclude=docs,.moban.d --ignore=E203,E121,E123,E126,E226,E24,E704,W503,W504 +nosetests --with-coverage --cover-package=moban --cover-package=tests || goto :error + +flake8 --max-line-length=88 --exclude=docs,.moban.d --ignore=W503,W504 || goto :error + +:error +echo Failed with error #%errorlevel%. +exit /b %errorlevel% From ec48af448333fb06f991d7ce4509d894ecce95a3 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 9 Jul 2019 08:35:52 +0700 Subject: [PATCH 04/19] :green_heart: Remove Python 3.8-dev The Python 3.8-dev job has broken on building ruamel.yaml, and the template doesnt provide control over allowing failures. --- .moban.d/travis.yml | 1 - .travis.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.moban.d/travis.yml b/.moban.d/travis.yml index 741fd994..01e298ba 100644 --- a/.moban.d/travis.yml +++ b/.moban.d/travis.yml @@ -10,7 +10,6 @@ matrix: {%block custom_python_versions%} python: - &pypy2 pypy2.7-6.0 - - 3.8-dev - 3.7 - 3.6 - 3.5 diff --git a/.travis.yml b/.travis.yml index 6706df51..e5734eba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ notifications: email: false python: - &pypy2 pypy2.7-6.0 - - 3.8-dev - 3.7 - 3.6 - 3.5 From 10bebef26a160266df52fb845e2030b953863cbd Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 9 Jul 2019 06:19:19 +0700 Subject: [PATCH 05/19] :ambulance: fix unicode support on Python 2.7 Fixes two UnicodeEncodeError's occurring when hashing and writing files. Closes https://github.com/moremoban/moban/issues/281 --- moban/hashstore.py | 2 ++ moban/utils.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/moban/hashstore.py b/moban/hashstore.py index 17c9efd9..25b72518 100644 --- a/moban/hashstore.py +++ b/moban/hashstore.py @@ -65,6 +65,8 @@ def get_file_hash(afile): def get_hash(content): md5 = hashlib.md5() + if PY2 and content.__class__.__name__ == "unicode": + content = content.encode("utf-8") md5.update(content) return md5.digest().decode("latin1") diff --git a/moban/utils.py b/moban/utils.py index 3c498c95..87e0f63b 100644 --- a/moban/utils.py +++ b/moban/utils.py @@ -7,6 +7,7 @@ from moban import constants, exceptions log = logging.getLogger(__name__) +PY2 = sys.version_info[0] == 2 def merge(left, right): @@ -60,6 +61,8 @@ def file_permissions(afile): def write_file_out(filename, content): + if PY2 and content.__class__.__name__ == "unicode": + content = content.encode("utf-8") dest_folder = os.path.dirname(filename) if dest_folder: mkdir_p(dest_folder) From 1f6b33e6f5abe44a1509ed28e822cf8ba6bcf091 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 8 Jul 2019 18:11:11 +0700 Subject: [PATCH 06/19] :ambulance: Revert "Bug fix repo name (#227)" This substantially reverts commit 95178912df9625dcc320ebe339d40dd2c1400567. The cause of the change has been addressed by an enhancement in git-url-parse v1.2.1, too late to be included in moban v0.4.0 https://github.com/retr0h/git-url-parse/commit/3e2bf91e Using giturlparse instead of git-url-parse is a non-trivial breaking change. It was done to avoid one minor regression which users could workaround, however it introduced many significant regressions users could not workaround as giturlparse does not parse many types of URLs. Closes https://github.com/moremoban/moban/issues/277 --- .moban.cd/moban.yml | 2 +- min_requirements.txt | 2 +- moban/repo.py | 8 +++----- requirements.txt | 2 +- setup.py | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 480c0f13..670a37fd 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -24,7 +24,7 @@ dependencies: - appdirs>=1.2.0 - crayons>= 0.1.0 - GitPython>=2.0.0 - - giturlparse>=0.9.1 + - git-url-parse description: Yet another jinja2 cli command for static text generation scm_host: github.com lint_command: make lint install_test format install update diff --git a/min_requirements.txt b/min_requirements.txt index 3f7c2ca6..0b44029f 100644 --- a/min_requirements.txt +++ b/min_requirements.txt @@ -4,4 +4,4 @@ lml==0.0.9 appdirs==1.2.0 crayons== 0.1.0 GitPython==2.0.0 -giturlparse==0.9.1 +git-url-parse diff --git a/moban/repo.py b/moban/repo.py index c614aeeb..68475918 100644 --- a/moban/repo.py +++ b/moban/repo.py @@ -44,14 +44,12 @@ def git_clone(requires): def get_repo_name(repo_url): import giturlparse + from giturlparse.parser import ParserError try: repo = giturlparse.parse(repo_url) - name = repo.repo - if name.endswith("/"): - name = name[:-1] - return name - except AttributeError: + return repo.name + except ParserError: reporter.report_error_message( constants.MESSAGE_INVALID_GIT_URL % repo_url ) diff --git a/requirements.txt b/requirements.txt index 7dd42624..f3eba9eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ lml>=0.0.9 appdirs>=1.2.0 crayons>= 0.1.0 GitPython>=2.0.0 -giturlparse>=0.9.1 +git-url-parse diff --git a/setup.py b/setup.py index 75ca297a..e3e80ac0 100644 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ "appdirs>=1.2.0", "crayons>= 0.1.0", "GitPython>=2.0.0", - "giturlparse>=0.9.1", + "git-url-parse", ] SETUP_COMMANDS = {} From f13e6134dee89b0695768a3e76a93d81267aeb12 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 8 Jul 2019 21:12:50 +0700 Subject: [PATCH 07/19] :ambulance: ignore repo trailing slashes git-url-parse does not yet (1.2.2) handle trailing slashes, which are an optional part of all git URLs, but were supported before the switch to using GitPython. Closes https://github.com/moremoban/moban/issues/277 --- .moban.cd/moban.yml | 2 +- min_requirements.txt | 2 +- moban/repo.py | 2 +- requirements.txt | 2 +- setup.py | 2 +- tests/test_repo.py | 8 +++++--- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 670a37fd..0ff2e3d6 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -24,7 +24,7 @@ dependencies: - appdirs>=1.2.0 - crayons>= 0.1.0 - GitPython>=2.0.0 - - git-url-parse + - git-url-parse>=1.2.2 description: Yet another jinja2 cli command for static text generation scm_host: github.com lint_command: make lint install_test format install update diff --git a/min_requirements.txt b/min_requirements.txt index 0b44029f..4e76ef0a 100644 --- a/min_requirements.txt +++ b/min_requirements.txt @@ -4,4 +4,4 @@ lml==0.0.9 appdirs==1.2.0 crayons== 0.1.0 GitPython==2.0.0 -git-url-parse +git-url-parse==1.2.2 diff --git a/moban/repo.py b/moban/repo.py index 68475918..02fdd6de 100644 --- a/moban/repo.py +++ b/moban/repo.py @@ -47,7 +47,7 @@ def get_repo_name(repo_url): from giturlparse.parser import ParserError try: - repo = giturlparse.parse(repo_url) + repo = giturlparse.parse(repo_url.rstrip("/")) return repo.name except ParserError: reporter.report_error_message( diff --git a/requirements.txt b/requirements.txt index f3eba9eb..b835604e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,4 @@ lml>=0.0.9 appdirs>=1.2.0 crayons>= 0.1.0 GitPython>=2.0.0 -git-url-parse +git-url-parse>=1.2.2 diff --git a/setup.py b/setup.py index e3e80ac0..d9b773c2 100644 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ "appdirs>=1.2.0", "crayons>= 0.1.0", "GitPython>=2.0.0", - "git-url-parse", + "git-url-parse>=1.2.2", ] SETUP_COMMANDS = {} diff --git a/tests/test_repo.py b/tests/test_repo.py index aa70beed..1c82e258 100644 --- a/tests/test_repo.py +++ b/tests/test_repo.py @@ -125,14 +125,16 @@ def test_update_existing_with_reference_parameter( def test_get_repo_name(): repos = [ - "https://github.com/sphinx-doc/sphinx", + "https://github.com/repo-abc-def/repo", "https://github.com/abc/repo", "https://github.com/abc/repo.git", "https://github.com/abc/repo/", - "git@github.com:moremoban/moban.git", + "git@github.com:abc/repo.git", + "git@bitbucket.org:abc/repo.git", + "git://github.com/abc/repo.git", ] actual = [get_repo_name(repo) for repo in repos] - expected = ["sphinx", "repo", "repo", "repo", "moban"] + expected = ["repo"] * len(repos) eq_(expected, actual) From 5e895b6a9e3a7b06c3cbd3ea651b197990366c33 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Mon, 8 Jul 2019 10:21:33 +0700 Subject: [PATCH 08/19] :ambulance: choose version of ruamel.yaml Re-adds Python 3.4 support, broken by ruamel.yaml desupporting it in version 0.15.94. Also adds minimum version for ruamel-yaml on Python 3.7 and 3.8, and re-adds Python 3.8-dev to the Travis matrix recently removed in ec48af4 due to temporary build failures. And avoids newer arrow desupported on Python 3.4. Fixes https://github.com/moremoban/moban/issues/274 --- .moban.cd/moban.yml | 7 +++++- .moban.d/travis.yml | 9 ++++--- .travis.yml | 9 ++++--- min_requirements.txt | 5 +++- mobanfile | 7 ++++-- requirements.txt | 5 +++- setup.py | 56 +++++++++++++++++++++++++++++++++++++++++- tests/requirements.txt | 3 +++ 8 files changed, 87 insertions(+), 14 deletions(-) diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 0ff2e3d6..6d06c031 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -18,7 +18,10 @@ keywords: - jinja2 - moban dependencies: - - ruamel.yaml>=0.15.5 + - ruamel.yaml>=0.15.5,<=0.15.94;python_version == '3.4' + - ruamel.yaml>=0.15.42;python_version == '3.7' + - ruamel.yaml>=0.15.5;python_version != '3.4' and python_version < '3.7' + - ruamel.yaml>=0.15.98;python_version == '3.8' - jinja2>=2.7.1 - lml>=0.0.9 - appdirs>=1.2.0 @@ -28,3 +31,5 @@ dependencies: description: Yet another jinja2 cli command for static text generation scm_host: github.com lint_command: make lint install_test format install update +setup_use_markers: true +setup_use_markers_fix: true diff --git a/.moban.d/travis.yml b/.moban.d/travis.yml index 01e298ba..91ba2fd4 100644 --- a/.moban.d/travis.yml +++ b/.moban.d/travis.yml @@ -1,10 +1,9 @@ {% extends 'travis.yml.jj2' %} {%block extra_matrix %} -matrix: - include: - - python: 2.7 - env: MINREQ=1 +env: + - MINREQ=0 + - MINREQ=1 {%endblock%} {%block custom_python_versions%} @@ -13,5 +12,7 @@ python: - 3.7 - 3.6 - 3.5 + - 3.4 - 2.7 + - 3.8-dev {%endblock%} diff --git a/.travis.yml b/.travis.yml index e5734eba..4e5a12ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,12 @@ python: - 3.7 - 3.6 - 3.5 + - 3.4 - 2.7 -matrix: - include: - - python: 2.7 - env: MINREQ=1 + - 3.8-dev +env: + - MINREQ=0 + - MINREQ=1 stages: - test diff --git a/min_requirements.txt b/min_requirements.txt index 4e76ef0a..faee8d8f 100644 --- a/min_requirements.txt +++ b/min_requirements.txt @@ -1,4 +1,7 @@ -ruamel.yaml==0.15.5 +ruamel.yaml==0.15.5,<=0.15.94;python_version == '3.4' +ruamel.yaml==0.15.42;python_version == '3.7' +ruamel.yaml==0.15.5;python_version != '3.4' and python_version < '3.7' +ruamel.yaml==0.15.98;python_version == '3.8' jinja2==2.7.1 lml==0.0.9 appdirs==1.2.0 diff --git a/mobanfile b/mobanfile index 2360459b..a20f25a1 100644 --- a/mobanfile +++ b/mobanfile @@ -1,8 +1,11 @@ requires: - - pypi-mobans-pkg + - type: git + url: https://github.com/moremoban/pypi-mobans + submodule: true + branch: dev configuration: template_dir: - - "setupmobans:templates" + - "pypi-mobans:templates" - ".moban.d" configuration: moban.yml targets: diff --git a/requirements.txt b/requirements.txt index b835604e..2305c66a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,7 @@ -ruamel.yaml>=0.15.5 +ruamel.yaml>=0.15.5,<=0.15.94;python_version == '3.4' +ruamel.yaml>=0.15.42;python_version == '3.7' +ruamel.yaml>=0.15.5;python_version != '3.4' and python_version < '3.7' +ruamel.yaml>=0.15.98;python_version == '3.8' jinja2>=2.7.1 lml>=0.0.9 appdirs>=1.2.0 diff --git a/setup.py b/setup.py index d9b773c2..d6525362 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,15 @@ from shutil import rmtree from setuptools import Command, find_packages, setup +from setuptools import __version__ as setuptools_version +from pkg_resources import parse_version + +import pkg_resources + +try: + import _markerlib.markers +except ImportError: + _markerlib = None PY2 = sys.version_info[0] == 2 PY26 = PY2 and sys.version_info[1] < 7 @@ -67,7 +76,6 @@ ] INSTALL_REQUIRES = [ - "ruamel.yaml>=0.15.5", "jinja2>=2.7.1", "lml>=0.0.9", "appdirs>=1.2.0", @@ -80,6 +88,10 @@ PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests"]) EXTRAS_REQUIRE = { + ":python_version == '3.4'": ["ruamel.yaml>=0.15.5,<=0.15.94"], + ":python_version == '3.7'": ["ruamel.yaml>=0.15.42"], + ":python_version != '3.4' and python_version < '3.7'": ["ruamel.yaml>=0.15.5"], + ":python_version == '3.8'": ["ruamel.yaml>=0.15.98"], } # You do not need to read beyond this line PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) @@ -191,6 +203,48 @@ def filter_out_test_code(file_handle): yield line +# _markerlib.default_environment() obtains its data from _VARS +# and wraps it in another dict, but _markerlib_evaluate writes +# to the dict while it is iterating the keys, causing an error +# on Python 3 only. +# Replace _markerlib.default_environment to return a custom dict +# that has all the necessary markers, and ignores any writes. + +class Python3MarkerDict(dict): + + def __setitem__(self, key, value): + pass + + def pop(self, i=-1): + return self[i] + + +if _markerlib and sys.version_info[0] == 3: + env = _markerlib.markers._VARS + for key in list(env.keys()): + new_key = key.replace(".", "_") + if new_key != key: + env[new_key] = env[key] + + _markerlib.markers._VARS = Python3MarkerDict(env) + + def default_environment(): + return _markerlib.markers._VARS + + _markerlib.default_environment = default_environment + +# Avoid the very buggy pkg_resources.parser, which does not consistently +# recognise the markers needed by this setup.py +# See https://github.com/pypa/packaging/issues/72 for details +# Change this to setuptools 20.10.0 to support all markers. +if pkg_resources: + if parse_version(setuptools_version) < parse_version("18.5"): + MarkerEvaluation = pkg_resources.MarkerEvaluation + + del pkg_resources.parser + pkg_resources.evaluate_marker = MarkerEvaluation._markerlib_evaluate + MarkerEvaluation.evaluate_marker = MarkerEvaluation._markerlib_evaluate + if __name__ == "__main__": setup( test_suite="tests", diff --git a/tests/requirements.txt b/tests/requirements.txt index 2e86b007..c27cb7fb 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -7,4 +7,7 @@ black;python_version>="3.6" isort;python_version>="3.6" moban-handlebars pypi-mobans-pkg +# arrow 0.14.0 doesnt support Python 3.4 +arrow<0.14.0;python_version=="3.4" +arrow;python_version!="3.4" jinja2_time From a1bfd3c184c5b94a5de51384c7b37228e4f8d8ba Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Sat, 13 Jul 2019 09:11:22 +0100 Subject: [PATCH 09/19] Fix filename typos in README --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index dfd13714..528b5aec 100644 --- a/README.rst +++ b/README.rst @@ -163,7 +163,7 @@ It breaks down the given string into a fixed length paragraph. Here is the synta {% endfor %} It is used to keep changelog formatted in -`CHANGELOG.rst.jjs in pypi-mobans project `_ +`CHANGELOG.rst.jj2 in pypi-mobans project `_ github_expand -------------------------------------------------------------------------------- @@ -175,7 +175,7 @@ It expands simple hashtags into github issues. Here is the syntax:: It makes it easy to mention github reference in change log in all projects. Here is the place it is applied: -`CHANGELOG.rst.jjs in pypi-mobans project `_ +`CHANGELOG.rst.jj2 in pypi-mobans project `_ Here is Grammar in the changelog.yml:: From 8bd2511fbf29e7b1288f1138b1f172d0903b4d66 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 19:00:20 +0700 Subject: [PATCH 10/19] :art: lint changelog.yml --- .moban.cd/changelog.yml | 623 +++++++++++++++++++++------------------- CHANGELOG.rst | 4 +- Makefile | 1 + tests/requirements.txt | 1 + 4 files changed, 325 insertions(+), 304 deletions(-) diff --git a/.moban.cd/changelog.yml b/.moban.cd/changelog.yml index 6560d83d..fb0e3148 100644 --- a/.moban.cd/changelog.yml +++ b/.moban.cd/changelog.yml @@ -1,305 +1,324 @@ name: moban organisation: moremoban releases: -- changes: - - action: Updated - details: - - "`#271`: support git branch change in later run." - date: 07.07.2019 - version: 0.4.5 -- changes: - - action: Updated - details: - - "`#265`: Use simple `read binary` to read instead of encoding" - date: 26.05.2019 - version: 0.4.4 -- changes: - - action: Removed - details: - - "`#253`: symbolic link in regression pack causes python setup.py to do recursive include" - - action: Added - details: - - "`#209`: Alert moban user when `git` is not available and is used." - - action: Updated - details: - - "`#261`: since moban group template files per template type, this fill use first come first register to order moban group" - date: 16.03.2019 - version: 0.4.3 -- changes: - - action: Added - details: - - "`#234`: Define template parameters on the fly inside `targets` section" - - "`#62`: select a group target to run" - - action: Updated - details: - - "`#180`: No longer two statistics will be shown in v0.4.x. legacy copy targets are injected into a normal targets. cli target is made a clear priority." - - "`#244`: version 0.4.2 is first version which would work perfectly on windows since 17 Nov 2018. Note that: file permissions are not used on windows. Why the date? because samefile is not avaiable on windows, causing unit tests to fail hence it lead to my conclusion that moban version between 17 Nov 2018 and March 2019 wont work well on Windows." - date: 08.03.2019 - version: 0.4.2 -- changes: - - action: Added - details: - - "`#235`: user defined template types so that custom file extensions, template configurations can be controlled by moban user" - - "`#232`: the package dependencies have been fine tuning to lower versions, most of them are dated back to 2017." - date: 28.02.2019 - version: 0.4.1 -- changes: - - action: Added - details: - - "`#165`: Copy as plugins" - - action: Updated - details: - - "`#219`: git clone depth set to 2" - - "`#186`: lowest dependecy on ruamel.yaml is 0.15.5, Jun 2017" - date: 20.02.2019 - version: 0.4.0 -- changes: - - action: Added - details: - - "`#174`: Store git cache in XDG_CACHE_DIR" - - "`#107`: Add -v to show current moban version" - - "`#164`: support additional data formats" - - action: Updated - details: - - "`#178`: UnboundLocalError: local variable 'target' referenced before assignment" - - "`#169`: uses GitPython instead of barebone git commands" - date: 03.02.2019 - version: 0.3.10 -- changes: - - action: Updated - details: - - "`#90`: allow adding extra jinja2 extensions. `jinja2.ext.do`, `jinja2.ext.loopcontrols` are included by default. what's more, any other template enigne are eligible for extension additions." - - "`#158`: Empty file base_engine.py is finally removed" - date: 18-1-2019 - version: 0.3.9 -- changes: - - action: Updated - details: - - "`#141`: disable file permissions copy feature and not to check file permission changes on windows." - - "`#154`: introduce first ever positional argument for string base template." - - "`#157`: the exit code behavior changed. for backward compactibility please use --exit-code. Otherwise, moban will not tell if there is any changes." - date: 12-1-2019 - version: 0.3.8 -- changes: - - action: Updated - details: - - "`#146`: added a low-setup usage mode via environment variables to moban" - - "`#148`: include test related files in the package for package validation when distributing via linux system, i.e. OpenSuse" - date: 6-1-2019 - version: 0.3.7 -- changes: - - action: Updated - details: - - "`#143`: moban shall report permission error and continue the rest of the copying task." - - "`#122`: Since 0.3.6, moban is tested on windows and macos too, using azure build pipelines. It is already tested extensively on travis-ci on linux os." - date: 30-12-2018 - version: 0.3.6 -- changes: - - action: Updated - details: - - "`#37`: moban will report line number where the value is empty and the name of mobanfile. Switch from pyyaml to ruamel.yaml." - date: 10-12-2018 - version: 0.3.5 -- changes: - - action: Updated - details: - - "`#137`: missing contributors.rst file" - date: 28-11-2018 - version: 0.3.4.1 -- changes: - - action: Added - details: - - "global variables to store the target and template file names in the jinja2 engine" - - "moban-handlebars is tested to work well with this version and above" - - action: Updated - details: - - Template engine interface has been clarified and documented - date: 18-11-2018 - version: 0.3.4 -- changes: - - action: Added - details: - - "alternative and expanded syntax for requires, so as to accomendate github submodule recursive" - date: 05-11-2018 - version: 0.3.3 -- changes: - - action: Added - details: - - "`requires` shall support configuration dirs. In other words, configuration file could be stored in python package or git repository." - date: 04-11-2018 - version: 0.3.2 -- changes: - - action: Added - details: - - "`#97`: requires will clone a repo if given. Note: only github, gitlab, bitbucket for now" - date: 02-11-2018 - version: 0.3.1 -- changes: - - action: Added - details: - - "`#89`: Install pypi-hosted mobans through requires syntax" - - action: Updated - details: - - "`#96`: Fix for FileNotFoundError for plugins" - - "various documentation updates" - - action: Removed - details: - - "`#88`: removed python 2.6 support" - - removed python 3.3 support - date: 27-18-2018 - version: 0.3.0 -- changes: - - action: Added - details: - - "`#32`: option 1 copy a directory without its subdirectories." - - "`#30`: command line template option is ignore when a moban file is present" - date: 14-07-2018 - version: 0.2.4 -- changes: - - action: Added - details: - - "`#76`: running moban as a module from python command" - - "`#32`: copy a directory recusively" - - "`#33`: template all files in a directory" - date: 10-07-2018 - version: 0.2.3 -- changes: - - action: Added - details: - - "`#31`: create directory if missing during copying" - - action: Updated - details: - - "`#28`: if a template has been copied once before, it is skipped in the next moban call" - date: 16-06-2018 - version: 0.2.2 -- changes: - - action: Updated - details: - - templates using the same template engine will be templated as a group - - update lml dependency to 0.0.3 - date: 13-06-2018 - version: 0.2.1 -- changes: - - action: Added - details: - - '`#18`: file exists test' - - "`#23`: custom jinja plugins" - - '`#26`: repr filter' - - "`#47`: allow the expansion of template engine" - - "`#58`: allow template type per template" - - action: Updated - details: - - "`#34`: fix plural message if single file is processed" - date: 11-06-2018 - version: 0.2.0 -- changes: - - action: Updated - details: - - '`#21`: targets become optional' - - "`#19`: transfer symlink's target file's file permission under unix/linux systems" - - '`#16`: introduce copy key word in mobanfile' - date: 29-May-2018 - version: 0.1.4 -- changes: - - action: Updated - details: - - handle unicode on python 2 - date: 12-Mar-2018 - version: 0.1.3 -- changes: - - action: Added - details: - - '`#13`: strip off new lines in the templated file' - date: 10-Jan-2018 - version: 0.1.2 -- changes: - - action: Added - details: - - the ability to present a long text as multi-line paragraph with a custom upper - limit - - 'speical filter expand github references: pull request and issues' - - '`#15`: fix templating syntax to enable python 2.6' - date: 08-Jan-2018 - version: 0.1.1 -- changes: - - action: Added - details: - - '`#14`, provide shell exit code' - date: 19-Dec-2017 - version: 0.1.0 -- changes: - - action: Added - details: - - '`#11`, recognize .moban.yaml as well as .moban.yml.' - - '`#9`, preserve file permissions of the source template.' - - '`-m` option is added to allow you to specify a custom moban file. kinda related - to issue 11.' - - action: Updated - details: - - 'use explicit version name: `moban_file_spec_version` so that `version` can - be used by users. `#10` Please note: moban_file_spec_version is reserved for - future file spec upgrade. For now, all files are assumed to be ''1.0''. When - there comes a new version i.e. 2.0, new moban file based on 2.0 will have to - include ''moban_file_spec_version: 2.0''' - date: 24-Nov-2017 - version: 0.0.9 -- changes: - - action: Added - details: - - '`#8`, verify the existence of custom template and configuration directories. - default .moban.td, .moban.cd are ignored if they do not exist.' - - action: Updated - details: - - Colorize error messages and processing messages. crayons become a dependency. - date: 18-Nov-2017 - version: 0.0.8 -- changes: - - action: Added - details: - - 'Bring the visibility of environment variable into jinja2 templating process: `#7`' - date: 19-Jul-2017 - version: 0.0.7 -- changes: - - action: Added - details: - - added '-f' flag to force moban to template all files despite of .moban.hashes - - action: Updated - details: - - 'moban will not template target file in the situation where the changes occured - in target file than in the source: the template file + the data configuration - after moban has been applied. This new release will remove the change during - mobanization process.' - date: 16-Jun-2017 - version: 0.0.6 -- changes: - - action: Added - details: - - Create a default hash store when processing a moban file. It will save unnecessary - file write to the disc if the rendered content is not changed. - - Added summary reports - date: 17-Mar-2017 - version: 0.0.5 -- changes: - - action: Updated - details: - - Bug fix `#5`, should detect duplicated targets in `.moban.yml` file. - date: 11-May-2016 - version: 0.0.4 -- changes: - - action: Updated - details: - - Bug fix `#4`, keep trailing new lines - date: 09-May-2016 - version: 0.0.3 -- changes: - - action: Updated - details: - - Bug fix `#1`, failed to save utf-8 characters - date: 27-Apr-2016 - version: 0.0.2 -- changes: - - action: Added - details: - - Initial release - date: 23-Mar-2016 - version: 0.0.1 + - changes: + - action: Updated + details: + - "`#271`: support git branch change in later run." + date: 07.07.2019 + version: 0.4.5 + - changes: + - action: Updated + details: + - "`#265`: Use simple `read binary` to read instead of encoding" + date: 26.05.2019 + version: 0.4.4 + - changes: + - action: Removed + details: + - "`#253`: symbolic link in regression pack causes python setup.py to do recursive include" + - action: Added + details: + - "`#209`: Alert moban user when `git` is not available and is used." + - action: Updated + details: + - "`#261`: since moban group template files per template type, + this fill use first come first register to order moban group" + date: 16.03.2019 + version: 0.4.3 + - changes: + - action: Added + details: + - "`#234`: Define template parameters on the fly inside `targets` section" + - "`#62`: select a group target to run" + - action: Updated + details: + - "`#180`: No longer two statistics will be shown in v0.4.x. legacy + copy targets are injected into a normal targets. cli target is made + a clear priority." + - "`#244`: version 0.4.2 is first version which would work perfectly + on windows since 17 Nov 2018. + Note that: file permissions are not used on windows. + Why the date? because samefile is not avaiable on windows, causing + unit tests to fail hence it lead to my conclusion that moban version + between 17 Nov 2018 and March 2019 wont work well on Windows." + date: 08.03.2019 + version: 0.4.2 + - changes: + - action: Added + details: + - "`#235`: user defined template types so that custom file extensions, + template configurations can be controlled by moban user" + - "`#232`: the package dependencies have been fine tuning to lower + versions, most of them are dated back to 2017." + date: 28.02.2019 + version: 0.4.1 + - changes: + - action: Added + details: + - "`#165`: Copy as plugins" + - action: Updated + details: + - "`#219`: git clone depth set to 2" + - "`#186`: lowest dependecy on ruamel.yaml is 0.15.5, Jun 2017" + date: 20.02.2019 + version: 0.4.0 + - changes: + - action: Added + details: + - "`#174`: Store git cache in XDG_CACHE_DIR" + - "`#107`: Add -v to show current moban version" + - "`#164`: support additional data formats" + - action: Updated + details: + - "`#178`: UnboundLocalError: local variable 'target' referenced before assignment" + - "`#169`: uses GitPython instead of barebone git commands" + date: 03.02.2019 + version: 0.3.10 + - changes: + - action: Updated + details: + - "`#90`: allow adding extra jinja2 extensions. `jinja2.ext.do`, + `jinja2.ext.loopcontrols` are included by default. what's more, + any other template enigne are eligible for extension additions." + - "`#158`: Empty file base_engine.py is finally removed" + date: 18-1-2019 + version: 0.3.9 + - changes: + - action: Updated + details: + - "`#141`: disable file permissions copy feature and not to check file permission changes on windows." + - "`#154`: introduce first ever positional argument for string base template." + - "`#157`: the exit code behavior changed. for backward compactibility + please use --exit-code. Otherwise, moban will not tell if there is + any changes." + date: 12-1-2019 + version: 0.3.8 + - changes: + - action: Updated + details: + - "`#146`: added a low-setup usage mode via environment variables to moban" + - "`#148`: include test related files in the package for package + validation when distributing via linux system, i.e. OpenSuse" + date: 6-1-2019 + version: 0.3.7 + - changes: + - action: Updated + details: + - "`#143`: moban shall report permission error and continue the rest of the copying task." + - "`#122`: Since 0.3.6, moban is tested on windows and macos too, + using azure build pipelines. It is already tested extensively on + travis-ci on linux os." + date: 30-12-2018 + version: 0.3.6 + - changes: + - action: Updated + details: + - "`#37`: moban will report line number where the value is empty and + the name of mobanfile. Switch from pyyaml to ruamel.yaml." + date: 10-12-2018 + version: 0.3.5 + - changes: + - action: Updated + details: + - "`#137`: missing contributors.rst file" + date: 28-11-2018 + version: 0.3.4.1 + - changes: + - action: Added + details: + - "global variables to store the target and template file names in the jinja2 engine" + - "moban-handlebars is tested to work well with this version and above" + - action: Updated + details: + - Template engine interface has been clarified and documented + date: 18-11-2018 + version: 0.3.4 + - changes: + - action: Added + details: + - "alternative and expanded syntax for requires, so as to accomendate github submodule recursive" + date: 05-11-2018 + version: 0.3.3 + - changes: + - action: Added + details: + - configuration dirs may be located by `requires`, i.e. + configuration files may be in a python package or git repository. + date: 04-11-2018 + version: 0.3.2 + - changes: + - action: Added + details: + - "`#97`: requires will clone a repo if given. Note: only github, gitlab, bitbucket for now" + date: 02-11-2018 + version: 0.3.1 + - changes: + - action: Added + details: + - "`#89`: Install pypi-hosted mobans through requires syntax" + - action: Updated + details: + - "`#96`: Fix for FileNotFoundError for plugins" + - "various documentation updates" + - action: Removed + details: + - "`#88`: removed python 2.6 support" + - removed python 3.3 support + date: 27-18-2018 + version: 0.3.0 + - changes: + - action: Added + details: + - "`#32`: option 1 copy a directory without its subdirectories." + - "`#30`: command line template option is ignore when a moban file is present" + date: 14-07-2018 + version: 0.2.4 + - changes: + - action: Added + details: + - "`#76`: running moban as a module from python command" + - "`#32`: copy a directory recusively" + - "`#33`: template all files in a directory" + date: 10-07-2018 + version: 0.2.3 + - changes: + - action: Added + details: + - "`#31`: create directory if missing during copying" + - action: Updated + details: + - "`#28`: if a template has been copied once before, it is skipped in the next moban call" + date: 16-06-2018 + version: 0.2.2 + - changes: + - action: Updated + details: + - templates using the same template engine will be templated as a group + - update lml dependency to 0.0.3 + date: 13-06-2018 + version: 0.2.1 + - changes: + - action: Added + details: + - '`#18`: file exists test' + - "`#23`: custom jinja plugins" + - '`#26`: repr filter' + - "`#47`: allow the expansion of template engine" + - "`#58`: allow template type per template" + - action: Updated + details: + - "`#34`: fix plural message if single file is processed" + date: 11-06-2018 + version: 0.2.0 + - changes: + - action: Updated + details: + - '`#21`: targets become optional' + - "`#19`: transfer symlink's target file's file permission under unix/linux systems" + - '`#16`: introduce copy key word in mobanfile' + date: 29-May-2018 + version: 0.1.4 + - changes: + - action: Updated + details: + - handle unicode on python 2 + date: 12-Mar-2018 + version: 0.1.3 + - changes: + - action: Added + details: + - '`#13`: strip off new lines in the templated file' + date: 10-Jan-2018 + version: 0.1.2 + - changes: + - action: Added + details: + - the ability to present a long text as multi-line paragraph with a custom upper + limit + - 'speical filter expand github references: pull request and issues' + - '`#15`: fix templating syntax to enable python 2.6' + date: 08-Jan-2018 + version: 0.1.1 + - changes: + - action: Added + details: + - '`#14`, provide shell exit code' + date: 19-Dec-2017 + version: 0.1.0 + - changes: + - action: Added + details: + - '`#11`, recognize .moban.yaml as well as .moban.yml.' + - '`#9`, preserve file permissions of the source template.' + - '`-m` option is added to allow you to specify a custom moban file. kinda related + to issue 11.' + - action: Updated + details: + - 'use explicit version name: `moban_file_spec_version` so that `version` can + be used by users. `#10` Please note: moban_file_spec_version is reserved for + future file spec upgrade. For now, all files are assumed to be ''1.0''. When + there comes a new version i.e. 2.0, new moban file based on 2.0 will have to + include ''moban_file_spec_version: 2.0''' + date: 24-Nov-2017 + version: 0.0.9 + - changes: + - action: Added + details: + - '`#8`, verify the existence of custom template and configuration directories. + default .moban.td, .moban.cd are ignored if they do not exist.' + - action: Updated + details: + - Colorize error messages and processing messages. crayons become a dependency. + date: 18-Nov-2017 + version: 0.0.8 + - changes: + - action: Added + details: + - 'Bring the visibility of environment variable into jinja2 templating process: `#7`' + date: 19-Jul-2017 + version: 0.0.7 + - changes: + - action: Added + details: + - added '-f' flag to force moban to template all files despite of .moban.hashes + - action: Updated + details: + - 'moban will not template target file in the situation where the changes occured + in target file than in the source: the template file + the data configuration + after moban has been applied. This new release will remove the change during + mobanization process.' + date: 16-Jun-2017 + version: 0.0.6 + - changes: + - action: Added + details: + - Create a default hash store when processing a moban file. It will save unnecessary + file write to the disc if the rendered content is not changed. + - Added summary reports + date: 17-Mar-2017 + version: 0.0.5 + - changes: + - action: Updated + details: + - Bug fix `#5`, should detect duplicated targets in `.moban.yml` file. + date: 11-May-2016 + version: 0.0.4 + - changes: + - action: Updated + details: + - Bug fix `#4`, keep trailing new lines + date: 09-May-2016 + version: 0.0.3 + - changes: + - action: Updated + details: + - Bug fix `#1`, failed to save utf-8 characters + date: 27-Apr-2016 + version: 0.0.2 + - changes: + - action: Added + details: + - Initial release + date: 23-Mar-2016 + version: 0.0.1 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b2a846a4..d1f1d298 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -215,8 +215,8 @@ Added Added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -#. `requires` shall support configuration dirs. In other words, configuration - file could be stored in python package or git repository. +#. configuration dirs may be located by `requires`, i.e. configuration files may + be in a python package or git repository. 0.3.1 - 02-11-2018 -------------------------------------------------------------------------------- diff --git a/Makefile b/Makefile index 6315255a..7deeda0c 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ test: lint: bash lint.sh + yamllint -d "{extends: default, rules: {line-length: {max: 120}}}" .moban.cd/changelog.yml format: isort -y $(find moban -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo) diff --git a/tests/requirements.txt b/tests/requirements.txt index c27cb7fb..a6b17478 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,6 +2,7 @@ nose codecov coverage mock +yamllint flake8 black;python_version>="3.6" isort;python_version>="3.6" From 1f07af49eadef9114f0b9e71bf01e812e05159f3 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 19:02:33 +0700 Subject: [PATCH 11/19] :fast_forward: sync min_requirements.txt --- min_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/min_requirements.txt b/min_requirements.txt index faee8d8f..b5c854ba 100644 --- a/min_requirements.txt +++ b/min_requirements.txt @@ -1,4 +1,4 @@ -ruamel.yaml==0.15.5,<=0.15.94;python_version == '3.4' +ruamel.yaml==0.15.5;python_version == '3.4' ruamel.yaml==0.15.42;python_version == '3.7' ruamel.yaml==0.15.5;python_version != '3.4' and python_version < '3.7' ruamel.yaml==0.15.98;python_version == '3.8' From cdd76b06d8e26688676a54c014a7da9c465a5930 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 19:09:43 +0700 Subject: [PATCH 12/19] :art: lint yaml in tests --- tests/fixtures/.moban-2.yml | 2 +- tests/fixtures/.moban.yml | 2 +- tests/fixtures/child.yaml | 2 +- tests/fixtures/globals/basic.yml | 2 +- tests/fixtures/globals/variables.yml | 2 +- tests/fixtures/jinja_tests/file_tests.yml | 2 +- .../mobanengine/sample_template_type.yml | 16 ++++++++-------- tests/fixtures/orphan.yaml | 2 +- tests/fixtures/simple.yaml | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/fixtures/.moban-2.yml b/tests/fixtures/.moban-2.yml index 5a3af05d..59ed39fc 100644 --- a/tests/fixtures/.moban-2.yml +++ b/tests/fixtures/.moban-2.yml @@ -1,5 +1,5 @@ requires: - - pypi-mobans-pkg + - pypi-mobans-pkg configuration: configuration_dir: "setupmobans:config" template_dir: diff --git a/tests/fixtures/.moban.yml b/tests/fixtures/.moban.yml index 61880192..182a0293 100644 --- a/tests/fixtures/.moban.yml +++ b/tests/fixtures/.moban.yml @@ -1,5 +1,5 @@ requires: - - pypi-mobans-pkg + - pypi-mobans-pkg configuration: template_dir: - "setupmobans:templates" diff --git a/tests/fixtures/child.yaml b/tests/fixtures/child.yaml index 969a4747..4b082225 100644 --- a/tests/fixtures/child.yaml +++ b/tests/fixtures/child.yaml @@ -1,2 +1,2 @@ overrides: base.yaml -key: hello world \ No newline at end of file +key: hello world diff --git a/tests/fixtures/globals/basic.yml b/tests/fixtures/globals/basic.yml index 4f804496..6268fdfc 100644 --- a/tests/fixtures/globals/basic.yml +++ b/tests/fixtures/globals/basic.yml @@ -1 +1 @@ -globals: test \ No newline at end of file +globals: test diff --git a/tests/fixtures/globals/variables.yml b/tests/fixtures/globals/variables.yml index a0067b10..08f1fe69 100644 --- a/tests/fixtures/globals/variables.yml +++ b/tests/fixtures/globals/variables.yml @@ -1 +1 @@ -test: here \ No newline at end of file +test: here diff --git a/tests/fixtures/jinja_tests/file_tests.yml b/tests/fixtures/jinja_tests/file_tests.yml index a0067b10..08f1fe69 100644 --- a/tests/fixtures/jinja_tests/file_tests.yml +++ b/tests/fixtures/jinja_tests/file_tests.yml @@ -1 +1 @@ -test: here \ No newline at end of file +test: here diff --git a/tests/fixtures/mobanengine/sample_template_type.yml b/tests/fixtures/mobanengine/sample_template_type.yml index 60eeb617..75e6d268 100644 --- a/tests/fixtures/mobanengine/sample_template_type.yml +++ b/tests/fixtures/mobanengine/sample_template_type.yml @@ -1,10 +1,10 @@ template_types: custom_jinja: - base_type: jinja2 # use base_type, instead of overrides - file_extensions: - - moban - - new - - demo_file_suffix - options: - extensions: - - jinja2.ext.do + base_type: jinja2 # use base_type, instead of overrides + file_extensions: + - moban + - new + - demo_file_suffix + options: + extensions: + - jinja2.ext.do diff --git a/tests/fixtures/orphan.yaml b/tests/fixtures/orphan.yaml index 9ac4627c..e831e1fc 100644 --- a/tests/fixtures/orphan.yaml +++ b/tests/fixtures/orphan.yaml @@ -1 +1 @@ -overrides: darkmatter.yaml \ No newline at end of file +overrides: darkmatter.yaml diff --git a/tests/fixtures/simple.yaml b/tests/fixtures/simple.yaml index 06e472d1..cfeb9d58 100644 --- a/tests/fixtures/simple.yaml +++ b/tests/fixtures/simple.yaml @@ -1 +1 @@ -simple: yaml \ No newline at end of file +simple: yaml From 628468a7f32429b5c6599813ba2b85b1ab062adb Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 19:49:58 +0700 Subject: [PATCH 13/19] :art: lint yaml in docs --- docs/level-1-jinja2-cli/data.yml | 2 +- docs/level-10-moban-dependency-as-git-repo/.moban.yml | 2 +- docs/level-10-moban-dependency-as-git-repo/config.yml | 2 +- .../local/mytravis.yml | 3 ++- docs/level-11-use-handlebars/.moban.cd/data.base.yaml | 2 +- docs/level-11-use-handlebars/data.yml | 2 +- .../.moban.cd/parent.yaml | 2 +- docs/level-14-custom-data-loader/override_custom.yaml | 2 +- .../.moban.yml | 9 +++++---- .../.moban.yml | 3 ++- docs/level-19-moban-a-sub-group-in-targets/.moban.yml | 9 +++++---- docs/level-2-template-inheritance/data.yml | 2 +- docs/level-3-data-override/.moban.cd/data.base.yaml | 2 +- docs/level-3-data-override/data.yml | 2 +- .../custom-config/data.base.yaml | 2 +- docs/level-5-custom-configuration/data.yml | 2 +- .../custom-config/data.base.yaml | 2 +- docs/level-6-complex-configuration/data.yml | 2 +- docs/level-6-complex-configuration/data2.yml | 2 +- .../config/level8.yml | 2 +- docs/level-9-moban-dependency-as-pypi-package/.moban.yml | 2 +- docs/misc-1-copying-templates/.moban.yml | 3 ++- 22 files changed, 33 insertions(+), 28 deletions(-) diff --git a/docs/level-1-jinja2-cli/data.yml b/docs/level-1-jinja2-cli/data.yml index 0d8e794f..bb56b055 100644 --- a/docs/level-1-jinja2-cli/data.yml +++ b/docs/level-1-jinja2-cli/data.yml @@ -1 +1 @@ -hello: world \ No newline at end of file +hello: world diff --git a/docs/level-10-moban-dependency-as-git-repo/.moban.yml b/docs/level-10-moban-dependency-as-git-repo/.moban.yml index e589b3d2..9286746c 100644 --- a/docs/level-10-moban-dependency-as-git-repo/.moban.yml +++ b/docs/level-10-moban-dependency-as-git-repo/.moban.yml @@ -1,5 +1,5 @@ requires: - - https://github.com/moremoban/pypi-mobans + - https://github.com/moremoban/pypi-mobans configuration: template_dir: - "pypi-mobans:templates" diff --git a/docs/level-10-moban-dependency-as-git-repo/config.yml b/docs/level-10-moban-dependency-as-git-repo/config.yml index da73400d..a4d9f0c9 100644 --- a/docs/level-10-moban-dependency-as-git-repo/config.yml +++ b/docs/level-10-moban-dependency-as-git-repo/config.yml @@ -1,2 +1,2 @@ overrides: data.yml -level10: "moban dependency as git repo" \ No newline at end of file +level10: "moban dependency as git repo" diff --git a/docs/level-10-moban-dependency-as-git-repo/local/mytravis.yml b/docs/level-10-moban-dependency-as-git-repo/local/mytravis.yml index 8295c536..dc7bd8c8 100644 --- a/docs/level-10-moban-dependency-as-git-repo/local/mytravis.yml +++ b/docs/level-10-moban-dependency-as-git-repo/local/mytravis.yml @@ -14,7 +14,8 @@ before_install: - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then mv min_requirements.txt requirements.txt ; fi - - test ! -f rnd_requirements.txt || pip install --no-deps -r rnd_requirements.txt + - test ! -f rnd_requirements.txt || + pip install --no-deps -r rnd_requirements.txt - test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ; - pip install -r tests/requirements.txt script: diff --git a/docs/level-11-use-handlebars/.moban.cd/data.base.yaml b/docs/level-11-use-handlebars/.moban.cd/data.base.yaml index 2c16d47a..3a35fadb 100644 --- a/docs/level-11-use-handlebars/.moban.cd/data.base.yaml +++ b/docs/level-11-use-handlebars/.moban.cd/data.base.yaml @@ -1,2 +1,2 @@ nihao: shijie -hello: shijie \ No newline at end of file +hello: shijie diff --git a/docs/level-11-use-handlebars/data.yml b/docs/level-11-use-handlebars/data.yml index dc8c957d..dd77481e 100644 --- a/docs/level-11-use-handlebars/data.yml +++ b/docs/level-11-use-handlebars/data.yml @@ -1,3 +1,3 @@ overrides: data.base.yaml hello: world -no-inheritance: handlebars does not support inheritance \ No newline at end of file +no-inheritance: handlebars does not support inheritance diff --git a/docs/level-13-any-data-override-any-data/.moban.cd/parent.yaml b/docs/level-13-any-data-override-any-data/.moban.cd/parent.yaml index ff67cd90..69c9ef15 100644 --- a/docs/level-13-any-data-override-any-data/.moban.cd/parent.yaml +++ b/docs/level-13-any-data-override-any-data/.moban.cd/parent.yaml @@ -1,2 +1,2 @@ nihao: shijie from parent.yaml -hello: shijie \ No newline at end of file +hello: shijie diff --git a/docs/level-14-custom-data-loader/override_custom.yaml b/docs/level-14-custom-data-loader/override_custom.yaml index d24ae6b5..80f3b077 100644 --- a/docs/level-14-custom-data-loader/override_custom.yaml +++ b/docs/level-14-custom-data-loader/override_custom.yaml @@ -1,2 +1,2 @@ overrides: parent.custom -hello: world from override_custom.yaml \ No newline at end of file +hello: world from override_custom.yaml diff --git a/docs/level-16-group-targets-using-template-type/.moban.yml b/docs/level-16-group-targets-using-template-type/.moban.yml index 4d661b91..b5ca4d91 100644 --- a/docs/level-16-group-targets-using-template-type/.moban.yml +++ b/docs/level-16-group-targets-using-template-type/.moban.yml @@ -3,7 +3,8 @@ configuration: - template-sources targets: - copy: - - simple.file.copy: file-in-template-sources-folder.txt - - "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt - - "test-dir": dir-for-copying - - "test-recursive-dir": dir-for-recusive-copying/** + - simple.file.copy: file-in-template-sources-folder.txt + - "misc-1-copying/can-create-folder/if-not-exists.txt": + file-in-template-sources-folder.txt + - "test-dir": dir-for-copying + - "test-recursive-dir": dir-for-recusive-copying/** diff --git a/docs/level-17-force-template-type-from-moban-file/.moban.yml b/docs/level-17-force-template-type-from-moban-file/.moban.yml index aefaa37f..68b3ea00 100644 --- a/docs/level-17-force-template-type-from-moban-file/.moban.yml +++ b/docs/level-17-force-template-type-from-moban-file/.moban.yml @@ -4,6 +4,7 @@ configuration: force_template_type: copy targets: - simple.file.copy: file-in-template-sources-folder.txt - - "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt + - "misc-1-copying/can-create-folder/if-not-exists.txt": + file-in-template-sources-folder.txt - "test-dir": dir-for-copying - "test-recursive-dir": dir-for-recusive-copying/** diff --git a/docs/level-19-moban-a-sub-group-in-targets/.moban.yml b/docs/level-19-moban-a-sub-group-in-targets/.moban.yml index 788cf965..af8e6098 100644 --- a/docs/level-19-moban-a-sub-group-in-targets/.moban.yml +++ b/docs/level-19-moban-a-sub-group-in-targets/.moban.yml @@ -5,7 +5,8 @@ configuration: targets: - a.output: a.template.jj2 - copy: - - simple.file.copy: file-in-template-sources-folder.txt - - "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt - - "test-dir": dir-for-copying - - "test-recursive-dir": dir-for-recusive-copying/** + - simple.file.copy: file-in-template-sources-folder.txt + - "misc-1-copying/can-create-folder/if-not-exists.txt": + file-in-template-sources-folder.txt + - "test-dir": dir-for-copying + - "test-recursive-dir": dir-for-recusive-copying/** diff --git a/docs/level-2-template-inheritance/data.yml b/docs/level-2-template-inheritance/data.yml index 0d8e794f..bb56b055 100644 --- a/docs/level-2-template-inheritance/data.yml +++ b/docs/level-2-template-inheritance/data.yml @@ -1 +1 @@ -hello: world \ No newline at end of file +hello: world diff --git a/docs/level-3-data-override/.moban.cd/data.base.yaml b/docs/level-3-data-override/.moban.cd/data.base.yaml index 2c16d47a..3a35fadb 100644 --- a/docs/level-3-data-override/.moban.cd/data.base.yaml +++ b/docs/level-3-data-override/.moban.cd/data.base.yaml @@ -1,2 +1,2 @@ nihao: shijie -hello: shijie \ No newline at end of file +hello: shijie diff --git a/docs/level-3-data-override/data.yml b/docs/level-3-data-override/data.yml index 7813e820..168bfb12 100644 --- a/docs/level-3-data-override/data.yml +++ b/docs/level-3-data-override/data.yml @@ -1,2 +1,2 @@ overrides: data.base.yaml -hello: world \ No newline at end of file +hello: world diff --git a/docs/level-5-custom-configuration/custom-config/data.base.yaml b/docs/level-5-custom-configuration/custom-config/data.base.yaml index 2c16d47a..3a35fadb 100644 --- a/docs/level-5-custom-configuration/custom-config/data.base.yaml +++ b/docs/level-5-custom-configuration/custom-config/data.base.yaml @@ -1,2 +1,2 @@ nihao: shijie -hello: shijie \ No newline at end of file +hello: shijie diff --git a/docs/level-5-custom-configuration/data.yml b/docs/level-5-custom-configuration/data.yml index 7813e820..168bfb12 100644 --- a/docs/level-5-custom-configuration/data.yml +++ b/docs/level-5-custom-configuration/data.yml @@ -1,2 +1,2 @@ overrides: data.base.yaml -hello: world \ No newline at end of file +hello: world diff --git a/docs/level-6-complex-configuration/custom-config/data.base.yaml b/docs/level-6-complex-configuration/custom-config/data.base.yaml index 2c16d47a..3a35fadb 100644 --- a/docs/level-6-complex-configuration/custom-config/data.base.yaml +++ b/docs/level-6-complex-configuration/custom-config/data.base.yaml @@ -1,2 +1,2 @@ nihao: shijie -hello: shijie \ No newline at end of file +hello: shijie diff --git a/docs/level-6-complex-configuration/data.yml b/docs/level-6-complex-configuration/data.yml index 7813e820..168bfb12 100644 --- a/docs/level-6-complex-configuration/data.yml +++ b/docs/level-6-complex-configuration/data.yml @@ -1,2 +1,2 @@ overrides: data.base.yaml -hello: world \ No newline at end of file +hello: world diff --git a/docs/level-6-complex-configuration/data2.yml b/docs/level-6-complex-configuration/data2.yml index 3653190d..e75891e6 100644 --- a/docs/level-6-complex-configuration/data2.yml +++ b/docs/level-6-complex-configuration/data2.yml @@ -1,2 +1,2 @@ overrides: data.base.yaml -hello: world2 \ No newline at end of file +hello: world2 diff --git a/docs/level-8-pass-a-folder-full-of-templates/config/level8.yml b/docs/level-8-pass-a-folder-full-of-templates/config/level8.yml index f888746d..696cde50 100644 --- a/docs/level-8-pass-a-folder-full-of-templates/config/level8.yml +++ b/docs/level-8-pass-a-folder-full-of-templates/config/level8.yml @@ -1 +1 @@ -a: "test" \ No newline at end of file +a: "test" diff --git a/docs/level-9-moban-dependency-as-pypi-package/.moban.yml b/docs/level-9-moban-dependency-as-pypi-package/.moban.yml index 1e67684f..63fbe12f 100644 --- a/docs/level-9-moban-dependency-as-pypi-package/.moban.yml +++ b/docs/level-9-moban-dependency-as-pypi-package/.moban.yml @@ -1,5 +1,5 @@ requires: - - pypi-mobans-pkg + - pypi-mobans-pkg configuration: template_dir: - "pypi-mobans-pkg:templates" diff --git a/docs/misc-1-copying-templates/.moban.yml b/docs/misc-1-copying-templates/.moban.yml index 71d8a3f2..7a895f1b 100644 --- a/docs/misc-1-copying-templates/.moban.yml +++ b/docs/misc-1-copying-templates/.moban.yml @@ -3,6 +3,7 @@ configuration: - template-sources copy: - simple.file.copy: file-in-template-sources-folder.txt - - "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt + - "misc-1-copying/can-create-folder/if-not-exists.txt": + file-in-template-sources-folder.txt - "test-dir": dir-for-copying - "test-recursive-dir": dir-for-recusive-copying/** From fe5d2740ae8439be3f8c16faca0a5556627cb161 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 19:54:51 +0700 Subject: [PATCH 14/19] :art: lint azure yaml files --- .azure-pipelines-steps-macos.yml | 22 +++++++++++----------- .azure-pipelines-steps.yml | 22 +++++++++++----------- azure-pipelines.yml | 21 ++++++++++----------- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/.azure-pipelines-steps-macos.yml b/.azure-pipelines-steps-macos.yml index 81734822..8958395b 100644 --- a/.azure-pipelines-steps-macos.yml +++ b/.azure-pipelines-steps-macos.yml @@ -1,12 +1,12 @@ steps: -- task: UsePythonVersion@0 - displayName: 'Use Python 3.x' -- script: | - python -m pip install --upgrade pip setuptools wheel - test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt - pip install -r requirements.txt - pip install -r tests/requirements.txt - displayName: 'Setup dependencies' -- script: | - make - displayName: 'Run tests' + - task: UsePythonVersion@0 + displayName: 'Use Python 3.x' + - script: | + python -m pip install --upgrade pip setuptools wheel + test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt + pip install -r requirements.txt + pip install -r tests/requirements.txt + displayName: 'Setup dependencies' + - script: | + make + displayName: 'Run tests' diff --git a/.azure-pipelines-steps.yml b/.azure-pipelines-steps.yml index 4fc4925e..2ef569c6 100644 --- a/.azure-pipelines-steps.yml +++ b/.azure-pipelines-steps.yml @@ -1,12 +1,12 @@ steps: -- task: UsePythonVersion@0 - displayName: 'Use Python 3.x' -- script: | - python -m pip install --upgrade pip setuptools wheel - if exist rnd_requirements.txt pip install -r rnd_requirements.txt - pip install -r requirements.txt - pip install -r tests\requirements.txt - displayName: 'Setup dependencies' -- script: | - test.bat - displayName: 'Run tests' + - task: UsePythonVersion@0 + displayName: 'Use Python 3.x' + - script: | + python -m pip install --upgrade pip setuptools wheel + if exist rnd_requirements.txt pip install -r rnd_requirements.txt + pip install -r requirements.txt + pip install -r tests\requirements.txt + displayName: 'Setup dependencies' + - script: | + test.bat + displayName: 'Run tests' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8bcd2991..f4f80f5a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,15 +1,14 @@ # Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml jobs: -- job: 'Windows' - pool: - vmImage: vs2017-win2016 - steps: - - template: '.azure-pipelines-steps.yml' -- job: 'MacOS' - pool: - vmImage: macOS-10.13 - steps: - - template: '.azure-pipelines-steps-macos.yml' + - job: 'Windows' + pool: + vmImage: vs2017-win2016 + steps: + - template: '.azure-pipelines-steps.yml' + - job: 'MacOS' + pool: + vmImage: macOS-10.13 + steps: + - template: '.azure-pipelines-steps-macos.yml' From 0813a2266ccb7104093a427f1354df589ca6b7a3 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 23:28:26 +0700 Subject: [PATCH 15/19] :green_heart: update isort config --- .isort.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.isort.cfg b/.isort.cfg index 091b7305..d76a1394 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -1,9 +1,12 @@ [settings] line_length=79 -known_first_party=lml, jinja2, ruamel.yaml, mock, nose +# Ignore generated files +skip=setup.py, moban/__init__.py +known_first_party=lml, crayons, jinja2, ruamel.yaml, mock, nose indent=' ' multi_line_output=3 length_sort=1 +include_trailing_comma=true default_section=FIRSTPARTY no_lines_before=LOCALFOLDER sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER From 4285385843eef503f562b90f9c3dc21334b3164c Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sat, 13 Jul 2019 21:43:47 +0700 Subject: [PATCH 16/19] :green_heart: Use updated travis template Includes yamllint --- .moban.cd/moban.yml | 3 +- .moban.d/{travis.yml => moban_travis.yml.jj2} | 0 .travis.yml | 29 ++++++++++++++----- Makefile | 6 ++++ mobanfile | 6 ++-- 5 files changed, 33 insertions(+), 11 deletions(-) rename .moban.d/{travis.yml => moban_travis.yml.jj2} (100%) diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 6d06c031..95806f31 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -30,6 +30,7 @@ dependencies: - git-url-parse>=1.2.2 description: Yet another jinja2 cli command for static text generation scm_host: github.com -lint_command: make lint install_test format install update +lint_command: make install_test format git-diff-check lint +moban_command: make update git-diff-check setup_use_markers: true setup_use_markers_fix: true diff --git a/.moban.d/travis.yml b/.moban.d/moban_travis.yml.jj2 similarity index 100% rename from .moban.d/travis.yml rename to .moban.d/moban_travis.yml.jj2 diff --git a/.travis.yml b/.travis.yml index 4e5a12ef..4f34a3e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ - sudo: false dist: xenial language: python @@ -19,34 +18,50 @@ env: stages: - test - lint + - moban .disable_global: &disable_global + addons: false + cache: false + env: {} + python: false before_install: false - install: true + install: false before_script: false + script: false after_success: false after_failure: false + before_deploy: false + deploy: false .lint: &lint <<: *disable_global + git: + submodules: false python: 3.6 stage: lint - install: pip install flake8 - script: make lint install_test format install update + script: make install_test format git-diff-check lint + +.moban: &moban + <<: *disable_global + python: 3.6 + stage: moban + install: pip install moban>=0.0.4 + script: make update git-diff-check jobs: include: + - *moban - *lint stage: test -script: make test - before_install: - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then mv min_requirements.txt requirements.txt ; fi - - test ! -f rnd_requirements.txt || pip install --no-deps -r rnd_requirements.txt + - test ! -f rnd_requirements.txt || + pip install --no-deps -r rnd_requirements.txt - test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ; - pip install -r tests/requirements.txt script: diff --git a/Makefile b/Makefile index 7deeda0c..b7e5f2c3 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ install_test: update: moban -m mobanfile + +git-diff-check: git diff --exit-code test: @@ -16,8 +18,12 @@ test: lint: bash lint.sh yamllint -d "{extends: default, rules: {line-length: {max: 120}}}" .moban.cd/changelog.yml + yamllint -d "{extends: default, ignore: .moban.cd/changelog.yml}" . format: isort -y $(find moban -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo) + git diff black -l 79 moban + git diff black -l 79 tests + git diff diff --git a/mobanfile b/mobanfile index a20f25a1..f82987f7 100644 --- a/mobanfile +++ b/mobanfile @@ -1,8 +1,8 @@ requires: - type: git - url: https://github.com/moremoban/pypi-mobans + url: https://github.com/jayvdb/pypi-mobans submodule: true - branch: dev + branch: use-travis-template configuration: template_dir: - "pypi-mobans:templates" @@ -13,7 +13,7 @@ targets: - moban/__init__.py: __init__.py.jj2 - moban/_version.py: _version.py.jj2 - docs/conf.py: custom_conf.py.jj2 - - .travis.yml: travis.yml + - .travis.yml: moban_travis.yml.jj2 - requirements.txt: requirements.txt.jj2 - .gitignore: moban_gitignore.jj2 - output: CHANGELOG.rst From dc85f722407aea0ffa44410bc17aa9a64cca6108 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sun, 14 Jul 2019 15:39:16 +0700 Subject: [PATCH 17/19] :books: prepare changelog for 0.5.0 --- .moban.cd/changelog.yml | 17 +++++++++++++++++ CHANGELOG.rst | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/.moban.cd/changelog.yml b/.moban.cd/changelog.yml index fb0e3148..a0ede934 100644 --- a/.moban.cd/changelog.yml +++ b/.moban.cd/changelog.yml @@ -1,6 +1,23 @@ name: moban organisation: moremoban releases: + - changes: + - action: Updated + details: + - "`#277`: Restored dependency git-url-parse, replacing incompatible + giturlparse which was used during moban 0.4.x" + - "`#281`: Fixed unicode support on Python 2.7" + - "`#274`: Updated ruamel.yaml dependency pins to restore support for + Python 3.4, and prevent installation of versions that can not be + installed on Python 3.7" + - "`#285`: Fixed CI testing of minimum requirements" + - "`#271`: Fixed repository caching bug preventing branch switching" + - "`#292`: Reformatted YAML files according to yamllint rules" + - "`#291`: Fixed filename typos in README" + - "`#280`: Added CI to ensure repository is in sync with upstream" + - "`#280`: sync setup.py from pypi-mobans" + date: tba + version: 0.5.0 - changes: - action: Updated details: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d1f1d298..14f2e2aa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,33 @@ Change log ================================================================================ +0.5.0 - tba +-------------------------------------------------------------------------------- + +Updated +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +#. `#277 `_: Restored dependency + git-url-parse, replacing incompatible giturlparse which was used during moban + 0.4.x +#. `#281 `_: Fixed unicode + support on Python 2.7 +#. `#274 `_: Updated ruamel.yaml + dependency pins to restore support for Python 3.4, and prevent installation + of versions that can not be installed on Python 3.7 +#. `#285 `_: Fixed CI testing of + minimum requirements +#. `#271 `_: Fixed repository + caching bug preventing branch switching +#. `#292 `_: Reformatted YAML + files according to yamllint rules +#. `#291 `_: Fixed filename typos + in README +#. `#280 `_: Added CI to ensure + repository is in sync with upstream +#. `#280 `_: sync setup.py from + pypi-mobans + 0.4.5 - 07.07.2019 -------------------------------------------------------------------------------- From f0d2df0ac9bc246d687c8a5a199ffaf0ec715162 Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Sun, 14 Jul 2019 19:03:55 +0700 Subject: [PATCH 18/19] :arrow_up: record pypi-mobans dev branch in-sync --- mobanfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobanfile b/mobanfile index f82987f7..38d82987 100644 --- a/mobanfile +++ b/mobanfile @@ -1,8 +1,8 @@ requires: - type: git - url: https://github.com/jayvdb/pypi-mobans + url: https://github.com/moremoban/pypi-mobans submodule: true - branch: use-travis-template + branch: dev configuration: template_dir: - "pypi-mobans:templates" From fd798a0953f8236822a0a64ea6ee0c5db9355049 Mon Sep 17 00:00:00 2001 From: chfw Date: Sun, 14 Jul 2019 15:39:47 +0100 Subject: [PATCH 19/19] :egg: :ferris_wheel: release 0.5.0 --- .moban.cd/changelog.yml | 2 +- .moban.cd/moban.yml | 6 +++--- CHANGELOG.rst | 2 +- docs/conf.py | 4 ++-- moban/_version.py | 2 +- setup.py | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.moban.cd/changelog.yml b/.moban.cd/changelog.yml index a0ede934..bc1ba839 100644 --- a/.moban.cd/changelog.yml +++ b/.moban.cd/changelog.yml @@ -16,7 +16,7 @@ releases: - "`#291`: Fixed filename typos in README" - "`#280`: Added CI to ensure repository is in sync with upstream" - "`#280`: sync setup.py from pypi-mobans" - date: tba + date: 14.07.2019 version: 0.5.0 - changes: - action: Updated diff --git a/.moban.cd/moban.yml b/.moban.cd/moban.yml index 95806f31..2a3dca1f 100644 --- a/.moban.cd/moban.yml +++ b/.moban.cd/moban.yml @@ -4,9 +4,9 @@ organisation: moremoban author: C. W. contact: wangc_2011@hotmail.com license: MIT -version: 0.4.5 -current_version: 0.4.5 -release: 0.4.5 +version: 0.5.0 +current_version: 0.5.0 +release: 0.5.0 branch: master master: index command_line_interface: "moban" diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 14f2e2aa..21e34261 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,7 @@ Change log ================================================================================ -0.5.0 - tba +0.5.0 - 14.07.2019 -------------------------------------------------------------------------------- Updated diff --git a/docs/conf.py b/docs/conf.py index 018af81e..4f768e04 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,9 +25,9 @@ copyright = '2017-2019 Onni Software Ltd.' author = 'C. W.' # The short X.Y version -version = '0.4.5' +version = '0.5.0' # The full version, including alpha/beta/rc tags -release = '0.4.5' +release = '0.5.0' # -- General configuration --------------------------------------------------- diff --git a/moban/_version.py b/moban/_version.py index de146422..b407eb3a 100644 --- a/moban/_version.py +++ b/moban/_version.py @@ -1,2 +1,2 @@ -__version__ = "0.4.5" +__version__ = "0.5.0" __author__ = "C. W." diff --git a/setup.py b/setup.py index d6525362..a7564107 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ NAME = "moban" AUTHOR = "C. W." -VERSION = "0.4.5" +VERSION = "0.5.0" EMAIL = "wangc_2011@hotmail.com" LICENSE = "MIT" ENTRY_POINTS = { @@ -50,7 +50,7 @@ "Yet another jinja2 cli command for static text generation" ) URL = "https://github.com/moremoban/moban" -DOWNLOAD_URL = "%s/archive/0.4.5.tar.gz" % URL +DOWNLOAD_URL = "%s/archive/0.5.0.tar.gz" % URL FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"] KEYWORDS = [ "python", @@ -95,8 +95,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.4.5 " + - "Find 0.4.5 in changelog for more details") +GS_COMMAND = ("gs moban v0.5.0 " + + "Find 0.5.0 in changelog for more details") NO_GS_MESSAGE = ("Automatic github release is disabled. " + "Please install gease to enable it.") UPLOAD_FAILED_MSG = (