From 5ca8290f75125af4578336b9c220abffdab8a9f6 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 8 Dec 2022 12:26:19 +0100 Subject: [PATCH 01/13] Use a new action for mamba. --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc7a96d6f..5753be797 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,17 +30,17 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - uses: actions/checkout@v3 + - uses: mamba-org/provision-with-micromamba@main with: - auto-update-conda: false - python-version: ${{ matrix.python-version }} + environment-file: false + environment-name: gha-testing channels: conda-forge,nodefaults - mamba-version: "*" - - - name: Install core dependencies. - shell: bash -l {0} - run: mamba install -c conda-forge tox-conda coverage + extra-specs: | + python=${{ matrix.python-version }} + mamba + tox-conda + cache-downloads: true # Unit, integration, and end-to-end tests. From b9f356607f790154346d483e8f221068c095a35f Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 8 Dec 2022 12:27:06 +0100 Subject: [PATCH 02/13] To changes. --- docs/source/changes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/changes.md b/docs/source/changes.md index c22d6ea25..222905cc8 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -11,6 +11,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and - {pull}`318` Clarifies an example on nested dependencies and products. - {pull}`321` converts more choice options to enums. - {pull}`322` replaces SVGs with animations by termynal. +- {pull}`323` uses a new Github action to provide mamba. ## 0.2.6 - 2022-10-27 From 455357cb5ca1def553c85fbc33ed2eec8e249dcc Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Thu, 8 Dec 2022 13:12:18 +0100 Subject: [PATCH 03/13] Update changes. --- docs/source/changes.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/source/changes.md b/docs/source/changes.md index 222905cc8..e88936be6 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -5,13 +5,16 @@ chronological order. Releases follow [semantic versioning](https://semver.org/) releases are available on [PyPI](https://pypi.org/project/pytask) and [Anaconda.org](https://anaconda.org/conda-forge/pytask). +## 0.4.0 - 2023-xx-xx + +- {pull}`323` uses a new Github action to provide mamba. + ## 0.2.7 - 2022-xx-xx - {pull}`308` replaces pydot with pygraphviz. - {pull}`318` Clarifies an example on nested dependencies and products. - {pull}`321` converts more choice options to enums. - {pull}`322` replaces SVGs with animations by termynal. -- {pull}`323` uses a new Github action to provide mamba. ## 0.2.6 - 2022-10-27 From 1269ab43020b71a6cefed3e38b9c75eb786676f7 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:05:31 +0200 Subject: [PATCH 04/13] Fix. --- docs/rtd_environment.yml | 2 +- docs/source/changes.md | 2 +- environment.yml | 2 +- setup.cfg | 2 +- tests/test_debugging.py | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/rtd_environment.yml b/docs/rtd_environment.yml index 0808dd98f..803d0221b 100644 --- a/docs/rtd_environment.yml +++ b/docs/rtd_environment.yml @@ -3,7 +3,7 @@ channels: - nodefaults dependencies: - - python >=3.7 + - python >=3.8 - pip - setuptools_scm - toml diff --git a/docs/source/changes.md b/docs/source/changes.md index 7fb011a6f..baa63b218 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -7,7 +7,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and ## 0.4.0 - 2023-xx-xx -- {pull}`323` uses a new Github action to provide mamba. +- {pull}`323` remove Python 3.7 support and use a new Github action to provide mamba. ## 0.3.2 - 2023-xx-xx diff --git a/environment.yml b/environment.yml index 9d8019694..09a9838d6 100644 --- a/environment.yml +++ b/environment.yml @@ -5,7 +5,7 @@ channels: - nodefaults dependencies: - - python >=3.7 + - python >=3.8 - pip - setuptools_scm - toml diff --git a/setup.cfg b/setup.cfg index 9d8dfaa2f..1cc38ff9c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,7 +40,7 @@ install_requires = pybaum>=0.1.1 rich tomli>=1.0.0 -python_requires = >=3.7 +python_requires = >=3.8 include_package_data = True package_dir = =src diff --git a/tests/test_debugging.py b/tests/test_debugging.py index 229b510cf..7b21dcee3 100644 --- a/tests/test_debugging.py +++ b/tests/test_debugging.py @@ -133,7 +133,6 @@ def task_example(depends_on): @pytest.mark.end_to_end() @pytest.mark.skipif(not IS_PEXPECT_INSTALLED, reason="pexpect is not installed.") @pytest.mark.skipif(sys.platform == "win32", reason="pexpect cannot spawn on Windows.") -@pytest.mark.skipif(sys.version_info < (3, 7), reason="breakpoint is Python 3.7+ only.") def test_breakpoint(tmp_path): source = """ def task_example(): From 2134d82f8889eba3652f46640782a7117e252a93 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:06:13 +0200 Subject: [PATCH 05/13] fix. --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6737bb36..4cd11f841 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: run: tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=src --cov=tests --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.10' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F unit -c @@ -58,7 +58,7 @@ jobs: run: tox -e pytest -- -m integration --cov=src --cov=tests --cov-report=xml -n auto - name: Upload coverage reports of integration tests. - if: runner.os == 'Linux' && matrix.python-version == '3.8' + if: runner.os == 'Linux' && matrix.python-version == '3.10' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F integration -c @@ -67,6 +67,6 @@ jobs: run: tox -e pytest -- -m end_to_end --cov=src --cov=tests --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.10' shell: bash -l {0} run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c From dca566e99f0d1e787b29e4694ac3ed05f4686775 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:07:06 +0200 Subject: [PATCH 06/13] Fix. --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 329859e21..dac512006 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: rev: v3.9.0 hooks: - id: reorder-python-imports - args: [--py37-plus, --add-import, 'from __future__ import annotations'] + args: [--py38-plus, --add-import, 'from __future__ import annotations'] - repo: https://github.com/asottile/setup-cfg-fmt rev: v2.3.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index fe63803ce..8dc8092d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ ignore-words-list = "falsy, hist, ines, unparseable" [tool.ruff] -target-version = "py37" +target-version = "py38" select = ["ALL"] fix = true extend-ignore = [ From 728e053fe645aef768cde9c5f6c86194eb28d1eb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 11 Jun 2023 10:07:39 +0000 Subject: [PATCH 07/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytask/capture.py | 7 +------ src/_pytask/nodes.py | 2 +- src/_pytask/path.py | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/_pytask/capture.py b/src/_pytask/capture.py index a4bf76e68..98af32ea9 100644 --- a/src/_pytask/capture.py +++ b/src/_pytask/capture.py @@ -46,12 +46,7 @@ from _pytask.nodes import Task -if sys.version_info >= (3, 8): - from typing import final -else: - - def final(f: Any) -> Any: - return f +from typing import final class _CaptureMethod(enum.Enum): diff --git a/src/_pytask/nodes.py b/src/_pytask/nodes.py index 53bb5e745..2d330f02d 100644 --- a/src/_pytask/nodes.py +++ b/src/_pytask/nodes.py @@ -98,7 +98,7 @@ def state(self) -> str | None: return None @classmethod - @functools.lru_cache() + @functools.lru_cache def from_path(cls, path: Path) -> FilePathNode: """Instantiate class from path to file. diff --git a/src/_pytask/path.py b/src/_pytask/path.py index 3e7864c93..576f2f798 100644 --- a/src/_pytask/path.py +++ b/src/_pytask/path.py @@ -100,7 +100,7 @@ def find_common_ancestor(*paths: str | Path) -> Path: return common_ancestor -@functools.lru_cache() +@functools.lru_cache def find_case_sensitive_path(path: Path, platform: str) -> Path: """Find the case-sensitive path. From 5c5673bc10c2a23b1c3a08e6a8b2dcc1a1c0312c Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:08:29 +0200 Subject: [PATCH 08/13] changes.2 --- docs/source/changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/changes.md b/docs/source/changes.md index 5c3663228..c0b83b04e 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -9,7 +9,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and - {pull}`323` remove Python 3.7 support and use a new Github action to provide mamba. -## 0.3.2 - 2023-xx-xx +## 0.3.2 - 2023-06-07 - {pull}`345` updates the version numbers in animations. - {pull}`352` publishes `db` that is required by pytask-environment. From 9121de709bdfc35f4db24d2d60baf572aef52356 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:10:55 +0200 Subject: [PATCH 09/13] fix. --- src/_pytask/capture.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/_pytask/capture.py b/src/_pytask/capture.py index 98af32ea9..777c76c79 100644 --- a/src/_pytask/capture.py +++ b/src/_pytask/capture.py @@ -34,6 +34,7 @@ from tempfile import TemporaryFile from typing import Any from typing import AnyStr +from typing import final from typing import Generator from typing import Generic from typing import Iterator @@ -46,9 +47,6 @@ from _pytask.nodes import Task -from typing import final - - class _CaptureMethod(enum.Enum): FD = "fd" NO = "no" From 682ac371deab8bf51e4b7ccc6de521339f105104 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:28:51 +0200 Subject: [PATCH 10/13] Update action. --- .github/workflows/main.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4cd11f841..02221d62b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,16 +31,19 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: mamba-org/provision-with-micromamba@main + - uses: mamba-org/setup-micromamba@v1 with: environment-file: false environment-name: gha-testing - channels: conda-forge,nodefaults - extra-specs: | + condarc: | + channels: + - nodefaults + - conda-forge + create-args: | python=${{ matrix.python-version }} mamba tox-conda - cache-downloads: true + cache-environment: true # Unit, integration, and end-to-end tests. From c98f45c6a07298227c1b68a2e44a6a31f200adf2 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:32:59 +0200 Subject: [PATCH 11/13] Attempt to fix. --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02221d62b..5ac1d4c18 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,6 @@ jobs: - uses: actions/checkout@v3 - uses: mamba-org/setup-micromamba@v1 with: - environment-file: false environment-name: gha-testing condarc: | channels: From 4ebd6d00854ff1ec895e8ade0fb9bc5068fab573 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:36:57 +0200 Subject: [PATCH 12/13] Ficx. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ac1d4c18..eefae9de6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,7 @@ jobs: - uses: mamba-org/setup-micromamba@v1 with: environment-name: gha-testing - condarc: | + condarc: >- channels: - nodefaults - conda-forge From 2f05ae7f5400d1a0dc4db9af23383f005ddd2995 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Sun, 11 Jun 2023 12:42:33 +0200 Subject: [PATCH 13/13] fix. --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eefae9de6..fbbdbc997 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,11 +34,11 @@ jobs: - uses: mamba-org/setup-micromamba@v1 with: environment-name: gha-testing - condarc: >- + condarc: | channels: - nodefaults - conda-forge - create-args: | + create-args: >- python=${{ matrix.python-version }} mamba tox-conda