Skip to content

Commit 07d2f97

Browse files
authored
Merge pull request #109 from moremoban/dev
release 0.0.7
2 parents 5948547 + 73baef9 commit 07d2f97

18 files changed

+466
-95
lines changed

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Include changes from both sides
2+
changelog.yml merge=union
3+
# Include regenerated files as-is using binary merge driver
4+
CHANGELOG.rst merge=binary

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

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{% extends 'travis.yml.jj2' %}
2+
3+
{% block custom_python_versions %}
4+
python:
5+
- 3.7
6+
- 2.7
7+
{% endblock %}
8+
9+
{% block extra_jobs %}
10+
allow_failures:
11+
- stage: test
12+
{% endblock %}
13+
14+
{% block before_script %}
15+
before_script:
16+
- find templates/ -type f -name '*.jj2' -exec echo '{}' \; |{% raw %}
17+
sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
18+
{% endraw %}
19+
{% endblock %}
20+
21+
{% block script %}
22+
- moban -c config/data.yml -t test.file -td templates .
23+
- {{ test_command }}
24+
{% endblock %}

.travis.yml

+33-14
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,68 @@
11
sudo: false
2+
dist: xenial
23
language: python
3-
python:
4-
- 2.7
5-
- 3.6
64
notifications:
75
email: false
8-
install:
9-
- pip install -r test_requirements.txt -r tests/requirements.txt
6+
python:
7+
- 3.7
8+
- 2.7
9+
1010
stages:
1111
- test
12-
- moban
1312
- lint
13+
- moban
1414

1515
.disable_global: &disable_global
16+
addons: false
17+
cache: false
18+
env: {}
19+
python: false
1620
before_install: false
17-
install: true
21+
install: false
1822
before_script: false
23+
script: false
1924
after_success: false
2025
after_failure: false
26+
before_deploy: false
27+
deploy: false
2128

2229
.lint: &lint
2330
<<: *disable_global
31+
git:
32+
submodules: false
2433
python: 3.6
2534
stage: lint
26-
install: pip install flake8
27-
script: flake8
35+
script: make install_test lint
2836

2937
.moban: &moban
3038
<<: *disable_global
31-
python: 2.7
39+
python: 3.6
3240
stage: moban
3341
install: pip install moban>=0.0.4
34-
script:
35-
- make
42+
script: make upstreaming git-diff-check
3643

3744
jobs:
3845
include:
3946
- *moban
4047
- *lint
4148
allow_failures:
42-
- test
49+
- stage: test
4350

4451
stage: test
4552

53+
before_install:
54+
- if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
55+
mv min_requirements.txt requirements.txt ;
56+
fi
57+
- test ! -f rnd_requirements.txt ||
58+
pip install --no-deps -r rnd_requirements.txt
59+
- test ! -f rnd_requirements.txt || pip install -r rnd_requirements.txt ;
60+
- pip install -r tests/requirements.txt
61+
before_script:
62+
- find templates/ -type f -name '*.jj2' -exec echo '{}' \; |
63+
sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
4664
script:
47-
- find templates/ -type f -name '*.jj2' -exec echo '{}' \;|sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
4865
- moban -c config/data.yml -t test.file -td templates .
4966
- pytest
67+
after_success:
68+
codecov

CHANGELOG.rst

+38
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
Change log
22
================================================================================
33

4+
0.0.7 - 14.07.2019
5+
--------------------------------------------------------------------------------
6+
7+
Updated
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
#. sync templates/docs/make.bat.jj2 to include changes from
11+
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
28+
29+
0.0.6 - 25-05-2019
30+
--------------------------------------------------------------------------------
31+
32+
Updated
33+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34+
35+
#. #87: updated the pipfile syntax
36+
37+
Added
38+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39+
40+
#. #87: Added tests for pipfile generation
41+
442
0.0.5 - 04-05-2019
543
--------------------------------------------------------------------------------
644

Makefile

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
all: upstreaming
2-
31
upstreaming:
42
moban -m mobanfile
53

