Skip to content

Commit

Permalink
🤝 demo: synchronize generated project with organisation's meta data u…
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Oct 12, 2020
1 parent a76eba1 commit e1382c9
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 32 deletions.
9 changes: 3 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
With your PR, here is a check list:

- [ ] Has Test cases written
- [ ] Has all code lines tested
- [ ] Has test cases written?
- [ ] Has all code lines tested?
- [ ] Has `make format` been run?
- [ ] Has `moban` been run?
- [ ] Please update CHANGELOG.yml(not CHANGELOG.rst)
- [ ] Passes all Travis CI builds
- [ ] Has fair amount of documentation if your change is complex
- [ ] run 'make format' so as to confirm the pyexcel organisation's coding style
- [ ] Please update CHANGELOG.rst
- [ ] Please add yourself to CONTRIBUTORS.rst
- [ ] Agree on NEW BSD License for your contribution
29 changes: 29 additions & 0 deletions .github/workflows/moban-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on: [push]

jobs:
run_moban:
runs-on: ubuntu-latest
name: synchronize templates via moban
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: check changes
run: |
pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
moban
git status
git diff --exit-code
- name: Auto-commit
if: failure()
uses: docker://cdssnc/auto-commit-github-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >-
This is an auto-commit, updating project meta data,
such as changelog.rst, contributors.rst
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stages:
env:
- MINREQ=0
stage: moban
install: pip install moban>=0.0.4 gitfs2 pypifs
install: pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
script:
- moban
- git diff --exit-code
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


No contributors yet
=======================

* Your github link will be listed here after your PR is merged
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2019 by Onni Software Ltd. and its contributors
Copyright (c) 2015-2020 by Onni Software Ltd. and its contributors
All rights reserved.

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

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

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
Expand Down
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
all: test

test:
test: lint
bash test.sh

install_test:
pip install -r tests/requirements.txt

lint:
bash lint.sh

format:
bash format.sh

git-diff-check:
git diff --exit-code
26 changes: 9 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ pyexcel-webio - Let you focus on data, instead of file formats
.. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png
:target: https://www.patreon.com/chfw

.. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
:target: https://awesome-python.com/#specific-formats-processing

.. image:: https://travis-ci.org/pyexcel-webwares/pyexcel-webio.svg?branch=master
:target: http://travis-ci.org/pyexcel-webwares/pyexcel-webio

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

.. 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
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects

.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square
:target: https://github.com/psf/black

Support the project
================================================================================

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

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


And make sure you would have run moban command
---------------------------------------------------------

Additional steps are required:

#. pip install moban
#. make your changes in `.moban.d` directory, then issue command `moban`
#. moban

otherwise travis-ci may also fail your unit test.

What is .moban.d
---------------------------------

`.moban.d` stores the specific meta data for the library.



License
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
# -- Project information -----------------------------------------------------

project = 'pyexcel-webio'
copyright = '2015-2019 Onni Software Ltd.'
author = 'C.W.'
copyright = '2015-2020 Onni Software Ltd.'
author = 'chfw'
# The short X.Y version
version = '0.1.4'
# The full version, including alpha/beta/rc tags
Expand Down
3 changes: 3 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
isort $(find pyexcel_webio -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
black -l 79 pyexcel_webio
black -l 79 tests
2 changes: 2 additions & 0 deletions lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pip install flake8
flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
locale.setlocale(locale.LC_ALL, "en_US.UTF-8")

NAME = "pyexcel-webio"
AUTHOR = "C.W."
AUTHOR = "chfw"
VERSION = "0.1.4"
EMAIL = "[email protected]"
LICENSE = "New BSD"
Expand Down
8 changes: 6 additions & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ mock;python_version<"3"
codecov
coverage
flake8
SQLAlchemy
pyexcel-xls>=0.1.0
black
isort
collective.checkdocs
pygments
moban
moban_jinja2_github

0 comments on commit e1382c9

Please sign in to comment.