Skip to content

Commit 1703ca2

Browse files
authored
Merge pull request #124 from moremoban/dev
release 0.0.8
2 parents 07d2f97 + 6e469f2 commit 1703ca2

16 files changed

+102
-72
lines changed

.moban.dt/local-travis.yml.jj2

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ before_script:
2020

2121
{% block script %}
2222
- moban -c config/data.yml -t test.file -td templates .
23+
- pip freeze
2324
- {{ test_command }}
2425
{% endblock %}

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ python:
88
- 2.7
99

1010
stages:
11-
- test
1211
- lint
1312
- moban
13+
- test
1414

1515
.disable_global: &disable_global
1616
addons: false
@@ -63,6 +63,7 @@ before_script:
6363
sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
6464
script:
6565
- moban -c config/data.yml -t test.file -td templates .
66+
- pip freeze
6667
- pytest
6768
after_success:
6869
codecov

CHANGELOG.rst

+59-41
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,107 @@
11
Change log
22
================================================================================
33

4+
0.0.8 - 13.10.2019
5+
--------------------------------------------------------------------------------
6+
7+
**Fixed**
8+
9+
#. `#114 <https://github.com/moremoban/pypi-mobans/issues/114>`_: setup.py.jj2
10+
gets default console_scripts entry always
11+
#. `#120 <https://github.com/moremoban/pypi-mobans/issues/120>`_: changelog rst
12+
syntax cause 400 error
13+
#. `#122 <https://github.com/moremoban/pypi-mobans/issues/122>`_:
14+
UPLOAD_FAILED_MSG cannot be formatted
15+
416
0.0.7 - 14.07.2019
517
--------------------------------------------------------------------------------
618

7-
Updated
8-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19+
**Updated**
920

1021
#. sync templates/docs/make.bat.jj2 to include changes from
1122
https://github.com/sphinx-doc/sphinx/commit/0dbdae31
12-
#. #100: Fixed travis.yml.jj2 to not emit yamllint errors
13-
#. #101: Fixed travis.yml.jj2 .disable_global to reset `install:`
14-
#. #31: Added test_command to override travis.yml.jj2 use of Makefile
15-
#. #96: Expanded travis.yml.jj2 and use in in the pypi-mobans repo
16-
#. #88: Enhanced min_requirements.txt.jj2 support for dependencies with multiple
17-
constraints such as `>1,<3`
18-
#. #93: Added CI to ensure pypi-mobans is in sync with upstream
19-
#. #99: Formated changelog.yml according to yamllint default rules
20-
21-
Added
22-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23-
24-
#. #89: setup.py.jj2 support for dependencies using all PEP 508 environment
25-
markers; enable setup_use_markers to activate, and enable
26-
setup_use_markers_fix to use with setuptools pre v22
27-
#. #98: Added .gitattributes to reduce conflicts on changelog.yml
23+
#. `#100 <https://github.com/moremoban/pypi-mobans/issues/100>`_: Fixed
24+
travis.yml.jj2 to not emit yamllint errors
25+
#. `#101 <https://github.com/moremoban/pypi-mobans/issues/101>`_: Fixed
26+
travis.yml.jj2 .disable_global to reset `install:`
27+
#. `#31 <https://github.com/moremoban/pypi-mobans/issues/31>`_: Added
28+
test_command to override travis.yml.jj2 use of Makefile
29+
#. `#96 <https://github.com/moremoban/pypi-mobans/issues/96>`_: Expanded
30+
travis.yml.jj2 and use in in the pypi-mobans repo
31+
#. `#88 <https://github.com/moremoban/pypi-mobans/issues/88>`_: Enhanced
32+
min_requirements.txt.jj2 support for dependencies with multiple constraints
33+
such as `>1,<3`
34+
#. `#93 <https://github.com/moremoban/pypi-mobans/issues/93>`_: Added CI to
35+
ensure pypi-mobans is in sync with upstream
36+
#. `#99 <https://github.com/moremoban/pypi-mobans/issues/99>`_: Formated
37+
changelog.yml according to yamllint default rules
38+
39+
**Added**
40+
41+
#. `#89 <https://github.com/moremoban/pypi-mobans/issues/89>`_: setup.py.jj2
42+
support for dependencies using all PEP 508 environment markers; enable
43+
setup_use_markers to activate, and enable setup_use_markers_fix to use with
44+
setuptools pre v22
45+
#. `#98 <https://github.com/moremoban/pypi-mobans/issues/98>`_: Added
46+
.gitattributes to reduce conflicts on changelog.yml
2847