6-
lint: flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
4+
git-diff-check:
5+
git diff
6+
git diff --ignore-blank-lines | while read line; do if [ "$line" ]; then exit 1; fi; done
7+
8+
install_test:
9+
pip install -r tests/requirements.txt
10+
11+
lint:
12+
flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
13+
yamllint .
714

815
push:
916
git config user.email "[email protected]"
1017
git config user.name "traviscibot"
11-
git add .
12-
git commit -m "Sync templates [skip ci]"
13-
git push https://moremoban:${GITHUB_TOKEN}@github.com/moremoban/pypi-mobans HEAD:moban -f
18+
git commit -am "Sync templates [skip ci]"
19+
if [ $? -eq 0 ]
20+
then
21+
git push https://moremoban:${GITHUB_TOKEN}@github.com/moremoban/pypi-mobans HEAD:moban -f
22+
fi

changelog.yml

+74-44
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,76 @@
1-
name: "pypi-mobans"
1+
name: pypi-mobans
22
organisation: moremoban
33
releases:
4-
- changes:
5-
- action: Updated
6-
details:
7-
- "#75: separate flake8 linting in separate travis job"
8-
- "#72: project and copyright are no longer filled."
9-
- "black style on setup.py, include python 3.7, 3.8 , update gitignore"
10-
date: 04-05-2019
11-
version: 0.0.5
12-
- changes:
13-
- action: Updated
14-
details:
15-
- "travis-ci: uses xenial dist. dropped python 3.4, 3.7-dev and added 3.7, pypy2 and pypy3"
16-
- "added min_requirements.txt where minimum requirements are computed"
17-
- "#71: include tests folder as test_suite if 'tests' folder exists"
18-
- "#16: package data / MANIFEST.in.jj2 is not easy to customise"
19-
- "#14: Mandatory CHANGELOG.rst become optional"
20-
date: 18-02-2019
21-
version: 0.0.4
22-
- changes:
23-
- action: First release
24-
details:
25-
- "bug fix on `PR#60`"
26-
date: 18-01-2019
27-
version: 0.0.3
28-
- changes:
29-
- action: Added
30-
details:
31-
- "`PR#60`: codec and locale hacks added"
32-
- "`PR#61`: add python classifiers"
33-
- action: Updated
34-
details:
35-
- "`PR#63`: updated Pipfile implementation"
36-
- Synchronize with sphinx doc file at release date
37-
date: 18-01-2019
38-
version: 0.0.2
39-
- changes:
40-
- action: First release
41-
details:
42-
- versioning is applied
43-
- Pipfile included
44-
date: 05-11-2018
45-
version: 0.0.1
46-
4+
- changes:
5+
- action: Updated
6+
details:
7+
- sync templates/docs/make.bat.jj2 to include changes from
8+
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
14+
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"
17+
- action: Added
18+
details:
19+
- "#89: setup.py.jj2 support for dependencies using all PEP 508
20+
environment markers; enable setup_use_markers to activate, and
21+
enable setup_use_markers_fix to use with setuptools pre v22"
22+
- "#98: Added .gitattributes to reduce conflicts on changelog.yml"
23+
date: 14.07.2019
24+
version: 0.0.7
25+
- changes:
26+
- action: Updated
27+
details:
28+
- "#87: updated the pipfile syntax"
29+
- action: Added
30+
details:
31+
- "#87: Added tests for pipfile generation"
32+
date: 25-05-2019
33+
version: 0.0.6
34+
- changes:
35+
- action: Updated
36+
details:
37+
- "#75: separate flake8 linting in separate travis job"
38+
- "#72: project and copyright are no longer filled."
39+
- black style on setup.py, include python 3.7, 3.8 , update gitignore
40+
date: 04-05-2019
41+
version: 0.0.5
42+
- changes:
43+
- action: Updated
44+
details:
45+
- "travis-ci: uses xenial dist. dropped python 3.4, 3.7-dev and added
46+
3.7, pypy2 and pypy3"
47+
- 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"
51+
date: 18-02-2019
52+
version: 0.0.4
53+
- changes:
54+
- action: First release
55+
details:
56+
- "bug fix on `PR#60`"
57+
date: 18-01-2019
58+
version: 0.0.3
59+
- changes:
60+
- action: Added
61+
details:
62+
- "`PR#60`: codec and locale hacks added"
63+
- "`PR#61`: add python classifiers"
64+
- action: Updated
65+
details:
66+
- "`PR#63`: updated Pipfile implementation"
67+
- Synchronize with sphinx doc file at release date
68+
date: 18-01-2019
69+
version: 0.0.2
70+
- changes:
71+
- action: First release
72+
details:
73+
- versioning is applied
74+
- Pipfile included
75+
date: 05-11-2018
76+
version: 0.0.1

