Skip to content

Commit af8a41f

Browse files
authored
Merge pull request #132 from pyapp-org/release/4.6.0
Release/4.6.0
2 parents 1fa2651 + e20feb1 commit af8a41f

Some content is hidden

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

66 files changed

+1377
-592
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
[*.py]
12+
charset = utf-8
13+
indent_style = space
14+
indent_size = 4

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
labels:
9+
- "\U0001F38B dependencies"
10+
ignore:
11+
- dependency-name: pytest-asyncio
12+
versions:
13+
- 0.15.0
14+
- dependency-name: docutils
15+
versions:
16+
- "0.17"
17+
- dependency-name: pyyaml
18+
versions:
19+
- 5.4.1
20+
- dependency-name: sphinx
21+
versions:
22+
- 3.4.3
23+
- 3.5.0
24+
- dependency-name: argcomplete
25+
versions:
26+
- 1.12.2
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [development, master]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [development]
9+
schedule:
10+
- cron: '0 15 * * 1'
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
language: ['python']
21+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
with:
27+
# We must fetch at least the immediate parents so that if this is
28+
# a pull request then we can checkout the head.
29+
fetch-depth: 2
30+
31+
# If this run was triggered by a pull request event, then checkout
32+
# the head of the pull request instead of the merge commit.
33+
- run: git checkout HEAD^2
34+
if: ${{ github.event_name == 'pull_request' }}
35+
36+
# Initializes the CodeQL tools for scanning.
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v1
39+
with:
40+
languages: ${{ matrix.language }}
41+
42+
# ℹ️ Command-line programs to run using the OS shell.
43+
# 📚 https://git.io/JvXDl
44+
45+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
46+
# and modify them (or add more) to build your code if your project
47+
# uses a compiled language
48+
49+
#- run: |
50+
# make bootstrap
51+
# make release
52+
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v1

.github/workflows/test-cases.yml renamed to .github/workflows/default.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,34 @@ on: [push]
77

88
jobs:
99
test:
10-
1110
runs-on: ubuntu-latest
1211
strategy:
1312
matrix:
14-
python-version: [3.6, 3.7, 3.8]
13+
python-version: [3.6, 3.7, 3.8, 3.9]
1514

1615
name: Test Python ${{ matrix.python-version }}
1716
steps:
1817
- uses: actions/checkout@v2
19-
18+
with:
19+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
20+
2021
- name: Setup Python ${{ matrix.python-version }}
2122
uses: actions/setup-python@master
2223
with:
2324
python-version: ${{ matrix.python-version }}
2425

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-
3126
- name: Install dependencies
3227
run: |
3328
python -m pip install -U poetry coverage
29+
poetry config experimental.new-installer false
3430
poetry install
3531
3632
- name: Test with pytest
3733
run: |
38-
poetry run pytest
39-
40-
- name: Codecov
41-
uses: codecov/[email protected]
34+
poetry run pytest --junit-xml=reports/xunit-result-${{ matrix.python-version }}.xml --cov-report=xml:reports/coverage-${{ matrix.python-version }}.xml tests
4235
43-
- name: Report coverage
36+
- name: Analyze with SonarCloud
37+
uses: sonarsource/sonarcloud-github-action@master
4438
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 $?
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/release.yml

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,37 @@ jobs:
3434
cd dist
3535
echo "::set-output name=source::$(ls *.tar.gz)"
3636
echo "::set-output name=wheel::$(ls *.whl)"
37+
echo "::set-output name=version::$(poetry version | awk '{print $2}')"
3738
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
39+
- name: Create a Release
40+
id: create_release
41+
uses: actions/create-release@v1
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
with:
45+
tag_name: ${{ steps.build_package.outputs.version }}
46+
release_name: Release ${{ steps.build_package.outputs.version }}
47+
prerelease: false
48+
49+
- name: Upload Release Wheel
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
upload_url: ${{ steps.create_release.outputs.upload_url }}
55+
asset_path: ./dist/${{ steps.build_package.outputs.wheel }}
56+
asset_name: ${{ steps.build_package.outputs.wheel }}
57+
asset_content_type: application/x-pywheel+zip
58+
59+
- name: Upload Release Source
60+
uses: actions/upload-release-asset@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
upload_url: ${{ steps.create_release.outputs.upload_url }}
65+
asset_path: ./dist/${{ steps.build_package.outputs.source }}
66+
asset_name: ${{ steps.build_package.outputs.source }}
67+
asset_content_type: application/x-tar+gzip
6768

6869
- name: Upload to PyPI
6970
id: upload_to_pypi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
dist
1111
*.egg-info
1212
build
13+
reports
1314
_build
1415
.tox
1516
.eggs

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
rev: v2.4.4
1515
hooks:
1616
- id: pylint
17-
files: pyapp/.*
17+
files: src
1818
args: [
1919
--disable=import-error,
2020
]

HISTORY

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
4.6.0
2+
=====
3+
4+
Features
5+
--------
6+
7+
- Builtin feature flags support for enabling functionality at runtime
8+
9+
Changes
10+
-------
11+
12+
- Change to initial logger so early log commands are replayed to the entire
13+
logging framework after logging has been configured. This could cause initial
14+
log messages to be displayed subtly different however log messages will follow
15+
the rules defined in your logging configuration.
16+
17+
18+
4.5.0
19+
=====
20+
21+
Features
22+
--------
23+
24+
- Add TOML support for remote configuration.
25+
26+
27+
Security Updates
28+
----------------
29+
30+
- By default require TLS 1.2 for HTTPS connections to fetch remote configuration.
31+
32+
133
4.4.0
234
=====
335

