Skip to content

Commit

Permalink
Merge pull request #109 from moremoban/dev
Browse files Browse the repository at this point in the history
release 0.0.7
  • Loading branch information
chfw authored Jul 14, 2019
2 parents 5948547 + 73baef9 commit 07d2f97
Show file tree
Hide file tree
Showing 18 changed files with 466 additions and 95 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Include changes from both sides
changelog.yml merge=union
# Include regenerated files as-is using binary merge driver
CHANGELOG.rst merge=binary
24 changes: 24 additions & 0 deletions .moban.dt/local-travis.yml.jj2
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends 'travis.yml.jj2' %}

{% block custom_python_versions %}
python:
- 3.7
- 2.7
{% endblock %}

{% block extra_jobs %}
allow_failures:
- stage: test
{% endblock %}

{% block before_script %}
before_script:
- find templates/ -type f -name '*.jj2' -exec echo '{}' \; |{% raw %}
sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
{% endraw %}
{% endblock %}

{% block script %}
- moban -c config/data.yml -t test.file -td templates .
- {{ test_command }}
{% endblock %}
47 changes: 33 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,68 @@
sudo: false
dist: xenial
language: python
python:
- 2.7
- 3.6
notifications:
email: false
install:
- pip install -r test_requirements.txt -r tests/requirements.txt
python:
- 3.7
- 2.7

stages:
- test
- moban
- 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: flake8
script: make install_test lint

.moban: &moban
<<: *disable_global
python: 2.7
python: 3.6
stage: moban
install: pip install moban>=0.0.4
script:
- make
script: make upstreaming git-diff-check

jobs:
include:
- *moban
- *lint
allow_failures:
- test
- stage: test

stage: 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 -r rnd_requirements.txt ;
- pip install -r tests/requirements.txt
before_script:
- find templates/ -type f -name '*.jj2' -exec echo '{}' \; |
sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
script:
- find templates/ -type f -name '*.jj2' -exec echo '{}' \;|sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
- moban -c config/data.yml -t test.file -td templates .
- pytest
after_success:
codecov
38 changes: 38 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
Change log
================================================================================

0.0.7 - 14.07.2019
--------------------------------------------------------------------------------

Updated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. sync templates/docs/make.bat.jj2 to include changes from
https://github.com/sphinx-doc/sphinx/commit/0dbdae31
#. #100: Fixed travis.yml.jj2 to not emit yamllint errors
#. #101: Fixed travis.yml.jj2 .disable_global to reset `install:`
#. #31: Added test_command to override travis.yml.jj2 use of Makefile
#. #96: Expanded travis.yml.jj2 and use in in the pypi-mobans repo
#. #88: Enhanced min_requirements.txt.jj2 support for dependencies with multiple
constraints such as `>1,<3`
#. #93: Added CI to ensure pypi-mobans is in sync with upstream
#. #99: Formated changelog.yml according to yamllint default rules

Added
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. #89: setup.py.jj2 support for dependencies using all PEP 508 environment
markers; enable setup_use_markers to activate, and enable
setup_use_markers_fix to use with setuptools pre v22
#. #98: Added .gitattributes to reduce conflicts on changelog.yml

0.0.6 - 25-05-2019
--------------------------------------------------------------------------------

Updated
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. #87: updated the pipfile syntax

Added
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. #87: Added tests for pipfile generation

0.0.5 - 04-05-2019
--------------------------------------------------------------------------------

Expand Down
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
all: upstreaming

upstreaming:
moban -m mobanfile

lint: flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
git-diff-check:
git diff
git diff --ignore-blank-lines | while read line; do if [ "$line" ]; then exit 1; fi; done

install_test:
pip install -r tests/requirements.txt

lint:
flake8 . --exclude=.moban.d,docs --builtins=unicode,xrange,long
yamllint .

push:
git config user.email "[email protected]"
git config user.name "traviscibot"
git add .
git commit -m "Sync templates [skip ci]"
git push https://moremoban:${GITHUB_TOKEN}@github.com/moremoban/pypi-mobans HEAD:moban -f
git commit -am "Sync templates [skip ci]"
if [ $? -eq 0 ]
then
git push https://moremoban:${GITHUB_TOKEN}@github.com/moremoban/pypi-mobans HEAD:moban -f
fi
118 changes: 74 additions & 44 deletions changelog.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,76 @@
name: "pypi-mobans"
name: pypi-mobans
organisation: moremoban
releases:
- changes:
- action: Updated
details:
- "#75: separate flake8 linting in separate travis job"
- "#72: project and copyright are no longer filled."
- "black style on setup.py, include python 3.7, 3.8 , update gitignore"
date: 04-05-2019
version: 0.0.5
- changes:
- action: Updated
details:
- "travis-ci: uses xenial dist. dropped python 3.4, 3.7-dev and added 3.7, pypy2 and pypy3"
- "added min_requirements.txt where minimum requirements are computed"
- "#71: include tests folder as test_suite if 'tests' folder exists"
- "#16: package data / MANIFEST.in.jj2 is not easy to customise"
- "#14: Mandatory CHANGELOG.rst become optional"
date: 18-02-2019
version: 0.0.4
- changes:
- action: First release
details:
- "bug fix on `PR#60`"
date: 18-01-2019
version: 0.0.3
- changes:
- action: Added
details:
- "`PR#60`: codec and locale hacks added"
- "`PR#61`: add python classifiers"
- action: Updated
details:
- "`PR#63`: updated Pipfile implementation"
- Synchronize with sphinx doc file at release date
date: 18-01-2019
version: 0.0.2
- changes:
- action: First release
details:
- versioning is applied
- Pipfile included
date: 05-11-2018
version: 0.0.1

