Skip to content

Commit

Permalink
Deprecate Python 3.6 and add support for Python 3.10. (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasraabe authored Feb 7, 2022
1 parent 6020380 commit 238e002
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 62 deletions.
49 changes: 0 additions & 49 deletions .conda/meta.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10']
r-version: ['3.6.3']

steps:
Expand All @@ -45,7 +45,7 @@ jobs:
run: tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto

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

Expand All @@ -54,7 +54,7 @@ jobs:
# run: tox -e pytest -- -m integration --cov=./ --cov-report=xml -n auto

# - name: Upload coverage reports of integration tests.
# if: runner.os == 'Linux' && matrix.python-version == '3.8' && matrix.r-version == '3.6.3'
# if: runner.os == 'Linux' && matrix.python-version == '3.9' && matrix.r-version == '3.6.3'
# shell: bash -l {0}
# run: bash <(curl -s https://codecov.io/bash) -F integration -c

Expand All @@ -63,11 +63,11 @@ jobs:
run: tox -e pytest -- -m end_to_end --cov=./ --cov-report=xml -n auto

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

- name: Validate codecov.yml
if: runner.os == 'Linux' && matrix.python-version == '3.8' && matrix.r-version == '3.6.3'
if: runner.os == 'Linux' && matrix.python-version == '3.9' && matrix.r-version == '3.6.3'
shell: bash -l {0}
run: cat codecov.yml | curl --data-binary @- https://codecov.io/validate
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ repos:
args: ['--maxkb=100']
- id: check-merge-conflict
- id: check-yaml
exclude: meta.yaml
- id: debug-statements
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/pygrep-hooks
Expand All @@ -25,11 +24,12 @@ repos:
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]
args: [--py37-plus]
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.7.1
hooks:
- id: reorder-python-imports
args: [--py37-plus, --add-import, 'from __future__ import annotations']
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ all releases are available on `PyPI <https://pypi.org/project/pytask-r>`_ and
`Anaconda.org <https://anaconda.org/conda-forge/pytask-r>`_.


0.1.1 - 2022-02-08
------------------

- :gh:`22` skips concurrent CI builds.
- :gh:`23` deprecate Python 3.6 and add support for Python 3.10.


0.1.0 - 2021-07-22
------------------

Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -31,8 +30,8 @@ project_urls =
packages = find:
install_requires =
click
pytask>=0.1.0
python_requires = >=3.6
pytask>=0.1.7
python_requires = >=3.7
include_package_data = True
package_dir = =src
zip_safe = False
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from setuptools import setup


Expand Down
2 changes: 2 additions & 0 deletions src/pytask_r/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

try:
from ._version import version as __version__
except ImportError:
Expand Down
6 changes: 3 additions & 3 deletions src/pytask_r/collect.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Collect tasks."""
from __future__ import annotations

import copy
import functools
import subprocess
from typing import Iterable
from typing import Optional
from typing import Sequence
from typing import Union

from _pytask.config import hookimpl
from _pytask.mark_utils import get_specific_markers_from_task
Expand All @@ -15,7 +15,7 @@
from _pytask.parametrize import _copy_func


def r(options: Optional[Union[str, Iterable[str]]] = None):
def r(options: str | Iterable[str] | None = None):
"""Specify command line options for Rscript.
Parameters
Expand Down
2 changes: 2 additions & 0 deletions src/pytask_r/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Configure pytask."""
from __future__ import annotations

from _pytask.config import hookimpl


Expand Down
2 changes: 2 additions & 0 deletions src/pytask_r/execute.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Execute tasks."""
from __future__ import annotations

import shutil

from _pytask.config import hookimpl
Expand Down
2 changes: 2 additions & 0 deletions src/pytask_r/parametrize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Parametrize tasks."""
from __future__ import annotations

from _pytask.config import hookimpl
from _pytask.mark import MARK_GEN as mark # noqa: N811

Expand Down
2 changes: 2 additions & 0 deletions src/pytask_r/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Register hook specifications and implementations."""
from __future__ import annotations

from _pytask.config import hookimpl
from pytask_r import collect
from pytask_r import config
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import shutil

import pytest
Expand Down
2 changes: 2 additions & 0 deletions tests/test_collect.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from contextlib import ExitStack as does_not_raise # noqa: N813
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import pytest
from pytask import main

Expand Down
2 changes: 2 additions & 0 deletions tests/test_execute.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import textwrap
from contextlib import ExitStack as does_not_raise # noqa: N813
Expand Down
2 changes: 2 additions & 0 deletions tests/test_normal_execution_w_plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Contains tests which do not require the plugin and ensure normal execution."""
from __future__ import annotations

import textwrap

import pytest
Expand Down
2 changes: 2 additions & 0 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Contains test which ensure that the plugin works with pytask-parallel."""
from __future__ import annotations

import os
import textwrap
import time
Expand Down
2 changes: 2 additions & 0 deletions tests/test_parametrize.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
import textwrap

Expand Down

0 comments on commit 238e002

Please sign in to comment.