Skip to content

Commit 5c114e0

Browse files
authored
Merge pull request #150 from moremoban/dev
release 0.0.12
2 parents fedfc2b + d79c42e commit 5c114e0

13 files changed

+244
-33
lines changed

.moban.dt/local-README.rst.jj2

Lines changed: 67 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55

66
{% block features %}
77
{{description}}
8+
9+
10+
create a blank python package that is usable and ready to push to github. And future
11+
updates on your organisation's specific static information can be instantly applies the
12+
update accurately using `moban`_. Here is a list of features:
13+
14+
#. core python package
15+
#. test configuration setup
16+
#. ready to commit github repository
17+
#. automated upload to pypi via github actions
18+
#. version management through jinja2
19+
#. automatic extraction of github contributors
20+
#. semi-automatic change log generation
21+
822
It is used with `yehua <https://github.com/chfw/yehua>`_.
923
Organisations using it:
1024

@@ -16,6 +30,54 @@ Organisations using it:
1630
Features
1731
================================================================================
1832

33+
Feature comparision
34+
--------------------------------------------------------------------------------
35+
36+
The following table is a personal feature comparision. If you have a different
37+
opinion, especially you are the author of the following repository, please
38+
raise an issue and we can talk. This table is not a commerical sales pitch.
39+
40+
#. Y: have such a feature
41+
#. M: manual operation
42+
#. A: automatic operation
43+
44+
.. table:: Detailed feature comparision
45+
46+
============== ========================== ======================= ===================== ========== =====
47+
Group Feature cookiecutter-pypackage cookiecutter-vanguard PyScaffold yehua
48+
============== ========================== ======================= ===================== ========== =====
49+
essential setup.py Y Y Y Y
50+
. setup.cfg Y Y Y Y
51+
. source code stub Y Y Y Y
52+
test setup requirements.txt Y Y Y
53+
. requirements_dev.txt Y Y Y
54+
. Makefile Y Y
55+
. tests code Y Y Y
56+
. tox Y Y
57+
. travis Y Y Y
58+
. test coverage Y Y
59+
. flake8 Y
60+
documentation README.rst Y Y Y
61+
. labels Y
62+
. gitignore Y Y Y
63+
. AUTHORS.rst Y Y Y
64+
. CONTRIBUTING.rst Y Y
65+
. HISTORY.rst/CHANGELOG .rst Y Y Y Y
66+
. LICENCE Y Y Y Y
67+
. MANIFEST.in Y Y Y
68+
. sphinx docs Y Y Y Y
69+
usability interactive shell Y Y Y
70+
. one liner Y
71+
. initialize github repo Y
72+
maintenance publish on pypi A M M
73+
. dependency management M M A
74+
. template customization Y
75+
. version management M M A
76+
. automated github release Y
77+
. continous templating Y
78+
============== ========================== ======================= ===================== ========== =====
79+
80+
1981
setup.py
2082
----------
2183

@@ -46,22 +108,6 @@ In order to make moban updates: please call `make`.
46108
User guides
47109
================================================================================
48110

49-
Release and publish from command line
50-
--------------------------------------------------------------------------------
51-
52-
In order to run, `python setup.py publish`, you will have setup `.pypirc` in
53-
your home folder as::
54-
55-
[distutils]
56-
index-servers =
57-
pypi
58-
59-
[pypi]
60-
username=your_name
61-
password=your_password
62-
63-
64-
And you need to configure `gease`.
65111

66112
Auto publishing via github action
67113
--------------------------------------------------------------------------------
@@ -91,6 +137,11 @@ Using dependency markers in `setup.py`
91137
In order to use dependency markers in `setup.py`, add `setup_use_markers: true`
92138
in your `mobanfile.
93139

140+
Auto generation of contributors
141+
--------------------------------------------------------------------------------
142+
143+
You must specify an author in your configuration file, otherwise contributors
144+
will include author.
94145

95146
Developer Guides
96147
================================================================================

CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
Change log
22
================================================================================
33

4+
0.0.12 - 26.08.20220
5+
--------------------------------------------------------------------------------
6+
7+
**added**
8+
9+
#. `#146 <https://github.com/moremoban/pypi-mobans/issues/146>`_: include python
10+
setup.py checkdocs
11+
#. auto-generation of contributors
12+
#. github action for moban update and commits
13+
#. `#147 <https://github.com/moremoban/pypi-mobans/issues/147>`_: better isort
14+
action
15+
#. `#148 <https://github.com/moremoban/pypi-mobans/issues/148>`_: generate
16+
Makeifile and format.sh
17+
418
0.0.11 - 03.05.2020
519
--------------------------------------------------------------------------------
620

@@ -17,6 +31,8 @@ Change log
1731
#. add python_requires in setup.py
1832
#. no code coverage support
1933
#. add github star badges
34+
#. `#145 <https://github.com/moremoban/pypi-mobans/issues/145>`_: specify test
35+
dependencies with project.yml file
2036

2137
**Fixed**
2238

README.rst

Lines changed: 67 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ pypi-mobans
1414

1515

1616
Scaffolding templates for your Python project.
17+
18+
19+
create a blank python package that is usable and ready to push to github. And future
20+
updates on your organisation's specific static information can be instantly applies the
21+
update accurately using `moban`_. Here is a list of features:
22+
23+
#. core python package
24+
#. test configuration setup
25+
#. ready to commit github repository
26+
#. automated upload to pypi via github actions
27+
#. version management through jinja2
28+
#. automatic extraction of github contributors
29+
#. semi-automatic change log generation
30+
1731
It is used with `yehua <https://github.com/chfw/yehua>`_.
1832
Organisations using it:
1933