- changes:
- action: Updated
details:
- sync templates/docs/make.bat.jj2 to include changes from
https://github.com/sphinx-doc/sphinx/commit/0dbdae31
- "#100: Fixed travis.yml.jj2 to not emit yamllint errors"
- "#101: Fixed travis.yml.jj2 .disable_global to reset `install:`"
- "#31: Added test_command to override travis.yml.jj2 use of Makefile"
- "#96: Expanded travis.yml.jj2 and use in in the pypi-mobans repo"
- "#88: Enhanced min_requirements.txt.jj2 support for dependencies
with multiple constraints such as `>1,<3`"
- "#93: Added CI to ensure pypi-mobans is in sync with upstream"
- "#99: Formated changelog.yml according to yamllint default rules"
- action: Added
details:
- "#89: setup.py.jj2 support for dependencies using all PEP 508
environment markers; enable setup_use_markers to activate, and
enable setup_use_markers_fix to use with setuptools pre v22"
- "#98: Added .gitattributes to reduce conflicts on changelog.yml"
date: 14.07.2019
version: 0.0.7
- changes:
- action: Updated
details:
- "#87: updated the pipfile syntax"
- action: Added
details:
- "#87: Added tests for pipfile generation"
date: 25-05-2019
version: 0.0.6
- changes:
- action: Updated
details:
- "#75: separate flake8 linting in separate travis job"
- "#72: project and copyright are no longer filled."
- black style on setup.py, include python 3.7, 3.8 , update gitignore
date: 04-05-2019
version: 0.0.5
- changes:
- action: Updated
details:
- "travis-ci: uses xenial dist. dropped python 3.4, 3.7-dev and added
3.7, pypy2 and pypy3"
- added min_requirements.txt where minimum requirements are computed
- "#71: include tests folder as test_suite if 'tests' folder exists"
- "#16: package data / MANIFEST.in.jj2 is not easy to customise"
- "#14: Mandatory CHANGELOG.rst become optional"
date: 18-02-2019
version: 0.0.4
- changes:
- action: First release
details:
- "bug fix on `PR#60`"
date: 18-01-2019
version: 0.0.3
- changes:
- action: Added
details:
- "`PR#60`: codec and locale hacks added"
- "`PR#61`: add python classifiers"
- action: Updated
details:
- "`PR#63`: updated Pipfile implementation"
- Synchronize with sphinx doc file at release date
date: 18-01-2019
version: 0.0.2
- changes:
- action: First release
details:
- versioning is applied
- Pipfile included
date: 05-11-2018
version: 0.0.1
3 changes: 3 additions & 0 deletions config/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ rsrcdir: docs/source
rbuilddir: docs/_build
version: 0.1.1rc3
mastertocmaxdepth: 3
lint_command: make install_test lint
moban_command: make upstreaming git-diff-check
test_command: pytest
1 change: 1 addition & 0 deletions mobanfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ configuration:
- sphinx:sphinx/templates/quickstart
targets:
- .gitignore: gitignore.jj2
- .travis.yml: local-travis.yml.jj2
- LICENSE: NEW_BSD_LICENSE.jj2
- README.rst: local-README.rst.jj2
- output: CHANGELOG.rst
Expand Down
44 changes: 36 additions & 8 deletions templates/Pipfile.jj2
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,23 @@ python_version= '3.6'

[packages]
{% for dependency in dependencies: %}
{% if ('=' in dependency) or ('>' in dependency) or ('<' in dependency) %}
{{dependency}}
{% else %}
{% if ('>' in dependency) %}
{%- with dep, ver = dependency.split('>') -%}
{{dep}} = '>{{ver}}'
{% endwith %}
{% elif ('<' in dependency) %}
{%- with dep, ver = dependency.split('<') -%}
{{dep}} = '<{{ver}}'
{% endwith %}
{% elif ('~' in dependency) %}
{%- with dep, ver = dependency.split('~') -%}
{{dep}} = '~{{ver}}'
{% endwith %}
{% elif ('=' in dependency) %}
{%- with dep, ver = dependency.split('=', 1) -%}
{{dep}} = '={{ver}}'
{% endwith %}
{%- else -%}
{{dependency}} = "*"
{% endif %}
{% endfor %}
Expand All @@ -23,10 +37,24 @@ coverage = "*"
flake8 = "*"
{% if dev_dependencies is defined %}
{% for dependency in dev_dependencies: %}
{% if ('=' in dependency) or ('>' in dependency) or ('<' in dependency) %}
{{dependency}}
{% else %}
{% if ('>' in dependency) %}
{%- with dep, ver = dependency.split('>') -%}
{{dep}} = '>{{ver}}'
{% endwith %}
{% elif ('<' in dependency) %}
{%- with dep, ver = dependency.split('<') -%}
{{dep}} = '<{{ver}}'
{% endwith %}
{% elif ('~' in dependency) %}
{%- with dep, ver = dependency.split('~') -%}
{{dep}} = '~{{ver}}'
{% endwith %}
{% elif ('=' in dependency) %}
{%- with dep, ver = dependency.split('=', 1) -%}
{{dep}} = '={{ver}}'
{% endwith %}
{%- else -%}
{{dependency}} = "*"
{% endif %}
{% endfor %}
{% endif %}
{%- endfor %}
{% endif %}
1 change: 1 addition & 0 deletions templates/conf.py.jj2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DESCRIPTION = (
''
)
{% set project = name %}
{% set master = 'index' %}
{% set copyright = '{0} {1}'.format(copyright_year, company) %}
{% if sphinx_extensions %}
{% set extensions = sphinx_extensions %}
Expand Down
Loading

0 comments on commit 07d2f97

Please sign in to comment.