Skip to content

Commit 7afad49

Browse files
Merge branch 'master' into hbasria/master
2 parents 5e1a969 + bda1b52 commit 7afad49

39 files changed

+1350
-540
lines changed

.github/FUNDING.yml

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

.github/workflows/pre-commit.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-python@v2
14+
- name: set PY
15+
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
16+
- uses: actions/cache@v1
17+
with:
18+
path: ~/.cache/pre-commit
19+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
20+
- uses: pre-commit/[email protected]

.github/workflows/python-tests.yml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: python tests+artifacts+release
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
- "v*"
10+
release:
11+
12+
jobs:
13+
test:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python_version: [ '2.7', '3.5', '3.6', '3.7', '3.8', 'pypy2', 'pypy3' ]
19+
os: [windows-latest, ubuntu-latest] #, macos-latest]
20+
exclude:
21+
- os: windows-latest
22+
python_version: "pypy2"
23+
include:
24+
- os: ubuntu-latest
25+
python_version: '3.9-dev'
26+
27+
name: ${{ matrix.os }} - Python ${{ matrix.python_version }}
28+
steps:
29+
- uses: actions/checkout@v1
30+
- name: Setup python
31+
uses: actions/setup-python@v2
32+
if: matrix.python_version != '3.9-dev'
33+
with:
34+
python-version: ${{ matrix.python_version }}
35+
architecture: x64
36+
- name: Set up Python ${{ matrix.python_version }} (deadsnakes)
37+
uses: deadsnakes/[email protected]
38+
if: matrix.python_version == '3.9-dev'
39+
with:
40+
python-version: ${{ matrix.python_version }}
41+
architecture: x64
42+
- run: pip install -U setuptools
43+
- run: pip install -e .[toml] pytest
44+
- run: pytest
45+
46+
check_selfinstall:
47+
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
python_version: [ '2.7', '3.5', '3.6', '3.7', '3.8', 'pypy2', 'pypy3' ]
52+
name: check self install - Python ${{ matrix.python_version }}
53+
steps:
54+
- uses: actions/checkout@v1
55+
- name: Setup python
56+
uses: actions/setup-python@v2
57+
with:
58+
python-version: ${{ matrix.python_version }}
59+
architecture: x64
60+
# self install testing needs some clarity
61+
# so its being executed without any other tools running
62+
- run: pip install -U setuptools
63+
- run: python setup.py egg_info
64+
- run: python setup.py sdist
65+
- run: easy_install dist/*
66+
- run: python testing/check_self_install.py
67+
68+
69+
eggs:
70+
runs-on: ubuntu-latest
71+
72+
needs: [test]
73+
name: Python ${{ matrix.python_version }} eggs
74+
strategy:
75+
matrix:
76+
python_version: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9-dev']
77+
steps:
78+
- uses: actions/checkout@v1
79+
- name: Setup python
80+
uses: actions/setup-python@v2
81+
if: matrix.python_version != '3.9-dev'
82+
with:
83+
python-version: ${{ matrix.python_version }}
84+
architecture: x64
85+
- name: Set up Python ${{ matrix.python_version }} (deadsnakes)
86+
uses: deadsnakes/[email protected]
87+
if: matrix.python_version == '3.9-dev'
88+
with:
89+
python-version: ${{ matrix.python_version }}
90+
architecture: x64
91+
- name: Install dependencies
92+
run: |
93+
python -m pip install --upgrade pip
94+
pip install --upgrade wheel setuptools
95+
- run: python setup.py egg_info
96+
- name: Build package
97+
run: python setup.py bdist_egg
98+
- uses: actions/upload-artifact@v2
99+
with:
100+
name: dist
101+
path: dist
102+
103+
dist:
104+
runs-on: ubuntu-latest
105+
106+
needs: [test]
107+
name: Python bdist/wheel
108+
steps:
109+
- uses: actions/checkout@v1
110+
- uses: actions/setup-python@v2
111+
with:
112+
python-version: "3.8"
113+
- name: Install dependencies
114+
run: |
115+
python -m pip install --upgrade pip
116+
pip install --upgrade wheel setuptools
117+
- run: python setup.py egg_info
118+
- name: Build package
119+
run: python setup.py bdist_wheel sdist
120+
- uses: actions/upload-artifact@v2
121+
with:
122+
name: dist
123+
path: dist
124+
125+
126+
dist_check:
127+
runs-on: ubuntu-latest
128+
needs: [eggs, dist]
129+
steps:
130+
- uses: actions/setup-python@v2
131+
with:
132+
python-version: "3.8"
133+
- name: Install dependencies
134+
run: pip install twine
135+
- uses: actions/download-artifact@v2
136+
with:
137+
name: dist
138+
path: dist
139+
- run: twine check dist/*
140+
141+
dist_upload:
142+
143+
runs-on: ubuntu-latest
144+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
145+
needs: [dist_check]
146+
steps:
147+
- uses: actions/download-artifact@v2
148+
with:
149+
name: dist
150+
path: dist
151+
- name: Publish package to PyPI
152+
uses: pypa/gh-action-pypi-publish@master
153+
with:
154+
user: __token__
155+
password: ${{ secrets.pypi_token }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ __pycache__/
2020
# Distribution / packaging
2121
.env/
2222
env/
23+
.venv/
24+
venv/
2325
build/
2426
dist/
2527
.eggs/
@@ -30,6 +32,7 @@ lib64/
3032
# Installer logs
3133
pip-log.txt
3234
pip-delete-this-directory.txt
35+
pip-wheel-metadata
3336

3437
# Unit test / coverage reports
3538
htmlcov/

.pre-commit-config.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
exclude: setuptools_scm/win_py31_compat.py
22
repos:
33
- repo: https://github.com/ambv/black
4-
rev: 18.4a4
4+
rev: 20.8b1
55
hooks:
66
- id: black
77
args: [--safe, --quiet]
8-
python_version: python3.6
98
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v1.2.3
9+
rev: v3.3.0
1110
hooks:
1211
- id: trailing-whitespace
1312
- id: end-of-file-fixer
1413
- id: check-yaml
1514
- id: debug-statements
15+
- repo: https://gitlab.com/pycqa/flake8
16+
rev: 3.8.4
17+
hooks:
1618
- id: flake8
1719
- repo: https://github.com/asottile/pyupgrade
18-
rev: v1.2.0
20+
rev: v2.7.4
1921
hooks:
2022
- id: pyupgrade

.travis.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)