diff --git a/.conda/meta.yaml b/.conda/meta.yaml deleted file mode 100644 index 18b26f0..0000000 --- a/.conda/meta.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{% set data = load_setup_py_data() %} - -package: - name: pytask-latex - 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.11 - - latex-dependency-scanner - -test: - requires: - - pytest - - pytask-parallel >=0.0.4 - source_files: - - tox.ini - - tests - commands: - - pytask --version - - pytask --help - - pytask clean - - pytask markers - - pytask collect - - - pytest tests - -about: - home: https://github.com/pytask-dev/pytask-latex - license: MIT - license_file: LICENSE - summary: Compile LaTeX documents. - dev_url: https://github.com/pytask-dev/pytask-latex/ diff --git a/.github/workflows/continuous-integration-workflow.yml b/.github/workflows/continuous-integration-workflow.yml index 588a52c..c35a940 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'] steps: - uses: actions/checkout@v2 @@ -46,7 +46,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' + if: runner.os == 'Linux' && matrix.python-version == '3.9' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F unit -c @@ -55,11 +55,6 @@ 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' + if: runner.os == 'Linux' && matrix.python-version == '3.9' 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' - 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 031702d..da96277 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,9 +6,16 @@ repos: args: ['--maxkb=100'] - id: check-merge-conflict - id: check-yaml - exclude: meta.yaml - id: debug-statements - id: end-of-file-fixer + - id: check-case-conflict + - id: check-vcs-permalinks + - id: check-yaml + - id: fix-byte-order-marker + - id: mixed-line-ending + - id: no-commit-to-branch + args: [--branch, main] + - id: trailing-whitespace - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.9.0 # Use the ref you want to point at hooks: @@ -25,11 +32,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 f8c5ff0..af79573 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,13 @@ all releases are available on `Anaconda.org `_. +0.1.1 - 2022-02-08 +------------------ + +- :gh:`30` skips concurrent CI builds. +- :gh:`31` deprecates Python 3.6 and add support for Python 3.10. + + 0.1.0 - 2021-07-21 ------------------ diff --git a/setup.cfg b/setup.cfg index 6e6fba8..52a377b 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 @@ -30,9 +29,9 @@ project_urls = packages = find: install_requires = click - latex-dependency-scanner - pytask>=0.1.0 -python_requires = >=3.6 + latex-dependency-scanner>=0.1.1 + 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_latex/__init__.py b/src/pytask_latex/__init__.py index 165802c..f493641 100644 --- a/src/pytask_latex/__init__.py +++ b/src/pytask_latex/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + try: from ._version import version as __version__ except ImportError: diff --git a/src/pytask_latex/collect.py b/src/pytask_latex/collect.py index 5aaa097..4ab0a2b 100644 --- a/src/pytask_latex/collect.py +++ b/src/pytask_latex/collect.py @@ -1,13 +1,13 @@ """Collect tasks.""" +from __future__ import annotations + import copy import functools import os import subprocess from pathlib import Path from typing import Iterable -from typing import Optional from typing import Sequence -from typing import Union from _pytask.config import hookimpl from _pytask.mark import Mark @@ -23,7 +23,7 @@ DEFAULT_OPTIONS = ["--pdf", "--interaction=nonstopmode", "--synctex=1", "--cd"] -def latex(options: Optional[Union[str, Iterable[str]]] = None): +def latex(options: str | Iterable[str] | None = None): """Specify command line options for latexmk. Parameters diff --git a/src/pytask_latex/config.py b/src/pytask_latex/config.py index c367325..3414499 100644 --- a/src/pytask_latex/config.py +++ b/src/pytask_latex/config.py @@ -1,4 +1,6 @@ """Configure pytask.""" +from __future__ import annotations + from _pytask.config import hookimpl from _pytask.shared import convert_truthy_or_falsy_to_bool from _pytask.shared import get_first_non_none_value diff --git a/src/pytask_latex/execute.py b/src/pytask_latex/execute.py index 25f1c4c..87ec03e 100644 --- a/src/pytask_latex/execute.py +++ b/src/pytask_latex/execute.py @@ -1,4 +1,6 @@ """Execute tasks.""" +from __future__ import annotations + import shutil from _pytask.config import hookimpl diff --git a/src/pytask_latex/parametrize.py b/src/pytask_latex/parametrize.py index 5cc5a61..918c2c8 100644 --- a/src/pytask_latex/parametrize.py +++ b/src/pytask_latex/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_latex/plugin.py b/src/pytask_latex/plugin.py index 75d1d0c..3325a1f 100644 --- a/src/pytask_latex/plugin.py +++ b/src/pytask_latex/plugin.py @@ -1,4 +1,6 @@ """Entry-point for the plugin.""" +from __future__ import annotations + from _pytask.config import hookimpl from pytask_latex import collect from pytask_latex import config diff --git a/tests/conftest.py b/tests/conftest.py index 20c6164..1fdb7db 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,6 @@ """Configuration file for pytest.""" +from __future__ import annotations + import os import shutil import sys diff --git a/tests/test_collect.py b/tests/test_collect.py index dd48cbf..ca029ed 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 323d977..40976b4 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 ceec78d..cfd4f71 100644 --- a/tests/test_execute.py +++ b/tests/test_execute.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap from contextlib import ExitStack as does_not_raise # noqa: N813 from subprocess import CalledProcessError diff --git a/tests/test_latex_dependency_scanner.py b/tests/test_latex_dependency_scanner.py index f7b34dc..760389e 100644 --- a/tests/test_latex_dependency_scanner.py +++ b/tests/test_latex_dependency_scanner.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap import pytest 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 7f23635..77afd8d 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 textwrap import time diff --git a/tests/test_parametrize.py b/tests/test_parametrize.py index 5bf1091..c15a734 100644 --- a/tests/test_parametrize.py +++ b/tests/test_parametrize.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import textwrap import pytest