Skip to content

Commit 5303ee7

Browse files
committed
Merge branch 'release/4.4'
2 parents 2d64942 + 075fb78 commit 5303ee7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2707
-385
lines changed

.github/workflows/pre-release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Match pre release beta tags on release branches.
2+
name: Pre-release
3+
4+
on:
5+
push:
6+
branches:
7+
- release*
8+
tags:
9+
# Matches 1.2b3 and 1.2.3b4
10+
- "[0-9]+.[0-9]+[ab][0-9]+"
11+
- "[0-9]+.[0-9]+.[0-9]+[ab][0-9]+"
12+
13+
jobs:
14+
pre-release:
15+
runs-on: ubuntu-latest
16+
name: Build pre-release package
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: actions/setup-python@master
22+
name: Setup Python 3.8
23+
with:
24+
python-version: 3.8
25+
26+
- name: Install dependencies
27+
run: python -m pip install -U poetry
28+
29+
- name: Build Package
30+
id: build_package
31+
run: |
32+
rm -rf dist
33+
poetry build
34+
cd dist
35+
echo "::set-output name=source::$(ls *.tar.gz)"
36+
echo "::set-output name=wheel::$(ls *.whl)"
37+
38+
- name: Create a Release
39+
id: create_release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ github.ref }}
45+
release_name: Pre-release ${{ github.ref }}
46+
prerelease: true
47+
48+
- name: Upload Release Wheel
49+
uses: actions/upload-release-asset@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
upload_url: ${{ steps.create_release.outputs.upload_url }}
54+
asset_path: ./dist/${{ steps.build_package.outputs.wheel }}
55+
asset_name: ${{ steps.build_package.outputs.wheel }}
56+
asset_content_type: application/x-pywheel+zip
57+
58+
- name: Upload Release Source
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ steps.create_release.outputs.upload_url }}
64+
asset_path: ./dist/${{ steps.build_package.outputs.source }}
65+
asset_name: ${{ steps.build_package.outputs.source }}
66+
asset_content_type: application/x-tar+gzip

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Match release tags on master branch
2+
name: Release
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
# Matches 1.2.3 and 1.2.3.4
10+
- "[0-9]+.[0-9]+.[0-9]+"
11+
- "[0-9]+.[0-9]+.[0-9].+[0-9]+"
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
name: Build release package
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: actions/setup-python@master
22+
name: Setup Python 3.8
23+
with:
24+
python-version: 3.8
25+
26+
- name: Install dependencies
27+
run: python -m pip install -U poetry
28+
29+
- name: Build Package
30+
id: build_package
31+
run: |
32+
rm -rf dist
33+
poetry build
34+
cd dist
35+
echo "::set-output name=source::$(ls *.tar.gz)"
36+
echo "::set-output name=wheel::$(ls *.whl)"
37+
38+
- name: Create a Release
39+
id: create_release
40+
uses: actions/create-release@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
tag_name: ${{ github.ref }}
45+
release_name: Pre-release ${{ github.ref }}
46+
prerelease: true
47+
48+
- name: Upload Release Wheel
49+
uses: actions/upload-release-asset@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
upload_url: ${{ steps.create_release.outputs.upload_url }}
54+
asset_path: ./dist/${{ steps.build_package.outputs.wheel }}
55+
asset_name: ${{ steps.build_package.outputs.wheel }}
56+
asset_content_type: application/x-pywheel+zip
57+
58+
- name: Upload Release Source
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ steps.create_release.outputs.upload_url }}
64+
asset_path: ./dist/${{ steps.build_package.outputs.source }}
65+
asset_name: ${{ steps.build_package.outputs.source }}
66+
asset_content_type: application/x-tar+gzip
67+
68+
# - name: Upload to PyPI

.github/workflows/test-cases.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Test Cases
5+
6+
on: [push]
7+
8+
jobs:
9+
test:
10+
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.6, 3.7, 3.8]
15+
16+
name: Test Python ${{ matrix.python-version }}
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Setup Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@master
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Setup coverage reporter
26+
run: |
27+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
28+
chmod +x ./cc-test-reporter
29+
GIT_BRANCH=$GITHUB_REF GIT_COMMIT_SHA=$GITHUB_SHA ./cc-test-reporter before-build
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install -U poetry coverage
34+
poetry install
35+
36+
- name: Test with pytest
37+
run: |
38+
poetry run pytest
39+
40+
- name: Codecov
41+
uses: codecov/[email protected]
42+
43+
- name: Report coverage
44+
env:
45+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
46+
run: |
47+
GIT_BRANCH=$GITHUB_REF GIT_COMMIT_SHA=$GITHUB_SHA ./cc-test-reporter after-build -t coverage.py --exit-code $?

