Skip to content

Commit 1e1df20

Browse files
Merge pull request #1 from codeperfio/master
Initial commit
2 parents a28b3dc + 4b346fc commit 1e1df20

23 files changed

+13156
-0
lines changed

.flake8

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[flake8]
2+
max-line-length = 120
3+
max-complexity = 10
4+
select = C,E,F,W,B,B950
5+
ignore = E203,E501,W503,E722,B001,C901
6+
exclude =
7+
.git,
8+
test_*,
9+
__pycache__,
10+
*.egg-info,
11+
.nox,
12+
.pytest_cache,
13+
.mypy_cache

.github/release-drafter.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧰 Maintenance'
14+
label: 'chore'
15+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
16+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
17+
version-resolver:
18+
major:
19+
labels:
20+
- 'major'
21+
minor:
22+
labels:
23+
- 'minor'
24+
patch:
25+
labels:
26+
- 'patch'
27+
default: patch
28+
template: |
29+
## Changes
30+
31+
$CHANGES

.github/workflows/publish-pypi.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Pypi
2+
on:
3+
release:
4+
types: [ published ]
5+
6+
jobs:
7+
pytest:
8+
name: Publish to PyPi
9+
runs-on: ubuntu-latest
10+
env:
11+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.8
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
19+
- name: Install Poetry
20+
uses: dschep/[email protected]
21+
22+
- name: Cache Poetry virtualenv
23+
uses: actions/cache@v1
24+
id: cache
25+
with:
26+
path: ~/.virtualenvs
27+
key: poetry-${{ hashFiles('**/poetry.lock') }}
28+
restore-keys: |
29+
poetry-${{ hashFiles('**/poetry.lock') }}
30+
31+
- name: Set Poetry config
32+
run: |
33+
poetry config virtualenvs.in-project false
34+
poetry config virtualenvs.path ~/.virtualenvs
35+
36+
- name: Install Dependencies
37+
run: poetry install
38+
if: steps.cache.outputs.cache-hit != 'true'
39+
40+
- name: Publish to PyPI
41+
if: github.event_name == 'release'
42+
run: |
43+
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} --build
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- main
8+
# pull_request event is required only for autolabeler
9+
pull_request:
10+
# Only following types are handled by the action, but one can default to all as well
11+
types: [opened, reopened, synchronize]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
# pull_request_target:
14+
# types: [opened, reopened, synchronize]
15+
16+
jobs:
17+
update_release_draft:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
21+
#- name: Set GHE_HOST
22+
# run: |
23+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
24+
25+
# Drafts your next Release notes as Pull Requests are merged into "master"
26+
- uses: release-drafter/release-drafter@v5
27+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
28+
# with:
29+
# config-name: my-config.yml
30+
# disable-autolabeler: true
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tox.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Run Tests using tox
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
pytest:
10+
strategy:
11+
matrix:
12+
python-version: [ 3.8, 3.9 ]
13+
os: [ ubuntu-latest ]
14+
env:
15+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
16+
USING_COVERAGE: "3.9"
17+
18+
runs-on: ${{ matrix.os }}
19+
name: os ${{ matrix.os }} python ${{ matrix.python-version }} Linting, testing, and compliance
20+
steps:
21+
- uses: actions/checkout@master
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v1
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- uses: docker-practice/actions-setup-docker@master
29+
30+
- name: Install Poetry
31+
uses: dschep/[email protected]
32+
33+
- name: Install Tox
34+
run: |
35+
pip3 install black coverage flake8 tox tox-docker tox-poetry
36+
37+
- name: Run tox
38+
run: |
39+
tox
40+
41+
- name: Upload coverage to Codecov
42+
uses: codecov/codecov-action@v1
43+
if: contains(env.USING_COVERAGE, matrix.python-version)
44+
with:
45+
fail_ci_if_error: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# ide
132+
.idea

README.rst

Whitespace-only changes.

0 commit comments

Comments
 (0)