2948
0.0.6 - 25-05-2019
3049
--------------------------------------------------------------------------------
3150

32-
Updated
33-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51+
**Updated**
3452

35-
#. #87: updated the pipfile syntax
53+
#. `#87 <https://github.com/moremoban/pypi-mobans/issues/87>`_: updated the
54+
pipfile syntax
3655

37-
Added
38-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56+
**Added**
3957

40-
#. #87: Added tests for pipfile generation
58+
#. `#87 <https://github.com/moremoban/pypi-mobans/issues/87>`_: Added tests for
59+
pipfile generation
4160

4261
0.0.5 - 04-05-2019
4362
--------------------------------------------------------------------------------
4463

45-
Updated
46-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
**Updated**
4765

48-
#. #75: separate flake8 linting in separate travis job
49-
#. #72: project and copyright are no longer filled.
66+
#. `#75 <https://github.com/moremoban/pypi-mobans/issues/75>`_: separate flake8
67+
linting in separate travis job
68+
#. `#72 <https://github.com/moremoban/pypi-mobans/issues/72>`_: project and
69+
copyright are no longer filled.
5070
#. black style on setup.py, include python 3.7, 3.8 , update gitignore
5171

5272
0.0.4 - 18-02-2019
5373
--------------------------------------------------------------------------------
5474

55-
Updated
56-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75+
**Updated**
5776

5877
#. travis-ci: uses xenial dist. dropped python 3.4, 3.7-dev and added 3.7, pypy2
5978
and pypy3
6079
#. added min_requirements.txt where minimum requirements are computed
61-
#. #71: include tests folder as test_suite if 'tests' folder exists
62-
#. #16: package data / MANIFEST.in.jj2 is not easy to customise
63-
#. #14: Mandatory CHANGELOG.rst become optional
80+
#. `#71 <https://github.com/moremoban/pypi-mobans/issues/71>`_: include tests
81+
folder as test_suite if 'tests' folder exists
82+
#. `#16 <https://github.com/moremoban/pypi-mobans/issues/16>`_: package data /
83+
MANIFEST.in.jj2 is not easy to customise
84+
#. `#14 <https://github.com/moremoban/pypi-mobans/issues/14>`_: Mandatory
85+
CHANGELOG.rst become optional
6486

6587
0.0.3 - 18-01-2019
6688
--------------------------------------------------------------------------------
6789

68-
First release
69-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90+
**First release**
7091

7192
#. bug fix on `#60 <https://github.com/moremoban/pypi-mobans/pull/60>`_
7293

7394
0.0.2 - 18-01-2019
7495
--------------------------------------------------------------------------------
7596

76-
Added
77-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
97+
**Added**
7898

7999
#. `#60 <https://github.com/moremoban/pypi-mobans/pull/60>`_: codec and locale
80100
hacks added
81101
#. `#61 <https://github.com/moremoban/pypi-mobans/pull/61>`_: add python
82102
classifiers
83103

84-
Updated
85-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104+
**Updated**
86105

87106
#. `#63 <https://github.com/moremoban/pypi-mobans/pull/63>`_: updated Pipfile
88107
implementation
@@ -91,8 +110,7 @@ Updated
91110
0.0.1 - 05-11-2018
92111
--------------------------------------------------------------------------------
93112

94-
First release
95-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113+
**First release**
96114

97115
#. versioning is applied
98116
#. Pipfile included