.readthedocs.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
version: 2
6+
7+
sphinx:
8+
configuration: docs/conf.py
9+
10+
python:
11+
version: 3.6
12+
install:
13+
- method: pip
14+
path: .

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
- CC_TEST_REPORTER_ID=767be575271677c6435197b16f142b6ded3332f4f5112ed30fcc760d02a7d762
2424

2525
install:
26-
- travis_retry pip install bandit coverage pylint
26+
- travis_retry pip install bandit coverage pylint poetry
2727

2828
before_script:
2929
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
@@ -33,7 +33,8 @@ before_script:
3333
script:
3434
- pylint pyapp --disable=import-error
3535
- bandit -ll -r pyapp
36-
- python setup.py test
36+
- poetry install
37+
- poetry run pytest
3738

3839
after_script:
3940
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT -t coverage.py

HISTORY

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
4.4.0
2+
=====
3+
4+
Features
5+
--------
6+
7+
- Delayed logging on startup, initial log messages are stored (critical messages
8+
are still displayed) to allow for logging to be configured before the stored
9+
messages are replayed for the now active logger. This also opens up the option
10+
of file only based logging.
11+
12+
- Command signature can now accept the Optional values for both positional are
13+
optional arguments, this allows for optional positional arguments.
14+
15+
- Argument grouping support enable, with builtin CLI commands grouped.
16+
17+
- Single file scripts. A single script can now be used with pyApp, allowing even
18+
quick scripts to take advantage of pyApp features and extensions.
19+
20+
- Command signature generation. CLI arguments are generated from the arguments
21+
signature of the command function.
22+
23+
- Improvements to checks to handle unexpected exceptions. Rather than checks
24+
outright failing errors are caught and reported along with a stack trace.
25+
26+
- Switch to using poetry
27+
28+
29+
Bug fixes
30+
---------
31+
32+
- Custom logging configuration was not being applied for logging defined in settings
33+
34+
- Using an _ in a positional argument signature caused an exception in argparse
35+
36+
- Positional arguments caused an exception in argparse, a entire new suit of tests
37+
was added to address this issue.
38+
39+
140
4.3.0
241
=====
342

README.rst

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pyApp - A python application framework
44

55
*Let us handle the boring stuff!*
66

7+
As of pyApp 4.0, Python < 3.6 is no longer supported.
8+
79
+---------+---------------------------------------------------------------------------------------+
810
| Docs | .. image:: https://readthedocs.org/projects/pyapp/badge/?version=latest |
911
| | :target: https://docs.pyapp.info/ |
@@ -12,6 +14,9 @@ pyApp - A python application framework
1214
| Build | .. image:: https://img.shields.io/travis/pyapp-org/pyapp.svg?style=flat |
1315
| | :target: https://travis-ci.org/pyapp-org/pyapp |
1416
| | :alt: Travis CI Status |
17+
| | .. image:: https://api.dependabot.com/badges/status?host=github&repo=pyapp-org/pyapp |
18+
| | :target: https://dependabot.com |
19+
| | :alt: Dependabot Status |
1520
+---------+---------------------------------------------------------------------------------------+
1621
| Quality | .. image:: https://api.codeclimate.com/v1/badges/58f9ffacb711c992610d/maintainability |
1722
| | :target: https://codeclimate.com/github/pyapp-org/pyapp/maintainability |
@@ -23,22 +28,20 @@ pyApp - A python application framework
2328
| | :target: https://github.com/ambv/black |
2429
| | :alt: Once you go Black... |
2530
+---------+---------------------------------------------------------------------------------------+
26-
| Package | .. image:: https://img.shields.io/pypi/v/pyapp.svg |
31+
| Package | .. image:: https://img.shields.io/pypi/v/pyapp |
2732
| | :target: https://pypi.io/pypi/pyapp/ |
2833
| | :alt: Latest Version |
29-
| | .. image:: https://img.shields.io/pypi/pyversions/pyapp.svg |
34+
| | .. image:: https://img.shields.io/pypi/pyversions/pyapp |
3035
| | :target: https://pypi.io/pypi/pyapp/ |
31-
| | .. image:: https://img.shields.io/pypi/l/pyapp.svg |
36+
| | .. image:: https://img.shields.io/pypi/l/pyapp |
3237
| | :target: https://pypi.io/pypi/pyapp/ |
33-
| | .. image:: https://img.shields.io/pypi/wheel/pyapp.svg |
38+
| | .. image:: https://img.shields.io/pypi/wheel/pyapp |
39+
| | :alt: PyPI - Wheel |
3440
| | :target: https://pypi.io/pypi/pyapp/ |
3541
+---------+---------------------------------------------------------------------------------------+
3642

