Skip to content

Commit 7cafe49

Browse files
authored
Deprecate Python 3.6 and add support for Python 3.10. (#5)
1 parent bd8328d commit 7cafe49

File tree

15 files changed

+67
-27
lines changed

15 files changed

+67
-27
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: main
22

3+
# Automatically cancel a previous run.
4+
concurrency:
5+
group: ${{ github.head_ref || github.run_id }}
6+
cancel-in-progress: true
7+
38
on:
49
push:
510
branches:

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ repos:
3838
rev: v2.7.1
3939
hooks:
4040
- id: reorder-python-imports
41+
args: [--py37-plus, --add-import, 'from __future__ import annotations']
4142
- repo: https://github.com/psf/black
4243
rev: 22.1.0
4344
hooks:

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Changes
44
This is a record of all past cookiecutter-pytask-plugin releases and what went into them
55
in reverse chronological order.
66

7+
1.1.0 - 2022-02-08
8+
------------------
9+
10+
- :gh:`2` fixes the readme.
11+
- :gh:`4` skips concurrent CI builds.
12+
- :gh:`5` deprecates Python 3.6 and adds support for Python 3.10.
13+
714

815
1.0.0 - 2022-01-14
916
------------------

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
"""
77
# -- Project information -----------------------------------------------------
8+
from __future__ import annotations
89

910
project = "cookiecutter-pytask"
1011
author = "Tobias Raabe"

hooks/post_gen_project.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""This module contains hooks which are executed after the template is rendered."""
2+
from __future__ import annotations
3+
24
import shutil
35
import subprocess
46
import warnings

hooks/pre_gen_project.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""This module contains hooks which are executed before the template is rendered."""
2+
from __future__ import annotations
3+
24
import re
35

46
MODULE_REGEX = r"^[-_a-zA-Z0-9]*$"

setup.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ classifiers =
1818
Operating System :: POSIX
1919
Programming Language :: Python :: 3
2020
Programming Language :: Python :: 3 :: Only
21-
Programming Language :: Python :: 3.6
2221
Programming Language :: Python :: 3.7
2322
Programming Language :: Python :: 3.8
2423
Programming Language :: Python :: 3.9
@@ -31,7 +30,7 @@ project_urls =
3130
Tracker = https://github.com/pytask-dev/cookiecutter-pytask-plugin/issues
3231

3332
[options]
34-
python_requires = >=3.6
33+
python_requires = >=3.7
3534
zip_safe = False
3635

3736
[check-manifest]

tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
"""This file is necessary to apply custom mypy configurations for the tests."""
2+
from __future__ import annotations

tests/test_cookie.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
import subprocess
35
import sys

{{cookiecutter.package_name}}/.github/workflows/main.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration Workflow
1+
name: main
22

33
# Automatically cancel a previous run.
44
concurrency:
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
27-
python-version: ['3.7', '3.8', '3.9']
27+
python-version: ['3.7', '3.8', '3.9', '3.10']
2828

2929
steps:
3030
- uses: actions/checkout@v2
@@ -44,7 +44,7 @@ jobs:
4444
run: tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto
4545

4646
- name: Upload coverage report for unit tests and doctests.
47-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
47+
if: runner.os == 'Linux' && matrix.python-version == '3.9'
4848
shell: bash -l {0}
4949
run: bash <(curl -s https://codecov.io/bash) -F unit -c
5050

@@ -53,11 +53,25 @@ jobs:
5353
run: tox -e pytest -- -m end_to_end --cov=./ --cov-report=xml -n auto
5454

5555
- name: Upload coverage reports of end-to-end tests.
56-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
56+
if: runner.os == 'Linux' && matrix.python-version == '3.9'
5757
shell: bash -l {0}
5858
run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c
5959

60-
- name: Validate codecov.yml
61-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
60+
docs:
61+
62+
name: Run documentation.
63+
runs-on: ubuntu-latest
64+
65+
steps:
66+
- uses: actions/checkout@v2
67+
- uses: conda-incubator/setup-miniconda@v2
68+
with:
69+
auto-update-conda: true
70+
71+
- name: Install core dependencies.
72+
shell: bash -l {0}
73+
run: conda install -c conda-forge tox-conda
74+
75+
- name: Build docs
6276
shell: bash -l {0}
63-
run: cat codecov.yml | curl --data-binary @- https://codecov.io/validate
77+
run: tox -e sphinx

0 commit comments

Comments
 (0)