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

+5
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

+1
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

+7
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

+1
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

+2
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

+2
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

+1-2
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

+1
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

+2
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

+21-7
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

{{cookiecutter.package_name}}/.pre-commit-config.yaml

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v4.1.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=100']
@@ -11,7 +11,6 @@ repos:
1111
- id: debug-statements
1212
- id: end-of-file-fixer
1313
- id: fix-byte-order-marker
14-
- id: forbid-new-submodules
1514
- id: mixed-line-ending
1615
- id: no-commit-to-branch
1716
args: [--branch, main]
@@ -29,29 +28,30 @@ repos:
2928
- id: rst-inline-touching-normal
3029
- id: text-unicode-replacement-char
3130
- repo: https://github.com/asottile/pyupgrade
32-
rev: v2.21.2
31+
rev: v2.31.0
3332
hooks:
3433
- id: pyupgrade
3534
args: [--py37-plus]
3635
- repo: https://github.com/asottile/reorder_python_imports
37-
rev: v2.5.0
36+
rev: v2.7.1
3837
hooks:
3938
- id: reorder-python-imports
39+
args: [--py37-plus, --add-import, 'from __future__ import annotations']
4040
- repo: https://github.com/asottile/setup-cfg-fmt
41-
rev: v1.17.0
41+
rev: v1.20.0
4242
hooks:
4343
- id: setup-cfg-fmt
4444
- repo: https://github.com/psf/black
45-
rev: 21.7b0
45+
rev: 22.1.0
4646
hooks:
4747
- id: black
4848
- repo: https://github.com/asottile/blacken-docs
49-
rev: v1.10.0
49+
rev: v1.12.1
5050
hooks:
5151
- id: blacken-docs
5252
additional_dependencies: [black]
5353
- repo: https://github.com/PyCQA/flake8
54-
rev: 3.9.2
54+
rev: 4.0.1
5555
hooks:
5656
- id: flake8
5757
types: [python]
@@ -72,21 +72,24 @@ repos:
7272
Pygments,
7373
]
7474
- repo: https://github.com/PyCQA/doc8
75-
rev: 0.9.0
75+
rev: 0.10.1
7676
hooks:
7777
- id: doc8
7878
- repo: https://github.com/econchick/interrogate
79-
rev: 1.4.0
79+
rev: 1.5.0
8080
hooks:
8181
- id: interrogate
8282
args: [-v, --fail-under=40, src, tests]
83+
- repo: https://github.com/guilatrova/tryceratops
84+
rev: v1.0.1
85+
hooks:
86+
- id: tryceratops
8387
- repo: https://github.com/codespell-project/codespell
8488
rev: v2.1.0
8589
hooks:
8690
- id: codespell
87-
args: [-L unparseable]
8891
- repo: https://github.com/mgedmin/check-manifest
89-
rev: "0.46"
92+
rev: "0.47"
9093
hooks:
9194
- id: check-manifest
9295
- repo: meta

{{cookiecutter.package_name}}/README.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{{ cookiecutter.package_name }}
22
{% for _ in cookiecutter.package_name %}={% endfor %}
33

4+
.. image:: https://img.shields.io/pypi/v/{{ cookiecutter.package_name }}?color=blue
5+
:alt: PyPI
6+
:target: https://pypi.org/project/{{ cookiecutter.package_name }}
7+
48
.. image:: https://img.shields.io/pypi/pyversions/{{ cookiecutter.package_name }}
59
:alt: PyPI - Python Version
610
:target: https://pypi.org/project/{{ cookiecutter.package_name }}

{{cookiecutter.package_name}}/environment.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ dependencies:
1111
- toml
1212

1313
# Package dependencies
14-
- pytask >=0.1
15-
- pytask-parallel >=0.1
14+
- pytask >=0.1.7
15+
- pytask-parallel >=0.1.1
1616

1717
# Misc
1818
- black
19-
- bumpversion
2019
- jupyterlab
2120
- pdbpp
2221
- pre-commit

{{cookiecutter.package_name}}/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ project_urls =
2929
packages = find:
3030
install_requires =
3131
click
32-
pytask>=0.1
32+
pytask>=0.1.7
3333
python_requires = >=3.7
3434
include_package_data = True
3535
package_dir = =src

{{cookiecutter.package_name}}/tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ conda_channels =
1313
conda-forge
1414
nodefaults
1515
conda_deps =
16-
pytask >=0.1
17-
pytask-parallel >=0.1
16+
pytask >=0.1.7
17+
pytask-parallel >=0.1.1
1818
pytest
1919
pytest-cov
2020
pytest-xdist

0 commit comments

Comments
 (0)