Skip to content

Commit 6ee766f

Browse files
committed
🥚 🎡 release 0.0.4
1 parent 42a1d43 commit 6ee766f

File tree

15 files changed

+50
-26
lines changed

15 files changed

+50
-26
lines changed

.github/workflows/moban-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
python-version: '3.7'
1515
- name: check changes
1616
run: |
17-
pip install moban gitfs2 pypifs moban-jinja2-github
17+
pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
1818
moban
1919
git status
2020
git diff --exit-code

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,3 +540,7 @@ cscope.files
540540
cscope.out
541541
cscope.in.out
542542
cscope.po.out
543+
544+
545+
# remove moban hash dictionary
546+
.moban.hashes

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ stages:
2828
env:
2929
- MINREQ=0
3030
stage: moban
31-
install: pip install moban>=0.0.4 gitfs2 pypifs moban-jinja2-github
31+
install: pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible
3232
script:
3333
- moban
3434
- git diff --exit-code

CHANGELOG.rst

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

4+
0.0.4 - 17.10.2020
5+
--------------------------------------------------------------------------------
6+
7+
**added**
8+
9+
#. exclude a list of user names instead of a single user name
10+
411
0.0.3 - 02.09.2020
512
--------------------------------------------------------------------------------
613

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 'moban-jinja2-github' 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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ test: lint
66
install_test:
77
pip install -r tests/requirements.txt
88

9-
git-diff-check:
10-
git diff --exit-code
11-
129
lint:
1310
bash lint.sh
1411

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ moban-jinja2-github
1616
.. image:: https://img.shields.io/github/stars/moremoban/moban-jinja2-github.svg?style=social&maxAge=3600&label=Star
1717
:target: https://github.com/moremoban/moban-jinja2-github/stargazers
1818

19+
.. 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
20+
:target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects
21+
22+
.. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square
23+
:target: https://github.com/psf/black
24+
1925
.. image:: https://dev.azure.com/moremoban/moban-jinja2-github/_apis/build/status/moremoban.moban-jinja2-github?branchName=master
2026
:target: https://dev.azure.com/moremoban/moban-jinja2-github/_build/latest?definitionId=2&branchName=master
2127

changelog.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: moban-jinja2-github
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: added
6+
details:
7+
- exclude a list of user names instead of a single user name
8+
version: 0.0.4
9+
date: 17.10.2020
410
- changes:
511
- action: added
612
details:

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
copyright = ''
2121
author = 'chfw'
2222
# The short X.Y version
23-
version = '0.0.3'
23+
version = '0.0.4'
2424
# The full version, including alpha/beta/rc tags
25-
release = '0.0.3'
25+
release = '0.0.4'
2626

2727
# -- General configuration ---------------------------------------------------
2828

lint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
pip install flake8
2-
flake8 . --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long
3-
python setup.py checkdocs
2+
flake8 --exclude=.moban.d,docs,setup.py --builtins=unicode,xrange,long . && python setup.py checkdocs

moban-jinja2-github.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ organisation: "moremoban"
33
author: "chfw"
44
contact: "info@moremoban.org"
55
company: "C.W."
6-
version: "0.0.3"
7-
current_version: "0.0.3"
8-
release: "0.0.3"
6+
version: "0.0.4"
7+
current_version: "0.0.4"
8+
release: "0.0.4"
99
copyright_year: 2020
1010
license: newbsd
1111
dependencies:

moban_jinja2_github/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.0.3"
1+
__version__ = "0.0.4"
22
__author__ = "chfw"

moban_jinja2_github/contributors.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
from gease.contributors import EndPoint
33

44

5-
def get_contributors(user, repo, author):
5+
def get_contributors(user, repo, exclude_contributors=()):
66
repo = EndPoint(user, repo)
77
try:
88
user_list = repo.get_all_contributors()
99

1010
user_list = [
11-
detail for detail in user_list if author not in detail["url"]
11+
detail
12+
for detail in user_list
13+
if "name" in detail and detail["name"] not in exclude_contributors
1214
]
1315
return user_list
1416
except UrlNotFound:

setup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232

3333
NAME = "moban-jinja2-github"
3434
AUTHOR = "chfw"
35-
VERSION = "0.0.3"
35+
VERSION = "0.0.4"
3636
EMAIL = "info@moremoban.org"
3737
LICENSE = "newbsd"
3838
DESCRIPTION = (
3939
"Github specific filters, tests and globals"
4040
)
4141
URL = "https://github.com/moremoban/moban-jinja2-github"
42-
DOWNLOAD_URL = "%s/archive/0.0.3.tar.gz" % URL
42+
DOWNLOAD_URL = "%s/archive/0.0.4.tar.gz" % URL
4343
FILES = ["README.rst", "CHANGELOG.rst"]
4444
KEYWORDS = [
4545
"python",
@@ -71,13 +71,14 @@
7171
}
7272
# You do not need to read beyond this line
7373
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
74-
GS_COMMAND = ("gs moban-jinja2-github v0.0.3 " +
75-
"Find 0.0.3 in changelog for more details")
74+
HERE = os.path.abspath(os.path.dirname(__file__))
75+
76+
GS_COMMAND = ("gs moban-jinja2-github v0.0.4 " +
77+
"Find 0.0.4 in changelog for more details")
7678
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
7779
"Please install gease to enable it.")
7880
UPLOAD_FAILED_MSG = (
7981
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
80-
HERE = os.path.abspath(os.path.dirname(__file__))
8182

8283

8384
class PublishCommand(Command):
@@ -123,7 +124,6 @@ def run(self):
123124
"publish": PublishCommand
124125
})
125126

126-
127127
def has_gease():
128128
"""
129129
test if github release command is installed

tests/test_contributors.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55

66
@patch("moban_jinja2_github.contributors.EndPoint")
77
def test_get_contributors(fake_end_point):
8-
sample_contributors = [{"url": "author"}, {"url": "contributors"}]
8+
sample_contributors = [
9+
{"name": "author"},
10+
{"name": "ok", "url": "contributors"},
11+
]
912
fake_api = MagicMock(
1013
get_all_contributors=MagicMock(return_value=sample_contributors)
1114
)
1215
fake_end_point.return_value = fake_api
1316

1417
from moban_jinja2_github.contributors import get_contributors
1518

16-
actual = get_contributors("user", "repo", "author")
17-
expected = [{"url": "contributors"}]
19+
actual = get_contributors("user", "repo", ["author"])
20+
expected = [{"name": "ok", "url": "contributors"}]
1821

1922
eq_(list(actual), expected)
2023

@@ -28,7 +31,7 @@ def test_get_non_existent_url(fake_end_point):
2831

2932
from moban_jinja2_github.contributors import get_contributors
3033

31-
actual = get_contributors("user", "repo", "author")
34+
actual = get_contributors("user", "repo", ["author"])
3235
expected = []
3336

3437
eq_(list(actual), expected)

0 commit comments

Comments
 (0)