Skip to content

Commit e1382c9

Browse files
committed
🤝 demo: synchronize generated project with organisation's meta data using moban. MolSSI/cookiecutter-cms#81
1 parent a76eba1 commit e1382c9

12 files changed

+76
-32
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
With your PR, here is a check list:
22

3-
- [ ] Has Test cases written
4-
- [ ] Has all code lines tested
3+
- [ ] Has test cases written?
4+
- [ ] Has all code lines tested?
55
- [ ] Has `make format` been run?
6-
- [ ] Has `moban` been run?
6+
- [ ] Please update CHANGELOG.yml(not CHANGELOG.rst)
77
- [ ] Passes all Travis CI builds
88
- [ ] Has fair amount of documentation if your change is complex
9-
- [ ] run 'make format' so as to confirm the pyexcel organisation's coding style
10-
- [ ] Please update CHANGELOG.rst
11-
- [ ] Please add yourself to CONTRIBUTORS.rst
129
- [ ] Agree on NEW BSD License for your contribution

.github/workflows/moban-update.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on: [push]
2+
3+
jobs:
4+
run_moban:
5+
runs-on: ubuntu-latest
6+
name: synchronize templates via moban
7+
steps:
8+
- uses: actions/checkout@v2
9+
with:
10+
ref: ${{ github.head_ref }}
11+
- name: Set up Python
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: '3.7'
15+
- name: check changes
16+
run: |
17+
pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
18+
moban
19+
git status
20+
git diff --exit-code
21+
- name: Auto-commit
22+
if: failure()
23+
uses: docker://cdssnc/auto-commit-github-action
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
args: >-
28+
This is an auto-commit, updating project meta data,
29+
such as changelog.rst, contributors.rst

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ stages:
3232
env:
3333
- MINREQ=0
3434
stage: moban
35-
install: pip install moban>=0.0.4 gitfs2 pypifs
35+
install: pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
3636
script:
3737
- moban
3838
- git diff --exit-code

CONTRIBUTORS.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
3+
No contributors yet
4+
=======================
5+
6+
* Your github link will be listed here after your PR is merged

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015-2019 by Onni Software Ltd. and its contributors
1+
Copyright (c) 2015-2020 by Onni Software Ltd. and its contributors
22
All rights reserved.
33

44
Redistribution and use in source and binary forms of the software as well
@@ -13,7 +13,7 @@ that the following conditions are met:
1313
and/or other materials provided with the distribution.
1414

1515
* Neither the name of 'pyexcel-webio' nor the names of the contributors
16-
may be used to endorse or promote products derived from this software
16+
may not be used to endorse or promote products derived from this software
1717
without specific prior written permission.
1818

1919
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND

Makefile

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
all: test
22

3-
test:
3+
test: lint
44
bash test.sh
55

6+
install_test:
7+
pip install -r tests/requirements.txt
8+
9+
lint:
10+
bash lint.sh
11+
12+
format:
13+
bash format.sh
14+
15+
git-diff-check:
16+
git diff --exit-code

README.rst

+9-17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ pyexcel-webio - Let you focus on data, instead of file formats
55
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
66
:target: https://www.patreon.com/chfw
77

8+
.. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
9+
:target: https://awesome-python.com/#specific-formats-processing
10+
811
.. image:: https://travis-ci.org/pyexcel-webwares/pyexcel-webio.svg?branch=master
912
:target: http://travis-ci.org/pyexcel-webwares/pyexcel-webio
1013

@@ -22,12 +25,17 @@ pyexcel-webio - Let you focus on data, instead of file formats
2225
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
2326
:target: https://gitter.im/pyexcel/Lobby
2427

28+
.. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square
29+
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects
30+
31+
.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square
32+
:target: https://github.com/psf/black
2533

2634
Support the project
2735
================================================================================
2836

2937
If your company has embedded pyexcel and its components into a revenue generating
30-
product, please support me on `patreon <https://www.patreon.com/bePatron?u=5537627>`_
38+
product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_
3139
or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain
3240
the project and develop it further.
3341

@@ -201,22 +209,6 @@ Please run::
201209
so as to beautify your code otherwise travis-ci may fail your unit test.
202210

203211

204-
And make sure you would have run moban command
205-
---------------------------------------------------------
206-
207-
Additional steps are required:
208-
209-
#. pip install moban
210-
#. make your changes in `.moban.d` directory, then issue command `moban`
211-
#. moban
212-
213-
otherwise travis-ci may also fail your unit test.
214-
215-
What is .moban.d
216-
---------------------------------
217-
218-
`.moban.d` stores the specific meta data for the library.
219-
220212

221213

222214
License

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
# -- Project information -----------------------------------------------------
2323

2424
project = 'pyexcel-webio'
25-
copyright = '2015-2019 Onni Software Ltd.'
26-
author = 'C.W.'
25+
copyright = '2015-2020 Onni Software Ltd.'
26+
author = 'chfw'
2727
# The short X.Y version
2828
version = '0.1.4'
2929
# The full version, including alpha/beta/rc tags

format.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
isort $(find pyexcel_webio -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
2+
black -l 79 pyexcel_webio
3+
black -l 79 tests

lint.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pip install flake8
2+
flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
2929

3030
NAME = "pyexcel-webio"
31-
AUTHOR = "C.W."
31+
AUTHOR = "chfw"
3232
VERSION = "0.1.4"
3333
3434
LICENSE = "New BSD"

tests/requirements.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ mock;python_version<"3"
33
codecov
44
coverage
55
flake8
6-
SQLAlchemy
7-
pyexcel-xls>=0.1.0
6+
black
7+
isort
8+
collective.checkdocs
9+
pygments
10+
moban
11+
moban_jinja2_github

0 commit comments

Comments
 (0)