Skip to content

Commit 7598077

Browse files
authored
Merge pull request #33 from jayvdb/badges-scm
More scm_host support and gitter_room and mention @coala
2 parents 94454e7 + 8560a30 commit 7598077

File tree

7 files changed

+94
-14
lines changed

7 files changed

+94
-14
lines changed

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{% extends 'README.rst.jj2' %}
2+
3+
{% block documentation_link %}
4+
{% endblock %}
5+
6+
{% block features %}
7+
{{description}}
8+
It is used with `yehua <https://github.com/chfw/yehua>`_.
9+
Organisations using it:
10+
11+
- `pyexcel <https://github.com/pyexcel/pyexcel>`_.
12+
- `coala <https://github.com/coala/coala>`_.
13+
14+
Features
15+
================================================================================
16+
17+
setup.py
18+
----------
19+
20+
1. flake8 compliant setup.py
21+
22+
2. feature parity with `kennethreitz/setup.py <https://github.com/kennethreitz/setup.py>`_
23+
24+
- automatically upload to pypi without using twine
25+
26+
- automatically do git release while uploading to pypi
27+
28+
3. configured to build universial wheels by default
29+
{% endblock %}
30+
31+
{% block bottom_block %}
32+
Notes
33+
================================================================================
34+
35+
36+
In order to run, `python setup.py publish`, you will have setup `.pypirc` in
37+
your home folder as::
38+
39+
[distutils]
40+
index-servers =
41+
pypi
42+
43+
[pypi]
44+
username=your_name
45+
password=your_password
46+
47+
48+
And you need to configure `gease`.
49+
{% endblock %}

README.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@ pypi-mobans
55
.. image:: https://api.travis-ci.org/moremoban/pypi-mobans.svg?branch=master
66
:target: http://travis-ci.org/moremoban/pypi-mobans
77

8-
Scaffolding templates for your Python project. It is used with `yehua <https://github.com/chfw/yehua>`_
9-
and `pyexcel <https://github.com/pyexcel/pyexcel>`_.
8+
.. image:: https://codecov.io/github/moremoban/pypi-mobans/coverage.png
9+
:target: https://codecov.io/github/moremoban/pypi-mobans
10+
11+
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
12+
:target: https://gitter.im/chfw_moban/Lobby
13+
14+
15+
Scaffolding templates for your Python project.
16+
It is used with `yehua <https://github.com/chfw/yehua>`_.
17+
Organisations using it:
18+
19+
- `pyexcel <https://github.com/pyexcel/pyexcel>`_.
20+
- `coala <https://github.com/coala/coala>`_.
1021

1122
Features
1223
================================================================================
@@ -31,8 +42,8 @@ You can get it:
3142

3243
.. code-block:: bash
3344
34-
$ git clone http://github.com/moremoban/pypi-mobans.git
35-
45+
$ git clone https://github.com/moremoban/pypi-mobans.git
46+
$ cd pypi-mobans
3647
3748
Notes
3849
================================================================================
@@ -50,4 +61,4 @@ your home folder as::
5061
password=your_password
5162

5263

53-
And you need to configure `gease`.
64+
And you need to configure `gease`.

config/data.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ contact: [email protected]
88
license: NEW BSD
99
company: Onni Software Ltd.
1010
branch: master
11-
description: this is a base for python project scaffolding
11+
description: Scaffolding templates for your Python project.
12+
release: 0.0.0
13+
gitter_room: chfw_moban/Lobby
14+
setup_py: false

local.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
configuration:
22
configuration: config/data.yml
33
template_dir:
4+
- .moban.dt/
45
- templates
56
targets:
67
- .gitignore: gitignore.jj2
78
- LICENSE: NEW_BSD_LICENSE.jj2
9+
- README.rst: local-README.rst.jj2

templates/README.rst.jj2

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
{%endif%}
66
================================================================================
77

8-
.. image:: https://api.travis-ci.org/{{organisation}}/{{name}}.svg?branch=master
9-
:target: http://travis-ci.org/{{organisation}}/{{name}}
10-
11-
.. image:: https://codecov.io/gh/{{organisation}}/{{name}}/branch/master/graph/badge.svg
12-
:target: https://codecov.io/gh/{{organisation}}/{{name}}
8+
{% include 'badges.rst.jj2' %}
139

1410
{%block documentation_link%}
1511
.. image:: https://readthedocs.org/projects/{{name|lower}}/badge/?version=latest
@@ -25,4 +21,4 @@ Installation
2521
{% include "installation.rst.jj2" %}
2622

2723
{%block bottom_block%}
28-
{%endblock%}
24+
{%endblock%}

templates/badges.rst.jj2

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1+
{% if not scm_host %}
2+
{% set scm_host = 'github.com' %}
3+
{% endif %}
4+
{% if scm_host == 'github.com' %}
15
.. image:: https://api.travis-ci.org/{{organisation}}/{{name}}.svg?branch={{branch}}
26
:target: http://travis-ci.org/{{organisation}}/{{name}}
7+
{% endif %}
38

9+
{% if scm_host == 'github.com' %}
410
.. image:: https://codecov.io/github/{{organisation}}/{{name}}/coverage.png
511
:target: https://codecov.io/github/{{organisation}}/{{name}}
12+
{% elif scm_host == 'gitlab.com' %}
13+
.. image:: https://codecov.io/gitlab/{{organisation}}/{{name}}/coverage.png
14+
:target: https://codecov.io/gitlab/{{organisation}}/{{name}}
15+
{% endif %}
616

17+
{% if gitter_room %}
718
.. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg
8-
:target: https://gitter.im/pyexcel/Lobby
19+
:target: https://gitter.im/{{gitter_room}}
20+
{% endif %}

templates/installation.rst.jj2

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% if not scm_host %}
2+
{% set scm_host = 'github.com' %}
3+
{% endif %}
14
{% if release != '0.0.0' %}
25

36
You can install {{name}} via pip:
@@ -8,10 +11,14 @@ You can install {{name}} via pip:
811

912

1013
or clone it and install it:
14+
{% else %}
15+
You can get it:
1116
{% endif %}
1217

1318
.. code-block:: bash
1419

15-
$ git clone https://github.com/{{organisation}}/{{name}}.git
20+
$ git clone https://{{scm_host}}/{{organisation}}/{{name}}.git
1621
$ cd {{name}}
22+
{% if setup_py != False %}
1723
$ python setup.py install
24+
{% endif %}

0 commit comments

Comments
 (0)