Skip to content

Commit 9260b3e

Browse files
committed
🚀 github actions for moban, pypi release and automatically extract contributors
1 parent d739ae7 commit 9260b3e

File tree

8 files changed

+78
-26
lines changed

8 files changed

+78
-26
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ With your PR, here is a check list:
33
- [ ] Has Test cases written
44
- [ ] 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
99
- [ ] 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
10+
- [ ] Please add yourself to 'contributors' section of pyexcel-ods.yml (if not found, please use CONTRIBUTORS.rst)
1211
- [ ] Agree on NEW BSD License for your contribution

.github/workflows/moban-update.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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
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: This is an auto-commit, updating project meta data, such as changelog.rst, contributors.rst

.github/workflows/pythonpublish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up Python
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

CONTRIBUTORS.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
3 contributors
3+
================================================================================
4+
5+
In alphabetical order:
6+
7+
* `Azamat H. Hackimov <https://api.github.com/users/winterheart>`_
8+
* `John Vandenberg <https://api.github.com/users/jayvdb>`_
9+
* `Mateusz Konieczny <https://api.github.com/users/matkoniecz>`_

Makefile

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

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

6-
format:
7-
isort -y $(find pyexcel_ods -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
8-
black -l 79 pyexcel_ods
9-
black -l 79 tests
6+
install_test:
7+
pip install -r tests/requirements.txt
8+
9+
git-diff-check:
10+
git diff --exit-code
1011

1112
lint:
1213
bash lint.sh
14+
15+
format:
16+
bash format.sh
17+
18+
git-diff-check:
19+
git diff --exit-code

README.rst

-16
Original file line numberDiff line numberDiff line change
@@ -367,22 +367,6 @@ Please run::
367367
so as to beautify your code otherwise travis-ci may fail your unit test.
368368

369369

370-
And make sure you would have run moban command
371-
---------------------------------------------------------
372-
373-
Additional steps are required:
374-
375-
#. pip install moban
376-
#. make your changes in `.moban.d` directory, then issue command `moban`
377-
#. moban
378-
379-
otherwise travis-ci may also fail your unit test.
380-
381-
What is .moban.d
382-
---------------------------------
383-
384-
`.moban.d` stores the specific meta data for the library.
385-
386370
Credits
387371
================================================================================
388372

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

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

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-ods"
31-
AUTHOR = "C.W."
31+
AUTHOR = "chfw"
3232
VERSION = "0.5.6"
3333
3434
LICENSE = "New BSD"

0 commit comments

Comments
 (0)