README.rst

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,42 @@ pyApp - A python application framework
66

77
As of pyApp 4.0, Python < 3.6 is no longer supported.
88

9-
+---------+---------------------------------------------------------------------------------------+
10-
| Docs | .. image:: https://readthedocs.org/projects/pyapp/badge/?version=latest |
11-
| | :target: https://docs.pyapp.info/ |
12-
| | :alt: ReadTheDocs |
13-
+---------+---------------------------------------------------------------------------------------+
14-
| Build | .. image:: https://img.shields.io/travis/pyapp-org/pyapp.svg?style=flat |
15-
| | :target: https://travis-ci.org/pyapp-org/pyapp |
16-
| | :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 |
20-
+---------+---------------------------------------------------------------------------------------+
21-
| Quality | .. image:: https://api.codeclimate.com/v1/badges/58f9ffacb711c992610d/maintainability |
22-
| | :target: https://codeclimate.com/github/pyapp-org/pyapp/maintainability |
23-
| | :alt: Maintainability |
24-
| | .. image:: https://api.codeclimate.com/v1/badges/58f9ffacb711c992610d/test_coverage |
25-
| | :target: https://codeclimate.com/github/pyapp-org/pyapp/test_coverage |
26-
| | :alt: Test Coverage |
27-
| | .. image:: https://img.shields.io/badge/code%20style-black-000000.svg |
28-
| | :target: https://github.com/ambv/black |
29-
| | :alt: Once you go Black... |
30-
+---------+---------------------------------------------------------------------------------------+
31-
| Package | .. image:: https://img.shields.io/pypi/v/pyapp |
32-
| | :target: https://pypi.io/pypi/pyapp/ |
33-
| | :alt: Latest Version |
34-
| | .. image:: https://img.shields.io/pypi/pyversions/pyapp |
35-
| | :target: https://pypi.io/pypi/pyapp/ |
36-
| | .. image:: https://img.shields.io/pypi/l/pyapp |
37-
| | :target: https://pypi.io/pypi/pyapp/ |
38-
| | .. image:: https://img.shields.io/pypi/wheel/pyapp |
39-
| | :alt: PyPI - Wheel |
40-
| | :target: https://pypi.io/pypi/pyapp/ |
41-
+---------+---------------------------------------------------------------------------------------+
42-
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.
9+
+---------+------------------------------------------------------------------------------------------------------------+
10+
| Docs | .. image:: https://readthedocs.org/projects/pyapp/badge/?version=latest |
11+
| | :target: https://docs.pyapp.info/ |
12+
| | :alt: ReadTheDocs |
13+
+---------+------------------------------------------------------------------------------------------------------------+
14+
| Build | .. image:: https://api.dependabot.com/badges/status?host=github&repo=pyapp-org/pyapp |
15+
| | :target: https://dependabot.com |
16+
| | :alt: Dependabot Status |
17+
+---------+------------------------------------------------------------------------------------------------------------+
18+
| Quality | .. image:: https://sonarcloud.io/api/project_badges/measure?project=pyapp-org_pyapp&metric=sqale_rating |
19+
| | :target: https://sonarcloud.io/dashboard?id=pyapp-org_pyapp |
20+
| | :alt: Maintainability |
21+
| | .. image:: https://sonarcloud.io/api/project_badges/measure?project=pyapp-org_pyapp&metric=security_rating |
22+
| | :target: https://sonarcloud.io/project/security_hotspots |
23+
| | :alt: Security |
24+
| | .. image:: https://sonarcloud.io/api/project_badges/measure?project=pyapp-org_pyapp&metric=coverage |
25+
| | :target: https://sonarcloud.io/code?id=pyapp-org_pyapp |
26+
| | :alt: Test Coverage |
27+
| | .. image:: https://img.shields.io/badge/code%20style-black-000000.svg |
28+
| | :target: https://github.com/ambv/black |
29+
| | :alt: Once you go Black... |
30+
+---------+------------------------------------------------------------------------------------------------------------+
31+
| Package | .. image:: https://img.shields.io/pypi/v/pyapp |
32+
| | :target: https://pypi.io/pypi/pyapp/ |
33+
| | :alt: Latest Version |
34+
| | .. image:: https://img.shields.io/pypi/pyversions/pyapp |
35+
| | :target: https://pypi.io/pypi/pyapp/ |
36+
| | .. image:: https://img.shields.io/pypi/l/pyapp |
37+
| | :target: https://pypi.io/pypi/pyapp/ |
38+
| | .. image:: https://img.shields.io/pypi/wheel/pyapp |
39+
| | :alt: PyPI - Wheel |
40+
| | :target: https://pypi.io/pypi/pyapp/ |
41+
+---------+------------------------------------------------------------------------------------------------------------+
42+
43+
pyApp takes care of the boring boilerplate code for building a CLI, managing
44+
settings and much more so you can focus on your business logic.
4545

4646
So what do we handle?
4747
=====================

docs/developers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ met:
1212
- Ensure your code has unit test coverage (using pyTest). Unittests should be
1313
designed to be as fast as possible.
1414

15-
- Ensure your code passes the pyLint checks (this is part of the travis build).
15+
- Ensure your code passes the pyLint checks (this is part of the automated build).
1616

1717
- Update the docs with the details if required.
1818

0 commit comments

Comments
 (0)