Skip to content

Commit 2e240cf

Browse files
Merge pull request #824 from hugapi/develop
2.6.0
2 parents 5d51ab4 + 7367eeb commit 2e240cf

25 files changed

+172
-50
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.5.6
2+
current_version = 2.6.0
33

44
[bumpversion:file:.env]
55

.env

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
export PROJECT_NAME=$OPEN_PROJECT_NAME
1313
export PROJECT_DIR="$PWD"
14-
export PROJECT_VERSION="2.5.6"
14+
export PROJECT_VERSION="2.6.0"
1515

1616
if [ ! -d "venv" ]; then
1717
if ! hash pyvenv 2>/dev/null; then
@@ -53,7 +53,7 @@ alias project="root; cd $PROJECT_NAME"
5353
alias tests="root; cd tests"
5454
alias examples="root; cd examples"
5555
alias requirements="root; cd requirements"
56-
alias test="_test"
56+
alias run_tests="_test"
5757

5858

5959
function open {
@@ -64,7 +64,8 @@ function open {
6464

6565
function clean {
6666
(root
67-
isort hug/*.py setup.py tests/*.py)
67+
isort hug/*.py setup.py tests/*.py
68+
black -l 100 hug)
6869
}
6970

7071

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tidelift: "pypi/hug"

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ matrix:
4141
sudo: required
4242
python: 3.7
4343
env: TOXENV=py37-isort
44+
- os: linux
45+
sudo: required
46+
python: 3.7
47+
env: TOXENV=py37-safety
4448
- os: linux
4549
sudo: required
4650
python: pypy3.5-6.0

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Ideally, within a virtual environment.
1111

1212
Changelog
1313
=========
14+
### 2.6.0 - August 29, 2019
15+
- Improved CLI multiple behaviour with empty defaults
16+
- Improved CLI type output for built-in types
17+
- Improved MultiCLI base documentation
18+
1419
### 2.5.6 - June 20, 2019
1520
- Fixed issue #815: map_params() causes api documentation to lose param type information
1621
- Improved project testing: restoring 100% coverage

LICENSE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
The MIT License (MIT)
1+
MIT License
22

3-
Copyright (c) 2015 Timothy Edmund Crosley
3+
Copyright (c) 2016 Timothy Crosley
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/0h7ynsqrbaxs7hfm/branch/master?svg=true)](https://ci.appveyor.com/project/TimothyCrosley/hug)
77
[![Coverage Status](https://coveralls.io/repos/hugapi/hug/badge.svg?branch=develop&service=github)](https://coveralls.io/github/hugapi/hug?branch=master)
88
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://pypi.python.org/pypi/hug/)
9-
[![Join the chat at https://gitter.im/timothycrosley/hug](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hugapi/hug?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9+
[![Join the chat at https://gitter.im/timothycrosley/hug](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/timothycrosley/hug?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1010

1111
NOTE: For more in-depth documentation visit [hug's website](http://www.hug.rest)
1212

@@ -25,6 +25,17 @@ As a result of these goals, hug is Python 3+ only and built upon [Falcon's](http
2525

2626
[![HUG Hello World Example](https://raw.github.com/hugapi/hug/develop/artwork/example.gif)](https://github.com/hugapi/hug/blob/develop/examples/hello_world.py)
2727

28+
Supporting hug development
29+
===================
30+
[Get professionally supported hug with the Tidelift Subscription](https://tidelift.com/subscription/pkg/pypi-hug?utm_source=pypi-hug&utm_medium=referral&utm_campaign=readme)
31+
32+
Professional support for hug is available as part of the [Tidelift
33+
Subscription](https://tidelift.com/subscription/pkg/pypi-hug?utm_source=pypi-hug&utm_medium=referral&utm_campaign=readme).
34+
Tidelift gives software development teams a single source for
35+
purchasing and maintaining their software, with professional grade assurances
36+
from the experts who know it best, while seamlessly integrating with existing
37+
tools.
38+
2839
Installing hug
2940
===================
3041

@@ -418,6 +429,16 @@ bash-4.3# tree
418429
1 directory, 3 files
419430
```
420431

432+
Security contact information
433+
===================
434+
435+
hug takes security and quality seriously. This focus is why we depend only on thoroughly tested components and utilize static analysis tools (such as bandit and safety) to verify the security of our code base.
436+
If you find or encounter any potential security issues, please let us know right away so we can resolve them.
437+
438+
To report a security vulnerability, please use the
439+
[Tidelift security contact](https://tidelift.com/security).
440+
Tidelift will coordinate the fix and disclosure.
441+
421442
Why hug?
422443
===================
423444

SECURITY.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Security Policy
2+
3+
hug takes security and quality seriously. This focus is why we depend only on thoroughly tested components and utilize static analysis tools (such as bandit and safety) to verify the security of our code base.
4+
If you find or encounter any potential security issues, please let us know right away so we can resolve them.
5+
6+
## Supported Versions
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| 2.5.6 | :white_check_mark: |
11+
12+
Currently, only the latest version of hug will receive security fixes.
13+
14+
## Reporting a Vulnerability
15+
16+
To report a security vulnerability, please use the
17+
[Tidelift security contact](https://tidelift.com/security).
18+
Tidelift will coordinate the fix and disclosure.

examples/cli_multiple.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import hug
2+
3+
@hug.cli()
4+
def add(numbers: list=None):
5+
return sum([int(number) for number in numbers])
6+
7+
8+
if __name__ == "__main__":
9+
add.interface.cli()

examples/cli_object.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ class GIT(object):
99

1010
@hug.object.cli
1111
def push(self, branch="master"):
12+
"""Push the latest to origin"""
1213
return "Pushing {}".format(branch)
1314

1415
@hug.object.cli
1516
def pull(self, branch="master"):
17+
"""Pull in the latest from origin"""
1618
return "Pulling {}".format(branch)
1719

1820

0 commit comments

Comments
 (0)