37-
Many features inspired by Django, but modified to be more general for use
38-
outside of web applications.
39-
40-
With pyApp 4.0, versions of Python < 3.6 are no longer supported.
41-
43+
pyApp takes care of the boring boilerplate code for building a CLI, manageing
44+
settings and much more so you can focus on your buisness logic.
4245

4346
So what do we handle?
4447
=====================
@@ -73,26 +76,53 @@ So what do we handle?
7376
Extensions
7477
==========
7578

76-
- SQLAlchemy - `pyapp.sqlalchemy`_
77-
- Redis - `pyapp.redis`_
78-
- AIOBotocore - `pyapp.aiobotocore`_
79+
- 🔌 SQLAlchemy - `pyapp.sqlalchemy`_
80+
- 🔌 Redis - `pyapp.redis`_
81+
82+
In Beta
83+
-------
84+
85+
- 🐛 Rollbar - `pyapp.rollbar`_
86+
87+
- 📧 AIO SMTPlib - `pyapp.aiosmtplib`_ Extension for aiosmtplib
88+
89+
- ☁ Boto3 - `pyapp.boto3`_
90+
91+
- ☁ AIOBotocore - `pyapp.aiobotocore`_
92+
93+
- 📨 Messaging - `pyapp.messaging`_ - Extension to provide abstract interfaces for Message Queues.
94+
95+
- 📨 AWS Messaging - `pyapp.messaging-aws`_ - Messaging extension for AWS (SQS/SNS)
7996

8097
In development
8198
--------------
8299

83-
- SMTP - `pyapp.SMTP`_
84-
- Boto3 - `pyapp.boto3`_
100+
- 📧 SMTP - `pyapp.SMTP`_
101+
102+
- 📨 Aio-Pika - `pyapp.aiopika`_ - Messaging extension for pika (RabbitMQ/AMQP)
103+
104+
- 🔌 PySpark - `pyapp.pyspark`_ - Extension for PySpark
105+
106+
- 🔎 Elastic Search - `pyapp.elasticsearch`_ - Extension for Elasticsearch
85107

86108
Coming soon
87109
-----------
88110

89-
Extensions for LDAP, Paramiko.
111+
- 📨 AMQP Messaging - Messaging extension for AMQP (RabbitMQ)
112+
90113

91114
.. _pyapp.sqlalchemy: https://www.github.com/pyapp-org/pyapp.sqlalchemy
92115
.. _pyapp.redis: https://www.github.com/pyapp-org/pyapp.redis
93116
.. _pyapp.aiobotocore: https://www.github.com/pyapp-org/pyapp.aiobotocore
94117
.. _pyapp.SMTP: https://www.github.com/pyapp-org/pyapp.SMTP
95118
.. _pyapp.boto3: https://www.github.com/pyapp-org/pyapp.boto3
119+
.. _pyapp.rollbar: https://www.github.com/pyapp-org/pyapp.rollbar
120+
.. _pyapp.aiosmtplib: https://www.github.com/pyapp-org/pyapp.aiosmtplib
121+
.. _pyapp.messaging: https://www.github.com/pyapp-org/pyapp-messaging
122+
.. _pyapp.messaging-aws: https://www.github.com/pyapp-org/pyapp-messaging-aws
123+
.. _pyapp.aiopika: https://www.github.com/pyapp-org/pyapp.aiopika
124+
.. _pyapp.pyspark: https://www.github.com/pyapp-org/pyapp.pyspark
125+
.. _pyapp.elasticsearch: https://www.github.com/pyapp-org/pyapp.elasticsearch
96126

97127

98128
Contributions

docs/conf.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
# documentation root, use os.path.abspath to make it absolute, like shown here.
1010
sys.path.insert(0, HERE.parent.as_posix())
1111

12-
about = {}
13-
exec((HERE.parent / "pyapp" / "__version__.py").read_text(), about)
14-
1512

1613
# -- General configuration ------------------------------------------------
1714

@@ -47,7 +44,7 @@
4744
# built documents.
4845
#
4946
# The short X.Y version.
50-
version = about["__version__"]
47+
version = "4.4.0-beta.1"
5148
# The full version, including alpha/beta/rc tags.
5249
release = version
5350

0 commit comments

Comments
 (0)