@@ -25,6 +39,54 @@ Organisations using it:
2539
Features
2640
================================================================================
2741

42+
Feature comparision
43+
--------------------------------------------------------------------------------
44+
45+
The following table is a personal feature comparision. If you have a different
46+
opinion, especially you are the author of the following repository, please
47+
raise an issue and we can talk. This table is not a commerical sales pitch.
48+
49+
#. Y: have such a feature
50+
#. M: manual operation
51+
#. A: automatic operation
52+
53+
.. table:: Detailed feature comparision
54+
55+
============== ========================== ======================= ===================== ========== =====
56+
Group Feature cookiecutter-pypackage cookiecutter-vanguard PyScaffold yehua
57+
============== ========================== ======================= ===================== ========== =====
58+
essential setup.py Y Y Y Y
59+
. setup.cfg Y Y Y Y
60+
. source code stub Y Y Y Y
61+
test setup requirements.txt Y Y Y
62+
. requirements_dev.txt Y Y Y
63+
. Makefile Y Y
64+
. tests code Y Y Y
65+
. tox Y Y
66+
. travis Y Y Y
67+
. test coverage Y Y
68+
. flake8 Y
69+
documentation README.rst Y Y Y
70+
. labels Y
71+
. gitignore Y Y Y
72+
. AUTHORS.rst Y Y Y
73+
. CONTRIBUTING.rst Y Y
74+
. HISTORY.rst/CHANGELOG .rst Y Y Y Y
75+
. LICENCE Y Y Y Y
76+
. MANIFEST.in Y Y Y
77+
. sphinx docs Y Y Y Y
78+
usability interactive shell Y Y Y
79+
. one liner Y
80+
. initialize github repo Y
81+
maintenance publish on pypi A M M
82+
. dependency management M M A
83+
. template customization Y
84+
. version management M M A
85+
. automated github release Y
86+
. continous templating Y
87+
============== ========================== ======================= ===================== ========== =====
88+
89+
2890
setup.py
2991
----------
3092

@@ -63,22 +125,6 @@ In order to make moban updates: please call `make`.
63125
User guides
64126
================================================================================
65127

66-
Release and publish from command line
67-
--------------------------------------------------------------------------------
68-
69-
In order to run, `python setup.py publish`, you will have setup `.pypirc` in
70-
your home folder as::
71-
72-
[distutils]
73-
index-servers =
74-
pypi
75-
76-
[pypi]
77-
username=your_name
78-
password=your_password
79-
80-
81-
And you need to configure `gease`.
82128

83129
Auto publishing via github action
84130
--------------------------------------------------------------------------------
@@ -108,6 +154,11 @@ Using dependency markers in `setup.py`
108154
In order to use dependency markers in `setup.py`, add `setup_use_markers: true`
109155
in your `mobanfile.
110156

157+
Auto generation of contributors
158+
--------------------------------------------------------------------------------
159+
160+
You must specify an author in your configuration file, otherwise contributors
161+
will include author.
111162

112163
Developer Guides
113164
================================================================================

changelog.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: pypi-mobans
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: added
6+
details:
7+
- "`#146`: include python setup.py checkdocs"
8+
- auto-generation of contributors
9+
- github action for moban update and commits
10+
- "`#147`: better isort action"
11+
- "`#148`: generate Makeifile and format.sh"
12+
date: 26.08.20220
13+
version: 0.0.12
414
- changes:
515
- action: Updated
616
details:
@@ -14,6 +24,7 @@ releases:
1424
- "add python_requires in setup.py"
1525
- "no code coverage support"
1626
- "add github star badges"
27+
- "`#145`: specify test dependencies with project.yml file"
1728
- action: Fixed
1829
details:
1930
- "fixed travis config"

statics/moban-update.yml

Lines changed: 29 additions & 0 deletions
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
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

templates/CONTRIBUTORS.rst.jj2

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% set contributors = moban_jinja2_contributors(organisation, name, author) %}
2+
3+
{{ contributors|length }} contributors
4+
================================================================================
5+
6+
In alphabetical order:
7+
8+
{% for contributor in contributors|sort(attribute='name') %}
9+
* `{{ contributor.name }} <{{ contributor.url }}>`_
10+
{% endfor %}

templates/Makefile.jj2

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
all: test
2+
3+
test: lint
4+
bash test.sh
5+
6+
install_test:
7+
pip install -r tests/requirements.txt
8+
9+
git-diff-check:
10+
git diff --exit-code
11+
12+
lint:
13+
bash lint.sh
14+
15+
format:
16+
bash format.sh
17+
18+
git-diff-check:
19+
git diff --exit-code

templates/format.sh.jj2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
isort $(find {{name | replace('-', '_')}} -name "*.py"|xargs echo) $(find tests -name "*.py"|xargs echo)
2+
black -l 79 {{name | replace('-', '_')}}
3+
black -l 79 tests

templates/isort.cfg.jj2

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[settings]
2+
line_length=79
3+
# Ignore generated files
4+
skip=setup.py, {{project_name}}/__init__.py
5+
known_third_party={% for dependency in dependencies: -%}{{dependency}},{%- endfor %}mock, nose
6+
indent=' '
7+
multi_line_output=3
8+
length_sort=1
9+
include_trailing_comma=true
10+
default_section=FIRSTPARTY
11+
no_lines_before=LOCALFOLDER
12+
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

templates/lint.script.jj2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
pip install flake8
22
flake8 . --exclude=.moban.d,docs,setup.py {%block flake8_options%}--builtins=unicode,xrange,long{%endblock%}
3+
4+
python setup.py checkdocs

0 commit comments

Comments
 (0)