Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,22 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-[email protected]
- uses: mamba-org/setup-micromamba@v1
with:
auto-update-conda: false
python-version: ${{ matrix.python-version }}
channels: conda-forge,nodefaults
miniforge-variant: Mambaforge

- name: Install core dependencies.
shell: bash -l {0}
run: mamba install -c conda-forge tox-conda coverage
environment-name: gha-testing
condarc: |
channels:
- nodefaults
- conda-forge
create-args: >-
python=${{ matrix.python-version }}
mamba
tox-conda
cache-environment: true

# Unit, integration, and end-to-end tests.

Expand All @@ -49,7 +51,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

Expand All @@ -58,7 +60,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

Expand All @@ -67,6 +69,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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/rtd_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ channels:
- nodefaults

dependencies:
- python >=3.7
- python >=3.8
- pip
- setuptools_scm
- toml
Expand Down
6 changes: 5 additions & 1 deletion docs/source/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ 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.3.2 - 2023-xx-xx
## 0.4.0 - 2023-xx-xx

- {pull}`323` remove Python 3.7 support and use a new Github action to provide mamba.

## 0.3.2 - 2023-06-07

- {pull}`345` updates the version numbers in animations.
- {pull}`352` publishes `db` that is required by pytask-environment.
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- nodefaults

dependencies:
- python >=3.7
- python >=3.8
- pip
- setuptools_scm
- toml
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions src/_pytask/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,14 +47,6 @@
from _pytask.nodes import Task


if sys.version_info >= (3, 8):
from typing import final
else:

def final(f: Any) -> Any:
return f


class _CaptureMethod(enum.Enum):
FD = "fd"
NO = "no"
Expand Down
2 changes: 1 addition & 1 deletion src/_pytask/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/_pytask/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion tests/test_debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down