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/.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/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7730815..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 @@ -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: 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 ------------------ 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 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..c2f5474 100644 --- a/src/pytask_r/collect.py +++ b/src/pytask_r/collect.py @@ -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 @@ -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 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