Skip to content

Commit a916726

Browse files
Drop support for Python 3.6 (#64)
1 parent 24bbeee commit a916726

7 files changed

Lines changed: 132 additions & 16 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ updates:
88
directory: "/"
99
schedule:
1010
interval: "weekly"
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"

.github/workflows/main.yml

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@ on:
55
branches: [master]
66
pull_request:
77
branches: [master]
8+
workflow_dispatch:
9+
inputs: {}
810

911
jobs:
1012
build:
11-
13+
1214
strategy:
15+
fail-fast: false
1316
matrix:
14-
python-version: [3.6, 3.7, 3.8]
15-
17+
python-version: ["3.7", "3.8", "3.9", "3.10"]
18+
1619
runs-on: ubuntu-latest
1720

1821
steps:
1922
- name: Checking out repo
20-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2124

22-
- name: Set up Python ${{ matrix.container[1] }}
23-
uses: actions/setup-python@v2
25+
- name: Set up Python ${{ matrix.python-version }}
26+
uses: actions/setup-python@v3
2427
with:
2528
python-version: ${{ matrix.python-version }}
2629

@@ -29,11 +32,52 @@ jobs:
2932
python -m pip install -U pip setuptools wheel
3033
python3 -m pip install -U .[dev]
3134
32-
- name: Check code formatting
33-
run: find singer tests -type f -name '*.py' | xargs unify --check-only
34-
3535
- name: Analysing the code with pylint
3636
run: pylint singer
3737

3838
- name: Runs tests with coverage
39-
run: nosetests --with-doctest -v --nocapture
39+
run: coverage run --parallel -m pytest
40+
41+
- name: Upload coverage data
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: coverage-data
45+
path: ".coverage.*"
46+
47+
coverage:
48+
runs-on: ubuntu-latest
49+
needs: build
50+
steps:
51+
- name: Check out the repository
52+
uses: actions/checkout@v3
53+
54+
- name: Set up Python
55+
uses: actions/setup-python@v3
56+
with:
57+
python-version: "3.8"
58+
59+
- name: Install and upgrade dependencies
60+
run: |
61+
python -m pip install -U pip setuptools wheel
62+
python3 -m pip install -U .[dev]
63+
64+
- name: Download coverage data
65+
uses: actions/download-artifact@v3.0.0
66+
with:
67+
name: coverage-data
68+
69+
- name: Combine coverage data
70+
run: |
71+
coverage combine
72+
73+
- name: Generate XML coverage report
74+
run: |
75+
coverage xml
76+
77+
- name: Display human readable report
78+
run: |
79+
coverage report
80+
81+
# Optional if you want to use codecov.io
82+
# - name: Upload coverage report
83+
# uses: codecov/codecov-action@v3

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ ENV/
8686
# Pipenv
8787
Pipfile
8888
Pipfile.lock
89-
pyproject.toml
9089

9190
# Spyder project settings
9291
.spyderproject

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://pre-commit.com for more information
2+
3+
# See https://pre-commit.ci/ for information about the continuous
4+
# integration service for the pre-commit framework
5+
ci:
6+
autofix_prs: false
7+
autoupdate_schedule: weekly
8+
autoupdate_commit_msg: 'chore(deps): pre-commit autoupdate'
9+
10+
11+
# See https://pre-commit.com/hooks.html for more hooks
12+
repos:
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v4.2.0
15+
hooks:
16+
- id: trailing-whitespace
17+
- id: end-of-file-fixer
18+
- id: check-yaml
19+
- id: check-added-large-files
20+
- repo: https://github.com/asottile/pyupgrade
21+
rev: v2.32.0
22+
hooks:
23+
- id: pyupgrade
24+
name: pyupgrade (python)
25+
args: [--py37-plus]
26+
- repo: https://github.com/pycqa/isort
27+
rev: 5.10.1
28+
hooks:
29+
- id: isort
30+
name: isort (python)
31+
- repo: https://github.com/psf/black
32+
rev: 22.3.0
33+
hooks:
34+
- id: black
35+
name: black (python)
36+
- repo: https://github.com/PyCQA/pylint
37+
rev: v2.13.8
38+
hooks:
39+
- id: pylint
40+
name: pylint (python)

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Submitting a PR
44

5-
1. Write tests to cover any new code or code changes.
6-
2. Please make sure that all tests pass and that the code passes linting with `make`.
7-
3. Open up the PR.
5+
1. Install and use [pre-commit](https://pre-commit.com/) to keep your changes in the style of the project.
6+
2. Write tests to cover any new code or code changes.
7+
3. Please make sure that all tests pass and that the code passes linting with `make`.
8+
4. Open up the PR.

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[tool.black]
2+
line-length = 120
3+
4+
[tool.coverage.paths]
5+
source = ["singer"]
6+
7+
[tool.coverage.run]
8+
branch = true
9+
source = ["singer"]
10+
11+
[tool.coverage.report]
12+
fail_under = 76.0
13+
14+
[tool.isort]
15+
profile = "black"
16+
multi_line_output = 3
17+
src_paths = "singer"
18+
use_parentheses = true
19+
known_first_party = "singer"
20+
include_trailing_comma = true
21+
add_imports = [
22+
"from __future__ import annotations",
23+
]
24+
25+
[tool.pytest.ini_options]
26+
addopts = "-v --doctest-modules"

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
setup(name="pipelinewise-singer-python",
99
version='2.0.1',
1010
description="Singer.io utility library - PipelineWise compatible",
11+
python_requires=">=3.7.0, <3.11",
1112
long_description=long_description,
1213
long_description_content_type="text/markdown",
1314
author="TransferWise",
@@ -19,17 +20,18 @@
1920
install_requires=[
2021
'pytz',
2122
'jsonschema==3.2.0',
22-
'orjson==3.6.1',
23+
'orjson==3.6.5',
2324
'python-dateutil>=2.6.0',
2425
'backoff==1.11.1',
2526
'ciso8601',
2627
],
2728
extras_require={
2829
'dev': [
2930
'pylint==2.11.1',
31+
'pytest==7.1.2',
32+
'coverage[toml]~=6.3',
3033
'ipython',
3134
'ipdb',
32-
'nose',
3335
'unify==0.5'
3436
]
3537
},

0 commit comments

Comments
 (0)