config/data.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ rsrcdir: docs/source
1616
rbuilddir: docs/_build
1717
version: 0.1.1rc3
1818
mastertocmaxdepth: 3
19+
lint_command: make install_test lint
20+
moban_command: make upstreaming git-diff-check
21+
test_command: pytest

mobanfile

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ configuration:
88
- sphinx:sphinx/templates/quickstart
99
targets:
1010
- .gitignore: gitignore.jj2
11+
- .travis.yml: local-travis.yml.jj2
1112
- LICENSE: NEW_BSD_LICENSE.jj2
1213
- README.rst: local-README.rst.jj2
1314
- output: CHANGELOG.rst

templates/Pipfile.jj2

+36-8
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,23 @@ python_version= '3.6'
88

99
[packages]
1010
{% for dependency in dependencies: %}
11-
{% if ('=' in dependency) or ('>' in dependency) or ('<' in dependency) %}
12-
{{dependency}}
13-
{% else %}
11+
{% if ('>' in dependency) %}
12+
{%- with dep, ver = dependency.split('>') -%}
13+
{{dep}} = '>{{ver}}'
14+
{% endwith %}
15+
{% elif ('<' in dependency) %}
16+
{%- with dep, ver = dependency.split('<') -%}
17+
{{dep}} = '<{{ver}}'
18+
{% endwith %}
19+
{% elif ('~' in dependency) %}
20+
{%- with dep, ver = dependency.split('~') -%}
21+
{{dep}} = '~{{ver}}'
22+
{% endwith %}
23+
{% elif ('=' in dependency) %}
24+
{%- with dep, ver = dependency.split('=', 1) -%}
25+
{{dep}} = '={{ver}}'
26+
{% endwith %}
27+
{%- else -%}
1428
{{dependency}} = "*"
1529
{% endif %}
1630
{% endfor %}
@@ -23,10 +37,24 @@ coverage = "*"
2337
flake8 = "*"
2438
{% if dev_dependencies is defined %}
2539
{% for dependency in dev_dependencies: %}
26-
{% if ('=' in dependency) or ('>' in dependency) or ('<' in dependency) %}
27-
{{dependency}}
28-
{% else %}
40+
{% if ('>' in dependency) %}
41+
{%- with dep, ver = dependency.split('>') -%}
42+
{{dep}} = '>{{ver}}'
43+
{% endwith %}
44+
{% elif ('<' in dependency) %}
45+
{%- with dep, ver = dependency.split('<') -%}
46+
{{dep}} = '<{{ver}}'
47+
{% endwith %}
48+
{% elif ('~' in dependency) %}
49+
{%- with dep, ver = dependency.split('~') -%}
50+
{{dep}} = '~{{ver}}'
51+
{% endwith %}
52+
{% elif ('=' in dependency) %}
53+
{%- with dep, ver = dependency.split('=', 1) -%}
54+
{{dep}} = '={{ver}}'
55+
{% endwith %}
56+
{%- else -%}
2957
{{dependency}} = "*"
30-
{% endif %}
31-
{% endfor %}
58+
{% endif %}
59+
{%- endfor %}
3260
{% endif %}

templates/conf.py.jj2

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DESCRIPTION = (
88
''
99
)
1010
{% set project = name %}
11+
{% set master = 'index' %}
1112
{% set copyright = '{0} {1}'.format(copyright_year, company) %}
1213
{% if sphinx_extensions %}
1314
{% set extensions = sphinx_extensions %}

0 commit comments

Comments
 (0)