Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (6)
New upstream version 1.1
· f4c191d2
Bas Couwenberg
authored
Apr 05, 2019
f4c191d2
New upstream version 1.1.1
· 8cb81743
Bas Couwenberg
authored
Apr 05, 2019
8cb81743
Merge tag 'upstream/1.1.1'
· d65783e1
Bas Couwenberg
authored
Apr 05, 2019
Upstream version 1.1.1
d65783e1
New upstream release.
· 42d8c068
Bas Couwenberg
authored
Apr 05, 2019
42d8c068
Update copyright years for Kevin D. Wurster & Sean C. Gillies.
· 9346514e
Bas Couwenberg
authored
Apr 05, 2019
9346514e
Set distribution to experimental.
· aee4e64a
Bas Couwenberg
authored
Apr 05, 2019
aee4e64a
Show whitespace changes
Inline
Side-by-side
.travis.yml
View file @
aee4e64a
language
:
python
sudo
:
false
cache
:
directories
:
-
~/.cache/pip
dist
:
xenial
language
:
python
cache
:
pip
python
:
-
2.7
-
3.4
-
3.5
-
3.6
-
pypy
-
pypy3
-
3.7
env
:
matrix
:
-
CLICK_VERSION=4.1
-
CLICK_VERSION=5.1
-
CLICK_VERSION=6.7
-
CLICK_VERSION=7
install
:
-
pip install coveralls
-
pip install -e .\[dev\]
-
pip install -e ".[dev]"
-
pip install "click==${CLICK_VERSION}"
script
:
-
pytest tests --cov click_plugins --cov-report term-missing
...
...
CHANGES.md
View file @
aee4e64a
Changelog
=========
1.
1.1 - 2019-04-04
------------------
-
Fixed a version mismatch in
`click_plugins/__init__.py`
See
`1.1`
.
1.
1 - 2019-04-04
----------------
-
Fix an issue where a broken command's traceback would not be emitted - https://github.com/click-contrib/click-plugins/issues/25
-
Bump required click version to
`click>=4`
- https://github.com/click-contrib/click-plugins/pull/28
-
Runs Travis tests for the latest release of click versions 4 -> 7 - https://github.com/click-contrib/click-plugins/pull/28
1.
0.4 - 2018-09-15
------------------
...
...
LICENSE.txt
View file @
aee4e64a
New BSD License
Copyright (c) 2015-201
8
, Kevin D. Wurster, Sean C. Gillies
Copyright (c) 2015-201
9
, Kevin D. Wurster, Sean C. Gillies
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
click_plugins/__init__.py
View file @
aee4e64a
...
...
@@ -24,14 +24,14 @@ entry-points.
from
click_plugins.core
import
with_plugins
__version__
=
'
1.
0.4
'
__version__
=
'
1.
1.1
'
__author__
=
'
Kevin Wurster, Sean Gillies
'
__email__
=
'
wursterk@gmail.com, sean.gillies@gmail.com
'
__source__
=
'
https://github.com/click-contrib/click-plugins
'
__license__
=
'''
New BSD License
Copyright (c) 2015-201
8
, Kevin D. Wurster, Sean C. Gillies
Copyright (c) 2015-201
9
, Kevin D. Wurster, Sean C. Gillies
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
click_plugins/core.py
View file @
aee4e64a
...
...
@@ -87,3 +87,6 @@ class BrokenCommand(click.Command):
click
.
echo
(
self
.
help
,
color
=
ctx
.
color
)
ctx
.
exit
(
1
)
def
parse_args
(
self
,
ctx
,
args
):
return
args
debian/changelog
View file @
aee4e64a
python-click-plugins (1.
0.4-2) UNRELEASED
; urgency=medium
python-click-plugins (1.
1.1-1~exp1) experimental
; urgency=medium
* Team upload.
* New upstream release.
* Update copyright years for copyright holders.
* Bump Standards-Version to 4.3.0, no changes.
* Update copyright years for Kevin D. Wurster & Sean C. Gillies.
-- Bas Couwenberg <sebastic@debian.org>
Sun, 16 Sep 2018 08:26:49
+0200
-- Bas Couwenberg <sebastic@debian.org>
Fri, 05 Apr 2019 19:52:06
+0200
python-click-plugins (1.0.4-1) unstable; urgency=medium
...
...
debian/copyright
View file @
aee4e64a
...
...
@@ -3,8 +3,8 @@ Upstream-Name: click-plugins
Source: https://github.com/click-contrib/click-plugins
Files: *
Copyright: 2015-201
8
, Kevin D. Wurster
2015-201
8
, Sean C. Gillies
Copyright: 2015-201
9
, Kevin D. Wurster
2015-201
9
, Sean C. Gillies
License: BSD-3-Clause
Files: debian/*
...
...
debian/rules
View file @
aee4e64a
...
...
@@ -7,7 +7,6 @@ export PYBUILD_TEST_PYTEST=1
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
export PYBUILD_NAME=click-plugins
%:
...
...
setup.py
View file @
aee4e64a
...
...
@@ -51,14 +51,14 @@ setup(
"
via setuptools entry-points.
"
,
extras_require
=
{
'
dev
'
:
[
'
pytest>=3
'
,
'
pytest>=3
.6
'
,
'
pytest-cov
'
,
'
wheel
'
,
'
coveralls
'
],
},
include_package_data
=
True
,
install_requires
=
[
'
click>=
3
.0
'
],
install_requires
=
[
'
click>=
4
.0
'
],
keywords
=
'
click plugin setuptools entry-point
'
,
license
=
"
New BSD
"
,
long_description
=
long_desc
,
...
...
tests/test_plugins.py
View file @
aee4e64a
...
...
@@ -78,23 +78,23 @@ def test_registered():
def
test_register_and_run
(
runner
):
result
=
runner
.
invoke
(
good_cli
)
assert
result
.
exit_code
is
0
assert
result
.
exit_code
==
0
for
ep
in
iter_entry_points
(
'
_test_click_plugins.test_plugins
'
):
cmd_result
=
runner
.
invoke
(
good_cli
,
[
ep
.
name
,
'
something
'
])
assert
cmd_result
.
exit_code
is
0
assert
cmd_result
.
exit_code
==
0
assert
cmd_result
.
output
.
strip
()
==
'
passed
'
def
test_broken_register_and_run
(
runner
):
result
=
runner
.
invoke
(
broken_cli
)
assert
result
.
exit_code
is
0
assert
result
.
exit_code
==
0
assert
u
'
\U0001F4A9
'
in
result
.
output
or
u
'
\u2020
'
in
result
.
output
for
ep
in
iter_entry_points
(
'
_test_click_plugins.broken_plugins
'
):
cmd_result
=
runner
.
invoke
(
broken_cli
,
[
ep
.
name
])
assert
cmd_result
.
exit_code
is
not
0
assert
cmd_result
.
exit_code
!=
0
assert
'
Traceback
'
in
cmd_result
.
output
...
...
@@ -108,7 +108,7 @@ def test_group_chain(runner):
pass
result
=
runner
.
invoke
(
good_cli
)
assert
result
.
exit_code
is
0
assert
result
.
exit_code
==
0
assert
sub_cli
.
name
in
result
.
output
for
ep
in
iter_entry_points
(
'
_test_click_plugins.test_plugins
'
):
assert
ep
.
name
in
result
.
output
...
...
@@ -121,13 +121,13 @@ def test_group_chain(runner):
pass
result
=
runner
.
invoke
(
good_cli
,
[
'
sub-cli-plugins
'
])
assert
result
.
exit_code
is
0
assert
result
.
exit_code
==
0
for
ep
in
iter_entry_points
(
'
_test_click_plugins.test_plugins
'
):
assert
ep
.
name
in
result
.
output
# Execute one of the sub-group's commands
result
=
runner
.
invoke
(
good_cli
,
[
'
sub-cli-plugins
'
,
'
cmd1
'
,
'
something
'
])
assert
result
.
exit_code
is
0
assert
result
.
exit_code
==
0
assert
result
.
output
.
strip
()
==
'
passed
'
...
...
@@ -138,3 +138,25 @@ def test_exception():
@click.command
()
def
cli
():
"""
Whatever
"""
def
test_broken_register_and_run_with_help
(
runner
):
result
=
runner
.
invoke
(
broken_cli
)
assert
result
.
exit_code
==
0
assert
u
'
\U0001F4A9
'
in
result
.
output
or
u
'
\u2020
'
in
result
.
output
for
ep
in
iter_entry_points
(
'
_test_click_plugins.broken_plugins
'
):
cmd_result
=
runner
.
invoke
(
broken_cli
,
[
ep
.
name
,
"
--help
"
])
assert
cmd_result
.
exit_code
!=
0
assert
'
Traceback
'
in
cmd_result
.
output
def
test_broken_register_and_run_with_args
(
runner
):
result
=
runner
.
invoke
(
broken_cli
)
assert
result
.
exit_code
==
0
assert
u
'
\U0001F4A9
'
in
result
.
output
or
u
'
\u2020
'
in
result
.
output
for
ep
in
iter_entry_points
(
'
_test_click_plugins.broken_plugins
'
):
cmd_result
=
runner
.
invoke
(
broken_cli
,
[
ep
.
name
,
"
-a
"
,
"
b
"
])
assert
cmd_result
.
exit_code
!=
0
assert
'
Traceback
'
in
cmd_result
.
output