changelog.yml

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
name: pypi-mobans
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Fixed
6+
details:
7+
- "`#114`: setup.py.jj2 gets default console_scripts entry always"
8+
- "`#120`: changelog rst syntax cause 400 error"
9+
- "`#122`: UPLOAD_FAILED_MSG cannot be formatted"
10+
date: 13.10.2019
11+
version: 0.0.8
412
- changes:
513
- action: Updated
614
details:
715
- sync templates/docs/make.bat.jj2 to include changes from
816
https://github.com/sphinx-doc/sphinx/commit/0dbdae31
9-
- "#100: Fixed travis.yml.jj2 to not emit yamllint errors"
10-
- "#101: Fixed travis.yml.jj2 .disable_global to reset `install:`"
11-
- "#31: Added test_command to override travis.yml.jj2 use of Makefile"
12-
- "#96: Expanded travis.yml.jj2 and use in in the pypi-mobans repo"
13-
- "#88: Enhanced min_requirements.txt.jj2 support for dependencies
17+
- "`#100`: Fixed travis.yml.jj2 to not emit yamllint errors"
18+
- "`#101`: Fixed travis.yml.jj2 .disable_global to reset `install:`"
19+
- "`#31`: Added test_command to override travis.yml.jj2 use of
20+
Makefile"
21+
- "`#96`: Expanded travis.yml.jj2 and use in in the pypi-mobans repo"
22+
- "`#88`: Enhanced min_requirements.txt.jj2 support for dependencies
1423
with multiple constraints such as `>1,<3`"
15-
- "#93: Added CI to ensure pypi-mobans is in sync with upstream"
16-
- "#99: Formated changelog.yml according to yamllint default rules"
24+
- "`#93`: Added CI to ensure pypi-mobans is in sync with upstream"
25+
- "`#99`: Formated changelog.yml according to yamllint default rules"
1726
- action: Added
1827
details:
19-
- "#89: setup.py.jj2 support for dependencies using all PEP 508
28+
- "`#89`: setup.py.jj2 support for dependencies using all PEP 508
2029
environment markers; enable setup_use_markers to activate, and
2130
enable setup_use_markers_fix to use with setuptools pre v22"
22-
- "#98: Added .gitattributes to reduce conflicts on changelog.yml"
31+
- "`#98`: Added .gitattributes to reduce conflicts on changelog.yml"
2332
date: 14.07.2019
2433
version: 0.0.7
2534
- changes:
2635
- action: Updated
2736
details:
28-
- "#87: updated the pipfile syntax"
37+
- "`#87`: updated the pipfile syntax"
2938
- action: Added
3039
details:
31-
- "#87: Added tests for pipfile generation"
40+
- "`#87`: Added tests for pipfile generation"
3241
date: 25-05-2019
3342
version: 0.0.6
3443
- changes:
3544
- action: Updated
3645
details:
37-
- "#75: separate flake8 linting in separate travis job"
38-
- "#72: project and copyright are no longer filled."
46+
- "`#75`: separate flake8 linting in separate travis job"
47+
- "`#72`: project and copyright are no longer filled."
3948
- black style on setup.py, include python 3.7, 3.8 , update gitignore
4049
date: 04-05-2019
4150
version: 0.0.5
@@ -45,9 +54,9 @@ releases:
4554
- "travis-ci: uses xenial dist. dropped python 3.4, 3.7-dev and added
4655
3.7, pypy2 and pypy3"
4756
- added min_requirements.txt where minimum requirements are computed
48-
- "#71: include tests folder as test_suite if 'tests' folder exists"
49-
- "#16: package data / MANIFEST.in.jj2 is not easy to customise"
50-
- "#14: Mandatory CHANGELOG.rst become optional"
57+
- "`#71`: include tests folder as test_suite if 'tests' folder exists"
58+
- "`#16`: package data / MANIFEST.in.jj2 is not easy to customise"
59+
- "`#14`: Mandatory CHANGELOG.rst become optional"
5160
date: 18-02-2019
5261
version: 0.0.4
5362
- changes:

mobanfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
requires:
2-
- https://github.com/sphinx-doc/sphinx.git
31
configuration:
42
configuration: config/data.yml
53
template_dir:
64
- .moban.dt
75
- templates
8-
- sphinx:sphinx/templates/quickstart
6+
- "git://github.com/sphinx-doc/sphinx.git!/sphinx/templates/quickstart"
97
targets:
108
- .gitignore: gitignore.jj2
119
- .travis.yml: local-travis.yml.jj2

