From 3dc52a82564aa7b59f57ae60fd2160ab07f22fd8 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Mon, 7 Feb 2022 17:40:59 +0100 Subject: [PATCH 1/6] Deprecate Python 3.6. Committed via https://github.com/asottile/all-repos --- .pre-commit-config.yaml | 3 ++- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7730815..57bff53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,11 +25,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: diff --git a/setup.cfg b/setup.cfg index fb0a100..d6431b5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ packages = find: install_requires = click pytask>=0.1.0 -python_requires = >=3.6 +python_requires = >=3.7 include_package_data = True package_dir = =src zip_safe = False From 5e8c15030e6b87bef3f777e63ed75733a09fa120 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 16:42:23 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.cfg | 2 +- setup.py | 2 ++ src/pytask_r/__init__.py | 2 ++ src/pytask_r/collect.py | 2 ++ src/pytask_r/config.py | 2 ++ src/pytask_r/execute.py | 2 ++ src/pytask_r/parametrize.py | 2 ++ src/pytask_r/plugin.py | 2 ++ tests/conftest.py | 2 ++ tests/test_collect.py | 2 ++ tests/test_config.py | 2 ++ tests/test_execute.py | 2 ++ tests/test_normal_execution_w_plugin.py | 2 ++ tests/test_parallel.py | 2 ++ tests/test_parametrize.py | 2 ++ 15 files changed, 29 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index d6431b5..fb0a100 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ packages = find: install_requires = click pytask>=0.1.0 -python_requires = >=3.7 +python_requires = >=3.6 include_package_data = True package_dir = =src zip_safe = False diff --git a/setup.py b/setup.py index 26e08e4..c21a9ee 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from setuptools import setup diff --git a/src/pytask_r/__init__.py b/src/pytask_r/__init__.py index 165802c..f493641 100644 --- a/src/pytask_r/__init__.py +++ b/src/pytask_r/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + try: from ._version import version as __version__ except ImportError: diff --git a/src/pytask_r/collect.py b/src/pytask_r/collect.py index a3cdd9e..ec07c0d 100644 --- a/src/pytask_r/collect.py +++ b/src/pytask_r/collect.py @@ -1,4 +1,6 @@ """Collect tasks.""" +from __future__ import annotations + import copy import functools import subprocess diff --git a/src/pytask_r/config.py b/src/pytask_r/config.py index 44d1dcd..44e139b 100644 --- a/src/pytask_r/config.py +++ b/src/pytask_r/config.py @@ -1,4 +1,6 @@ """Configure pytask.""" +from __future__ import annotations + from _pytask.config import hookimpl diff --git a/src/pytask_r/execute.py b/src/pytask_r/execute.py index a66d309..3346804 100644 --- a/src/pytask_r/execute.py +++ b/src/pytask_r/execute.py @@ -1,4 +1,6 @@ """Execute tasks.""" +from __future__ import annotations + import shutil from _pytask.config import hookimpl diff --git a/src/pytask_r/parametrize.py b/src/pytask_r/parametrize.py index e5c8d52..6c3c278 100644 --- a/src/pytask_r/parametrize.py +++ b/src/pytask_r/parametrize.py @@ -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 diff --git a/src/pytask_r/plugin.py b/src/pytask_r/plugin.py index b50bb19..7677758 100644 --- a/src/pytask_r/plugin.py +++ b/src/pytask_r/plugin.py @@ -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 diff --git a/tests/conftest.py b/tests/conftest.py index 231d117..5e0288f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import shutil import pytest diff --git a/tests/test_collect.py b/tests/test_collect.py index ac1cb60..d5e1521 100644 --- a/tests/test_collect.py +++ b/tests/test_collect.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from contextlib import ExitStack as does_not_raise # noqa: N813 from pathlib import Path diff --git a/tests/test_config.py b/tests/test_config.py index 1296042..9624b64 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from pytask import main diff --git a/tests/test_execute.py b/tests/test_execute.py index 24a79d3..b9f98f1 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import textwrap from contextlib import ExitStack as does_not_raise # noqa: N813 diff --git a/tests/test_normal_execution_w_plugin.py b/tests/test_normal_execution_w_plugin.py index 7e06201..ee19252 100644 --- a/tests/test_normal_execution_w_plugin.py +++ b/tests/test_normal_execution_w_plugin.py @@ -1,4 +1,6 @@ """Contains tests which do not require the plugin and ensure normal execution.""" +from __future__ import annotations + import textwrap import pytest diff --git a/tests/test_parallel.py b/tests/test_parallel.py index a29c0da..9348b7c 100644 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -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 diff --git a/tests/test_parametrize.py b/tests/test_parametrize.py index dd7801e..2406e56 100644 --- a/tests/test_parametrize.py +++ b/tests/test_parametrize.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import textwrap From 8b564538e5efee7ff8578078ea2769d8b8cf5db9 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 8 Feb 2022 00:07:52 +0100 Subject: [PATCH 3/6] fix. --- .github/workflows/continuous-integration-workflow.yml | 10 +++++----- src/pytask_r/collect.py | 4 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 2635423..c9ab6b5 100644 --- a/.github/workflows/continuous-integration-workflow.yml +++ b/.github/workflows/continuous-integration-workflow.yml @@ -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: @@ -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 @@ -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 @@ -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 diff --git a/src/pytask_r/collect.py b/src/pytask_r/collect.py index ec07c0d..c2f5474 100644 --- a/src/pytask_r/collect.py +++ b/src/pytask_r/collect.py @@ -5,9 +5,7 @@ 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 @@ -17,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 From 096b7a6277ed99bf970187e5d4c8ac6af1ad5513 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 8 Feb 2022 00:10:48 +0100 Subject: [PATCH 4/6] to changes. --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index c84217b..f49d290 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,13 @@ all releases are available on `PyPI `_ and `Anaconda.org `_. +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 ------------------ From 04d69dbc258763963971a7e1003bb0a1a5a78ba8 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 8 Feb 2022 00:13:30 +0100 Subject: [PATCH 5/6] to changes. --- .conda/meta.yaml | 49 ------------------------------------------------ setup.cfg | 5 ++--- 2 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 .conda/meta.yaml diff --git a/.conda/meta.yaml b/.conda/meta.yaml deleted file mode 100644 index 78e3fb6..0000000 --- a/.conda/meta.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{% set data = load_setup_py_data() %} - -package: - name: pytask-r - version: {{ data.get('version') }} - -source: - # git_url is nice in that it won't capture devenv stuff. However, it only captures - # committed code, so pay attention. - git_url: ../ - -build: - noarch: python - number: 0 - script: {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt - -requirements: - host: - - python - - pip - - setuptools - - run: - - python >=3.6 - - pytask >=0.0.9 - -test: - requires: - - pytest - - pytask-parallel >=0.0.4 - - r-base - source_files: - - tox.ini - - tests - commands: - - pytask --version - - pytask --help - - pytask markers - - pytask clean - - pytask collect - - - pytest tests - -about: - home: https://github.com/pytask-dev/pytask-r - license: MIT - license_file: LICENSE - summary: Run R scripts with pytask. - dev_url: https://github.com/pytask-dev/pytask-r diff --git a/setup.cfg b/setup.cfg index fb0a100..fe11d45 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 @@ -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 From cc87c7c830719ff76328be687d7fd9fffd45050b Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Tue, 8 Feb 2022 00:15:39 +0100 Subject: [PATCH 6/6] fix pre-commit. --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57bff53..94f1326 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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