templates/CHANGELOG.rst.jj2

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Change log
66
--------------------------------------------------------------------------------
77

88
{% for change in release.changes %}
9-
{{change.action}}
10-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
**{{change.action}}**
1110

1211
{% for item in change.details %}
1312
{% if item is mapping %}

templates/docs/Makefile.jj2

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+

templates/docs/conf.py_t

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# This file only contains a selection of the most common options. For a full
44
# list see the documentation:
5-
# http://www.sphinx-doc.org/en/master/config
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
66

77
# -- Path setup --------------------------------------------------------------
88

@@ -105,7 +105,7 @@ html_static_path = ['{{ dot }}static']
105105
# -- Options for intersphinx extension ---------------------------------------
106106

107107
# Example configuration for intersphinx: refer to the Python standard library.
108-
intersphinx_mapping = {'https://docs.python.org/': None}
108+
intersphinx_mapping = {'https://docs.python.org/3/': None}
109109
{%- endif %}
110110
{%- if 'sphinx.ext.todo' in extensions %}
111111

templates/docs/make.bat.jj2

+1
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ goto end
3333

3434
:end
3535
popd
36+

templates/docs/master_doc.rst_t

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Indices and tables
1818
* :ref:`genindex`
1919
* :ref:`modindex`
2020
* :ref:`search`
21+

templates/lint.script.jj2

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pip install flake8
2-
flake8 . --exclude=.moban.d,docs {%block flake8_options%}--builtins=unicode,xrange,long{%endblock%}
2+
flake8 . --exclude=.moban.d,docs,setup.py {%block flake8_options%}--builtins=unicode,xrange,long{%endblock%}

templates/setup.py.jj2

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ MAINTAINER_CONTACT = "{{maintainer_contact}}"
8888
{% endif %}
8989
{% if command_line_interface or entry_points %}
9090
ENTRY_POINTS = {
91-
{% if not entry_points or 'console_scripts' not in entry_points %}
91+
{% if (not entry_points or 'console_scripts' not in entry_points) and command_line_interface %}
9292
"console_scripts": [
9393
"{{command_line_interface}} = {{ entry_point }}"
9494
],
@@ -298,7 +298,7 @@ class PublishCommand(Command):
298298
self.status(NO_GS_MESSAGE)
299299
if run_status:
300300
if os.system(PUBLISH_COMMAND) != 0:
301-
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)
301+
self.status(UPLOAD_FAILED_MSG)
302302

303303
sys.exit()
304304

templates/travis.yml.jj2

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ python:
3232

3333
{% block stages %}
3434
stages:
35-
- test
3635
{% if lint_command != False %}
3736
- lint
3837
{% endif %}
3938
{% if moban_command != False %}
4039
- moban
4140
{% endif %}
41+
- test
4242

4343
{% endblock %}
4444
.disable_global: &disable_global

tests/fixtures/setup.py.output

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class PublishCommand(Command):
111111
self.status(NO_GS_MESSAGE)
112112
if run_status:
113113
if os.system(PUBLISH_COMMAND) != 0:
114-
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)
114+
self.status(UPLOAD_FAILED_MSG)
115115

116116
sys.exit()
117117

tests/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
codecov
2-
moban>=0.0.4
2+
moban>=0.6.4
33
pytest~=3.6.1
44
flake8
55
yamllint

tests/test_utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import os
22

33
from moban.jinja2.engine import Engine
4+
from moban.externals import file_system
45

56
PATH_TO_TEMPLATES = './templates'
67

78

89
def get_rendered_file(filename, context):
9-
engine = Engine([PATH_TO_TEMPLATES])
10+
engine = Engine(file_system.get_multi_fs([PATH_TO_TEMPLATES]))
1011
template = engine.get_template(filename)
1112
rendered = engine.apply_template(template, context, '')
1213
return rendered

0 commit comments

Comments
 (0)